Debloat any Android or Google TV over Wi-Fi and get an Apple TV-style home.
Python adbadblockandroid-tvandroid-tv-launcherapple-tvbloatware-removalclaude-codedebloatfire-tvgoogle-tvlauncherprivacysmart-tvsony-braviatclvibe-codingxiaomi
Merge PR #1757: examples: Sony BRAVIA VU3 remote app buttons need launcherx, kept with the Home redirect.
Gathin234b748cee5d45
diff --cc docs/TROUBLESHOOTING.mdindex 41bbc12a9,1051c1ec7..b0146f563--- a/docs/TROUBLESHOOTING.md+++ b/docs/TROUBLESHOOTING.md@@@ -1071,61 -827,17 +1071,70 @@@ handled go dead, the same trade withouprinted; the empty list also unbinds TalkBack. Bisect, keycodes and limits:[the G09 note](devices/tcl-55p71b-g09-key-repeat.md).+ Where launcherx is what answers the buttons, keeping it enabled and redirecting its home screen keeps both. On a+ Sony BRAVIA VU3 (`BRAVIA_VU3_4K`, Google TV 14, `UKR1.240726.001`) the Netflix, YouTube, Prime Video and YouTube+ Music buttons are global keys (`BUTTON_4`, `BUTTON_14`, `BUTTON_2`, `BUTTON_15`) routed to+ `com.realtek.advancesetting`, which on a Google TV hands each launch to launcherx's `GlobalButtonLaunch_Receiver`+ and drops it when launcherx is disabled. `InputKeyService` with their scancodes in `app_keys` opened all four but+ cost the ramp, and the volume key never reached the helper, so `consume_volume_keys` could not repeat it.+ launcherx enabled, `stock_home_redirect` set to it, `key_filter` false and `HomeKeyService` bound gave the buttons,+ the ramp and the new Home together ([the VU3 notes](../examples/sony-bravia-vu3/README.md)).+A [Sony KD-55X9000H PA-firmware follow-up](devices/sony-kd-55x9000h.md#later-remote-key-follow-up-24-october-2026) on Android 12 reproduced the same filter/repeat conflict with a personal fork. Its simultaneous kernel/callback capture saw held Volume in hardware but neither Volume direction in the helper. A separate saved-layout experiment retained Apps and native Volume without key filtering; it requires that fork's companion and Library entry, reserves an application-launch category, and has not been tested across restart/sleep/reconnect. It is not a stock upstream option.+## The power key does not wake the TV while the key helper is bound++A remote's power button does nothing while the TV is in standby, and only the set's own button wakes it.+Seen on a TCL `tc8000_ay30a2` (Android 11, `RQ3A.210705.001.2024101221`, #1387), where a key-filtering+accessibility service that stays bound with the screen off was reported to swallow the power key. The+launcher can stand its own helper down for standby instead of losing the helper altogether: with+`HOME_KEY_SERVICE=1` at install, at screen-off `HomeKeyService` takes itself off the accessibility list and+the first screen-on puts it back, so the keys it answers still work whenever the screen is on. Off by+default; three writes turn it on, and none of them is part of an ordinary install:++```sh+tools/tv.py 'pm grant com.gathin.tvhome android.permission.WRITE_SECURE_SETTINGS'+tools/tv.py 'cmd notification allow_listener com.gathin.tvhome/.GuardRevival'+tools/tv.py 'am broadcast -a com.gathin.tvhome.GUARD -n com.gathin.tvhome/.GuardConfig --ez guard_off_in_standby true'+# off again:+tools/tv.py 'am broadcast -a com.gathin.tvhome.GUARD -n com.gathin.tvhome/.GuardConfig --ez guard_off_in_standby false'+```++The broadcast prints `guard_off_in_standby=true` back, so the answer is readable without a reboot. The+first two writes are what make the opt-in survive, so read why:++- `WRITE_SECURE_SETTINGS` is what lets the launcher write the helper back onto the list at screen-on.+ Without it `GuardKeep` gives up silently and the helper stays off after the first standby, which looks+ like the helper having died. `RESTORE_KEY_SERVICES=1` at install already grants it+ ([the force-stop section](#accessibility-helper-enabled-but-the-remote-button-does-nothing)).+- `GuardRevival` is the listener the system re-binds once the process is gone, and firmware that kills+ third-party apps in standby takes the screen-on watch with it. The rebind is what re-arms it.++While the opt-in is on, `dumpsys accessibility` naming no `com.gathin.tvhome/.HomeKeyService` during+standby is the opt-in working, not a fault: wake the TV and read it again. Only that helper stands down;+`InputKeyService` keeps filtering, so the Input button still works.++A power button that does nothing at all while the TV is **on**, with a long press opening the shutdown+dialog instead, is a different fault: [a TCL 43BP615 whose stock launcher switched the TV off on one press](#a-power-press-that-does-nothing-and-a-long-press-opens-the-shutdown-dialog).++## A power press that does nothing and a long press opens the shutdown dialog++A press on the remote's power button does nothing, and a long press brings up Android's shutdown+confirmation instead of turning the set off, where the stock launcher switched it off on one press.+Checked on a TCL 43BP615 (BeyondTV, Android 11, SDK 30, #1608) after an ordinary+`launcher/build-and-install.sh` with no key helper flags, and again with `HomeKeyService` bound through+`settings put secure enabled_accessibility_services`: the dialog came up both times, so the helper is not+what changes the key. The owner's reading is that the platform takes `KEYCODE_POWER` itself, in the+window policy, before an application or an accessibility service is handed it, and the launcher maps no+power key of its own (its only `KEYCODE_POWER` mention keeps the key out of the `power_on_home`+handover) — so there is no `app_keys` entry, theme key or `config.xml` value that takes the press back.+On this set the one-press power-off belonged to the firmware's own home screen and went with it.++Nothing is broken: the install, the debloat and the key helper are not involved, and the shutdown dialog+is Android's, so the TV still turns off from it. An owner who wants the one-press power-off back gets it by+putting the stock launcher back — `tools/restore.sh <list> <stock launcher>` — and hands Home back to it+at the same time.+## The soundbar on ARC/eARC falls asleep and the TV does not wake itA soundbar on the TV's ARC or eARC port can go to standby on its own after a stretch of silence while