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
Launcher: app_keys action word "accounts", for a profile button whose chooser lived in the stock launcher (XGIMI)
Takrim988f2ce58162
diff --git a/examples/xgimi-mogo-3-pro/debloat.txt b/examples/xgimi-mogo-3-pro/debloat.txtindex 094b76201..6354e2231 100644--- a/examples/xgimi-mogo-3-pro/debloat.txt+++ b/examples/xgimi-mogo-3-pro/debloat.txt@@ -16,13 +16,18 @@# "settings_key_keycodes": [83] the gear button sends KEYCODE_NOTIFICATION# "app_keys": ["KEYCODE_F4:com.google.android.youtube.tv",# "KEYCODE_F9:com.netflix.ninja",-# "KEYCODE_F8:com.amazon.amazonvideo.livingroom"]+# "KEYCODE_F8:com.amazon.amazonvideo.livingroom",+# "KEYCODE_F5:mute",+# "KEYCODE_F6:accounts"]# "stock_home_redirect": "com.google.android.apps.tv.launcherx"# XGIMI's xrmservice re-enables the disabled stock launcher on every one of its remote keys-# (docs/TROUBLESHOOTING.md). app_keys takes YouTube (F4), Netflix (F9) and Prime Video (F8) away from it.-# The programmable button (F5, mute by default), the profile button (F6, whose chooser lived in the stock-# launcher) and power (F11) still revive it: stock_home_redirect sends its home screen back, and-# re-applying this list disables it again.+# (docs/TROUBLESHOOTING.md). app_keys takes YouTube (F4), Netflix (F9), Prime Video (F8), the programmable+# button (F5, mute by default) and the profile button (F6) away from it; only power (F11) still revives it,+# and stock_home_redirect sends its home screen back.+# Left to xrmservice, the profile button starts launcherx's profile chooser, which a disabled launcherx no+# longer has: xrmservice crashes, and about 11 s after each restart the projector runs its autofocus.+# "KEYCODE_F6:accounts" opens Accounts and profiles instead (verified 2026-11-02); "KEYCODE_F6:ignore" only+# stops the crash.# - HDMI 1 opens through com.google.android.tv.inputplayer from the Inputs menu, so no input_action is needed# (unlike the Horizon S Pro).# - The default Backdrop screensaver (dreamx) is disabled below: point the screensaver atdiff --git a/launcher/app/src/main/java/com/gathin/tvhome/RemoteKeys.java b/launcher/app/src/main/java/com/gathin/tvhome/RemoteKeys.javaindex 7cd9e4dbf..066abf080 100644--- a/launcher/app/src/main/java/com/gathin/tvhome/RemoteKeys.java+++ b/launcher/app/src/main/java/com/gathin/tvhome/RemoteKeys.java@@ -343,7 +343,7 @@ final class RemoteKeys {static boolean isAction(String target) {switch (target) {case "back": case "home": case "recents": case "mute": case "sleep":- case "screensaver": case "settings": case "wifi": case "library": case "ignore":+ case "screensaver": case "settings": case "wifi": case "accounts": case "library": case "ignore":return true;default:return false;@@ -379,6 +379,13 @@ final class RemoteKeys {case "wifi":start(ctx, SystemSettings.intent(ctx, Settings.ACTION_WIFI_SETTINGS));break;+ case "accounts":+ // Accounts and profiles, for a profile button whose chooser lived in the disabled stock launcher+ // (XGIMI); the main Settings screen where the firmware has no such page.+ Intent accounts = new Intent(Settings.ACTION_SYNC_SETTINGS);+ start(ctx, ctx.getPackageManager().resolveActivity(accounts, 0) != null+ ? accounts : SystemSettings.intent(ctx, Settings.ACTION_SETTINGS));+ break;case "library":// Home with the App library open on top; Home does nothing when app_library is off.start(ctx, new Intent(ctx, MainActivity.class).setAction(MainActivity.ACTION_APP_LIBRARY));diff --git a/launcher/app/src/main/res/values/config.xml b/launcher/app/src/main/res/values/config.xmlindex 2255d16f0..b03a5ca13 100644--- a/launcher/app/src/main/res/values/config.xml+++ b/launcher/app/src/main/res/values/config.xml@@ -204,7 +204,9 @@for HDMI 3 on a TCL Smart TV Pro; the ids are in `tools/tv.py 'dumpsys tv_input'` (hdmi_port=N underTvInputHardwareInfo). An action word in place of a package runs that action instead: back, home, recents,mute (toggles the sound, with the TV's volume bar), sleep (standby, Android 9 and later), screensaver (the- one chosen in the TV's settings, or the launcher's clock), settings, wifi, library (Home with the App+ one chosen in the TV's settings, or the launcher's clock), settings, wifi, accounts (Accounts and profiles,+ for a profile button whose chooser lived in the disabled stock launcher: KEYCODE_F6:accounts on an XGIMI+ MoGo 3 Pro), library (Home with the Applibrary open; with app_library off it only brings Home forward, so a remote's Apps button, which sends284 KEYCODE_ALL_APPS, can open it: 284:library) or ignore (swallows the button: itdoes nothing, for a shortcut pressed by accident; find its scancode with `tools/tv.py 'getevent -t'`);diff --git a/launcher/app/src/test/java/com/gathin/tvhome/RemoteKeysTest.java b/launcher/app/src/test/java/com/gathin/tvhome/RemoteKeysTest.javaindex adf081de4..dc684187b 100644--- a/launcher/app/src/test/java/com/gathin/tvhome/RemoteKeysTest.java+++ b/launcher/app/src/test/java/com/gathin/tvhome/RemoteKeysTest.java@@ -136,7 +136,7 @@ public class RemoteKeysTest {assertEquals("mute", keys.get(190));assertEquals("screensaver", keys.get(195));assertEquals("sleep", parseHold("hold:190:sleep").get(190));- for (String word : new String[] {"back", "home", "recents", "mute", "sleep", "screensaver", "settings", "wifi", "library", "ignore"}) {+ for (String word : new String[] {"back", "home", "recents", "mute", "sleep", "screensaver", "settings", "wifi", "accounts", "library", "ignore"}) {assertTrue(word, RemoteKeys.isAction(word));}assertFalse(RemoteKeys.isAction("com.netflix.ninja"));diff --git a/themes/README.md b/themes/README.mdindex 1d027e1f9..0d39c8399 100644--- a/themes/README.md+++ b/themes/README.md@@ -160,7 +160,7 @@ A new key needs one there in the same pull request.| `settings_fallback_components` | list, `config.xml` only | Vendor screens tried in order when nothing usable answers the standard Settings action (Xiaomi China, TCL/FFALCON, and Fire OS, where the real menu lives in its launcher), each as `package/activity`; the first one whose package is installed wins, and when none is, the standard intent is sent anyway and may open nothing. Fire OS answers that intent with a `CTSDummy` stub, which counts as missing so the fallback runs. A package named here also has to be listed in the launcher's `<queries>` (Android 11 package visibility), so a set whose settings app is neither of these needs a build, not a theme push. Not read from a theme || `restore_key_services` | bool | After a force stop of the launcher, Home puts the remote's accessibility helpers (`HomeKeyService`, `InputKeyService`) back on the enabled list; needs `RESTORE_KEY_SERVICES=1` (`-RestoreKeyServices` on Windows) on every install, since an install without it takes the grant back. Off by default || `input_key_keycodes` | list of keycodes | More remote buttons that open the input switcher, for `InputKeyService` (`KEYCODE_TV` and `KEYCODE_TV_INPUT` always do) |-| `app_keys` | list of strings | Remote buttons that open an app, as `"190:com.google.android.youtube.tv"` or `"KEYCODE_BUTTON_3:com.google.android.youtube.tv"`, or by scancode as `"scan:490:com.wbd.hbomax"` for remotes that share one keycode between app buttons (Sony BRAVIA), for `InputKeyService` or `HomeKeyService`. `"input:<input id>"` in place of the package switches to a TV input instead, e.g. `"scan:227:input:com.tcl.tvinput/.passthroughinput.TvPassThroughService/HW1413744640"` for an HDMI port (ids from `dumpsys tv_input`). `"inputs"` in place of the package opens the Inputs menu, for a remote whose source button sends a key Android does not map, e.g. `"scan:365:inputs"` (TCL 65C745). An action word in place of the package runs that action: `back`, `home`, `recents`, `mute`, `sleep` (standby, Android 9 and later), `screensaver`, `settings`, `wifi`, `library` (Home with the App library open, for a remote's Apps button, `"284:library"`; needs `app_library`) or `ignore` (swallows the button so it does nothing, for a shortcut pressed by accident), e.g. `"KEYCODE_PROG_YELLOW:mute"` or `"scan:586:ignore"`. Prefix an entry with `hold:` to make it the long-press action, e.g. `"hold:190:com.netflix.ninja"`, while the unprefixed entry still opens on a tap. Prefix it with `front:` for what a tap does while the button's own app is already in front (`HomeKeyService` only), and use `"guide:<package>"` as a target to open that Live TV app's program guide: `"172:com.vt.tv.tvcenter"` with `"front:172:guide:com.vt.tv.tvcenter"` opens Live TV, then its guide, on a Hisense hengshan set whose firmware sends the Live TV button (`KEYCODE_GUIDE`) only to the stock launcher |+| `app_keys` | list of strings | Remote buttons that open an app, as `"190:com.google.android.youtube.tv"` or `"KEYCODE_BUTTON_3:com.google.android.youtube.tv"`, or by scancode as `"scan:490:com.wbd.hbomax"` for remotes that share one keycode between app buttons (Sony BRAVIA), for `InputKeyService` or `HomeKeyService`. `"input:<input id>"` in place of the package switches to a TV input instead, e.g. `"scan:227:input:com.tcl.tvinput/.passthroughinput.TvPassThroughService/HW1413744640"` for an HDMI port (ids from `dumpsys tv_input`). `"inputs"` in place of the package opens the Inputs menu, for a remote whose source button sends a key Android does not map, e.g. `"scan:365:inputs"` (TCL 65C745). An action word in place of the package runs that action: `back`, `home`, `recents`, `mute`, `sleep` (standby, Android 9 and later), `screensaver`, `settings`, `wifi`, `accounts` (Accounts and profiles, for a profile button whose chooser lived in the disabled stock launcher, e.g. `"KEYCODE_F6:accounts"` on an XGIMI MoGo 3 Pro), `library` (Home with the App library open, for a remote's Apps button, `"284:library"`; needs `app_library`) or `ignore` (swallows the button so it does nothing, for a shortcut pressed by accident), e.g. `"KEYCODE_PROG_YELLOW:mute"` or `"scan:586:ignore"`. Prefix an entry with `hold:` to make it the long-press action, e.g. `"hold:190:com.netflix.ninja"`, while the unprefixed entry still opens on a tap. Prefix it with `front:` for what a tap does while the button's own app is already in front (`HomeKeyService` only), and use `"guide:<package>"` as a target to open that Live TV app's program guide: `"172:com.vt.tv.tvcenter"` with `"front:172:guide:com.vt.tv.tvcenter"` opens Live TV, then its guide, on a Hisense hengshan set whose firmware sends the Live TV button (`KEYCODE_GUIDE`) only to the stock launcher || `key_filter` | bool | `false` makes the key helpers stop filtering keys while staying enabled. Use it on firmware where any key-filtering accessibility service breaks long-press repeat (TCL Google TV on Android 12): the remote buttons above stop working, and volume repeat comes back || `gamepad_passthrough` | bool | `true` makes the key helpers stop filtering keys while a game controller is connected, so games see its buttons (Steam Link with an Xbox controller, Moonlight with two controllers); the remote buttons above do nothing until it disconnects. Needs `key_filter` on. A voice remote that reports a joystick does not count. Off by default || `consume_volume_keys` | bool | `true` makes the key helpers swallow Volume Up/Down and repeat a held one themselves (after 500 ms, every 60 ms). Use it on firmware that applies a volume key both before the helper and when the helper hands it back, so one tap moves two steps (TCL G03 / BeyondTV4, Android 11, #1100). Needs `key_filter` on. Off by default |