Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assistant Button Override doesn't work on Android 13 #66

Open
ivaniskandar opened this issue Dec 16, 2022 · 21 comments
Open

Assistant Button Override doesn't work on Android 13 #66

ivaniskandar opened this issue Dec 16, 2022 · 21 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@ivaniskandar
Copy link
Owner

ivaniskandar commented Dec 16, 2022

I don't have a Sony device running stock Android 13 so I will not be able to deal with it by myself.

At least a full logcat when pressing the assistant button is needed to do a debug.

@ivaniskandar ivaniskandar added bug Something isn't working help wanted Extra attention is needed labels Dec 16, 2022
@Pytak
Copy link

Pytak commented Dec 16, 2022

Here's what happens:

12-16 22:18:41.565  1391  1851 I GAKeyEventHandler: launchAssistGuideActivity
12-16 22:18:41.566  1391  1851 I ActivityTaskManager: START u0 {flg=0x10000000 cmp=com.google.android.googlequicksearchbox/com.google.android.apps.gsa.staticplugins.opa.EnterOpaActivityFromDeeplink} from uid 1000
12-16 22:18:41.609  3336  3336 D BoundBrokerSvc: onUnbind: Intent { act=com.google.android.gms.cast.firstparty.START dat=chimera-action:/... cmp=com.google.android.gms/.chimera.CastPersistentBoundBrokerService }
12-16 22:18:41.802  4094  4094 D BoundBrokerSvc: onUnbind: Intent { act=com.google.android.gms.measurement.START pkg=com.google.android.gms }

This is on a 5 III running the latest 13 OTA with both the "Assistant" and "Google" apps manually disabled. This setup worked on 11 and 12. Fingers crossed!

@Pytak
Copy link

Pytak commented Dec 16, 2022

I looked through the source and the trigger "GAKeyEventHandler: launchAssistGuideActivity" seems to be there, but I don't get your logcat message that it got detected. Maybe something about 13 broke reading the logs? Sorry, not an android dev :(

@Sai-P
Copy link

Sai-P commented Dec 17, 2022

Here's what happens:

12-16 22:18:41.565  1391  1851 I GAKeyEventHandler: launchAssistGuideActivity
12-16 22:18:41.566  1391  1851 I ActivityTaskManager: START u0 {flg=0x10000000 cmp=com.google.android.googlequicksearchbox/com.google.android.apps.gsa.staticplugins.opa.EnterOpaActivityFromDeeplink} from uid 1000
12-16 22:18:41.609  3336  3336 D BoundBrokerSvc: onUnbind: Intent { act=com.google.android.gms.cast.firstparty.START dat=chimera-action:/... cmp=com.google.android.gms/.chimera.CastPersistentBoundBrokerService }
12-16 22:18:41.802  4094  4094 D BoundBrokerSvc: onUnbind: Intent { act=com.google.android.gms.measurement.START pkg=com.google.android.gms }

This is on a 5 III running the latest 13 OTA with both the "Assistant" and "Google" apps manually disabled. This setup worked on 11 and 12. Fingers crossed!

Can you send this logcat unfiltered?

@Pytak
Copy link

Pytak commented Dec 17, 2022

Hey, thanks for your interest,
these are the only two lines that appear when the assistant button is pressed. Logcat is set to "*:V". Let me know if there's anything else I could do!

12-17 23:20:25.877  1391  1851 I GAKeyEventHandler: launchAssistGuideActivity
12-17 23:20:25.878  1391  1851 I ActivityTaskManager: START u0 {flg=0x10000000 cmp=com.google.android.googlequicksearchbox/com.google.android.apps.gsa.staticplugins.opa.EnterOpaActivityFromDeeplink} from uid 1000

@Cknight70
Copy link

Hi, I have an Xperia 5 III with android 13. Using the app to remap the key to flashlight worked before reboot, now it no longer functions even if I turn the assistant button off and on again, or change the action the key should make.

I'm unfamiliar with adb at all, let me know what I should type to get a good log for you if you need it.

@Holton181
Copy link

Holton181 commented Dec 30, 2022

Yesterday I found a behavior with Xperi+ that migt give a clue why it isn't working on 13.
I cleared app data for Xperi+. When starting the app I am asked to enable accessibility service for Xperi+, as expected. Then when remaping assistant button to flashlight I am asked if I like to grant the app access to all system loggs. Unfortunately it seems that I only can grant it for one time only. After granting, the remaping works!
But only for a while [see EDIT below]. I haven't found out exactly when it stops working, force closing often brakes it but not always, and time passed after granting access to system loggs seems to be a factor.
Force closing do seem to disable accessibility service every time though.

I can't make the lockscreen shortcuts work again watever I try though, but that is not a big deal for me anyhow.

Having an Xperia 1 iii I basically grow addicted to having my assistant button as a flashlight control. Ever since updating to A13 I have felt somewhat handicaped, to express myself a bit dramatic. (Adding this info just to show that I realy appreciate Xperi+ and the ability to remap the assistant button and that I really hope you will find a way to make it work again)

EDIT
I had forgotten to change battery management for Xperi+ to unrestricted. Have had the flashlight on the assistant button working for an hour now. Fingers crossed...

@Pytak
Copy link

Pytak commented Dec 30, 2022

Thank you for this! It seems like the logs haven't changed, but A13 now requires a "one time only" logs permission granted via a dialog. You can re-trigger this dialog when you reset the custom assistant action button to default via the top-right overflow menu from action selection, then set it to your custom action again.

When battery optimization is unrestricted, this will probably work as long as you don't reboot your device. You'll need to reset it again afterwards. If there's a way to trigger that dialog after each device reboot, that would be a fairly alright workaround.

@Holton181
Copy link

... You can re-trigger this dialog when you reset the custom assistant action button to default via the top-right overflow menu from action selection, then set it to your custom action again...

Ah, didn't think about that. Makes it a bit easier, thanks.

@Pytak
Copy link

Pytak commented Dec 30, 2022 via email

@Pandemic-XDA
Copy link

Can this be fixed and updated for A13 ?

@Ikagun
Copy link

Ikagun commented Feb 1, 2023

I cleared app data for Xperi+. When starting the app I am asked to enable accessibility service for Xperi+, as expected. Then when remaping assistant button to flashlight I am asked if I like to grant the app access to all system loggs. Unfortunately it seems that I only can grant it for one time only. After granting, the remaping works!

Same thing here, but when using the remapped button it still opens the "you need to set your default assistant to google assistant" page as well

@arthurEspooner
Copy link

fixes mentioned earlier do not work. it also shows "null" for a lot of apps now when you set the action.

the maintainer had 2 screens fail on his xperia in a few months so has most likely written them off. i wouldn't hold your breath for a fix to this but it would be nice. i'll never buy another xperia after my experience with this phone.

@arthurEspooner
Copy link

arthurEspooner commented Mar 29, 2023

mine works now for some things, but a lot of apps are still "null" and don't work at all on XQ-BC62. some of them are even native apps. if you could please take a look at this @ivaniskandar it would be greatly appreciated.

lockscreen shortcuts don't work at all either. latest 0.8.0. it worked great on android 12.

@4fosaefp
Copy link

4fosaefp commented Apr 7, 2023

Just upgraded my 10 III to A13 and have the same issue.
Managed to got it working thanks to comments by @Holton181 and @Pytak.
Still, needing to grant log permission every reboot is annoying. Hopefully a fix and be found soon.

@ivaniskandar
Copy link
Owner Author

This is most likely broken because of the undocumented change of Android 13 reported here and even the dialog to grant the access request is broken.

The only solid workaround I can think of is using Shizuku to run the logcat reader as shell (which still need a one-time activation on every boot) or just use root altogether.

@arthurEspooner
Copy link

time to switch to iphone

@jasonlaguidice
Copy link

The only solid workaround I can think of is using Shizuku to run the logcat reader as shell (which still need a one-time activation on every boot) or just use root altogether.

Is it possible to get a build of this which has this enabled? I'd take the trade-off for Shizuku as I already use it to force enable VoWifi with Pixel IMS.

@wokawoka
Copy link

any update on this?
thank you!

@demonsako
Copy link

Is this abandoned?

@ivaniskandar
Copy link
Owner Author

Pretty much, yeah.

@enderkruemel
Copy link

For me it works mostly fine. I have an Xperia 5iii with Android 13. The activation is a bit tricky. I need to reset the Button Trigger to Default and lock my Phone. After ten Seconds im unlocking it, i can set it to flashlight, than i get the prompt where it asks for permission. This works every time for me.

It sometimes stopps working for no reason (every 3-4 weeks). Just the same Process is needet to get it working again.

Also the same is sometimes needet after every reboot.
Sometimes it isnt needet and it asks straight away if i open the app.

Also i recommend to disable Energy saving for this app. It helps a lot.

I hope this helps someone...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests