keymapperorg / KeyMapper

An Android app that change what the buttons do on your devices!
http://docs.keymapper.club
GNU General Public License v3.0
1.28k stars 166 forks source link

Android TV OS 14 cannot enable accessibility service #1306

Open EricChan1989 opened 2 months ago

EricChan1989 commented 2 months ago

Developer TODO (don't remove)

Discord message link/email recipient poopiuy2003@outlook.com

Describe the bug This may not be judged as a bug, the better description is an issue. On Android TV OS 14, the newly released google tv streamer, there is no way to enable the related accessibility service. If I try to enable it, it will be disabled immediately automatically. I tried to use adb to grant the permission using the commands below, but it simply does not working.

adb shell pm grant io.github.sds100.keymapper android.permission.WRITE_SECURE_SETTINGS adb shell settings put secure enabled_accessibility_services io.github.sds100.keymapper/io.github.sds100.keymapper.service.MyAccessibilityService

May I know if there is a way to make it work on this new TV OS?

Thanks.

To Reproduce Steps to reproduce the behavior: try to enable the accessibility service from settings.

Upload a backup of your keymaps. Follow the guide here

Expected behavior The service can be enabled.

Screenshots I don't think there is need to have a screenshot for this, and it is hard to take a screenshot on the TV os.

Smartphone (please complete the following information):

Additional context N/A

EricChan1989 commented 2 months ago

By the way, it seems this new OS only allow the apps installed from play store to enable accessibility services. Is it possible that you can make this app available in the TV play store? It is only available in the phone's play store at this moment. Thanks

sds100 commented 2 months ago

Oh right, thats a weird restriction. Are there any ADB commands to override the whitelist? See #488. I haven't released it to TV because there are stricter requirements on optimizing the UI for TVs, the app isnt fully navigable either?

EricChan1989 commented 2 months ago

Oh right, thats a weird restriction. Are there any ADB commands to override the whitelist? See #488. I haven't released it to TV because there are stricter requirements on optimizing the UI for TVs, the app isnt fully navigable either?

I personally do not know if there is truly a whitelist or something. Maybe there is a variable in the system related to all the apps to mark them as installed from play store, built in or side loaded etc? If there is no way to enable the service via adb, maybe finally we have to rely on you to release it to the TV os as new os versions are always thr trend. The app itself works very well on TV os, even if there are some clicking issues to specified buttons, we can plug in a mouse to deal with this, very easy. We do not need to run this app every day anyway... Thanks

EricChan1989 commented 2 months ago

i found a workaround on this!!! Not to install the apk directly from any file explorer etc (via another app), just install it via adb install command. And then android tv os 14 may judge this as a safe way to install it, then I can enable accessibility service for it!!!

sds100 commented 2 months ago

Oh wow, that's weird 😂