Skip to content

Debloat any Android or Google TV over Wi-Fi and get an Apple TV-style home.

Examples: TCL 55S470G remote app buttons, and the key service survives restarts

Jose Berumen2f36a2693021
diff --git a/docs/TROUBLESHOOTING.md b/docs/TROUBLESHOOTING.md
index ac06c7355..6fd0137db 100644
--- a/docs/TROUBLESHOOTING.md
+++ b/docs/TROUBLESHOOTING.md
@@ -134,5 +134,10 @@ tools/tv.py 'dumpsys accessibility'
Enabled but never bound points at a firmware restriction on auto-starting sideloaded services (some TCL
builds log `OP_AUTO_START` denials). Look at `logcat` for the binding failure before changing settings,
-and do not rewrite the enabled-services list or grant app-ops as a blanket fix. When reporting, give the
+and do not rewrite the enabled-services list or grant app-ops as a blanket fix. On a TCL 55S470G (Google
+TV 12) the line is `[TclAppBoot] ... calleeComponent = 'com.gathin.tvhome/.HomeKeyService', bootType =
+'bind_service', isAllow = 'false', reason = 'callee_does't_have_OP_AUTO_START_permission.'`, and
+`appops get com.gathin.tvhome` shows `APP_AUTO_START: ignore`. Allowing that one op for the launcher only
+(`appops set com.gathin.tvhome APP_AUTO_START allow`) made the service bind on its own after a restart;
+toggling the service off and on in Accessibility works until the next restart. When reporting, give the
model, build, current user and the relevant redacted lines, not the raw dump.
diff --git a/examples/README.md b/examples/README.md
index fbe792a83..9e662742c 100644
--- a/examples/README.md
+++ b/examples/README.md
@@ -42,7 +42,7 @@ on that firmware, grouped and commented. These are starting points: comment out
| `tcl-40s5400a/` | TCL 40S5400A (C06, C06_2K_GB, MediaTek MT9221, 1 GB) | Android TV 11 | TCL account/TGuard/promo rows, USB players, voice and photo screensaver off by choice; ttvs is the firmware updater, keep it; stock launcher has HOME priority 2, so it must be disabled |
| `tcl-43c645/` | TCL 43C645 (Smart TV Pro, Realtek RTD2851 / R51MT05, V8-R51MT05-LF1V652) | Google TV launcher on Android TV 11 | TCL BI analytics/promos, Google partner plumbing, setupwraith (takes HOME once the stock launcher is off); voice and Chromecast kept, firmware updater and Miracast off by choice; tested on a real unit, launcher works |
| `tcl-50ep680/` | TCL 50EP680 (Europe, BeyondTV, Realtek rtd285o) | Android TV 11 | TCL analytics + content feed, giftbox dashboard, partner customizer, preloaded games/news; UK Freeview apps already off at the factory; voice off by choice; launcher works (stock `com.google.android.tvlauncher`, Live TV `com.tcl.tv`) |
-| `tcl-55s470g/` | TCL 55S470G (G10, G10_4K_US_NF, Realtek), US | Google TV 12 | Same build as the G10 list, but Samba TV, logkit and ttvs ship enabled; ttvs kept (it hosts the firmware updater) and re-enables Samba's front end at boot, so opt out in Settings > Privacy too; Assistant voice and Chromecast off by choice; setupwraith off (Wi-Fi belonged to android.uid.system); remote gear button sends keycode 83, opens the launcher's quick settings panel; reboot-checked |
+| `tcl-55s470g/` | TCL 55S470G (G10, G10_4K_US_NF, Realtek), US | Google TV 12 | Same build as the G10 list, but Samba TV, logkit and ttvs ship enabled; ttvs kept (it hosts the firmware updater) and re-enables Samba's front end at boot, so opt out in Settings > Privacy too; Assistant voice and Chromecast off by choice; setupwraith off (Wi-Fi belonged to android.uid.system); remote gear button (keycode 83) opens the quick settings panel and the app buttons are remapped (Pluto TV opens Tubi); `APP_AUTO_START` must be allowed for the launcher or TclAppBoot stops the key service at boot; reboot-checked |
| `tcl-g10-google-tv/` | TCL 55" 4K Google TV, 2023 (G10, G10_4K_US_NF); also TCL 55P6K, Spain (G10_4K_GB_NF_32BIT) | Google TV 12 | TCL TV+, TCL Live, store demo, smartlink installer; setupwraith also claims Home once the stock launcher is disabled |
| `tcl-q10g-pro/` | TCL 55Q10G Pro (China, tcl_mt5879_cn, MediaTek MT9952) | Android TV 11 | No Google services, TCL boot ad + analytics/BI, OTA and account services; ADB opens from Device info + UP/DOWN/LEFT/RIGHT, not the build number; debloat only, stock launcher cannot be replaced (signature check at install time) |
| `tcl-65c725/` | TCL 65C725 (Smart TV Pro, BeyondTV4) | Android TV 11 | TCL analytics/promos, Google recommendation rows; voice off, OTA off by choice |
diff --git a/examples/tcl-55s470g/README.md b/examples/tcl-55s470g/README.md
index 8eae9a226..b040a1cd3 100644
--- a/examples/tcl-55s470g/README.md
+++ b/examples/tcl-55s470g/README.md
@@ -65,10 +65,32 @@ back something from `debloat.txt`) and Launcher settings. Back or the gear again
- Gear opens the TV's Settings instead: set `"settings_key_panel": false` in `theme/config.json` and
push the theme.
+- Gear (and the app buttons below) stop working after a restart: TCL's boot blocker (`TclAppBoot`,
+ log line `callee_does't_have_OP_AUTO_START_permission`) refused to start the service. `install.ps1`
+ allows it for the launcher only:
+ `tools\venv\Scripts\python.exe -I tools\tv.py "appops set com.gathin.tvhome APP_AUTO_START allow"`.
+ Without a computer: Settings > System > Accessibility > Home button, switch it off and on again.
- Gear stops working after a reinstall: the service was switched off. Run `install.ps1` again, or check
it with `tools\venv\Scripts\python.exe -I tools\tv.py "settings get secure enabled_accessibility_services"`
(it should list `com.gathin.tvhome/.HomeKeyService`).
+## The remote's app buttons
+
+They send TCL keycodes only the stock home understood, so the same service opens the apps instead.
+`app_keys` in `theme/config.json` maps each button to an app; the Pluto TV button opens Tubi here:
+
+| Button | Keycode | Opens |
+|---|---|---|
+| Netflix | 4062 | `com.netflix.ninja` |
+| Prime Video | 4099 | `com.amazon.amazonvideo.livingroom` |
+| YouTube | 4065 | `com.google.android.youtube.tv` |
+| Apple TV | 4160 | `com.apple.atve.androidtv.appletv` |
+| Pluto TV | 4163 | `com.tubitv` (Tubi) |
+| TCLtv+ | (system) | TCLtv+, handled by the TV itself and not remappable here |
+
+To point a button at another app, change its package and push the theme (see below). Remove a line
+to leave that button alone.
+
## Change the dock order
Edit `theme/config.json`. `dock_apps` lists the dock left to right:
diff --git a/examples/tcl-55s470g/install.ps1 b/examples/tcl-55s470g/install.ps1
index 05b7fa781..69b17c70c 100644
--- a/examples/tcl-55s470g/install.ps1
+++ b/examples/tcl-55s470g/install.ps1
@@ -21,4 +21,7 @@ if ($wifi -match 'cname=[^ ]*setupwraith') { throw 'the saved Wi-Fi network belo
# -HomeKeyService: the remote's gear button (keycode 83) opens the quick settings panel, see theme\config.json.
& "$repo\launcher\build-and-install.ps1" -TvHost $TvHost -HomeKeyService
if (-not $?) { throw 'launcher install failed' }
+# TCL's boot blocker (TclAppBoot) refuses to start the key service after a restart unless the launcher
+# may auto-start; without this the gear and app buttons die at every boot until the service is toggled.
+& $py -I "$repo\tools\tv.py" 'appops set com.gathin.tvhome APP_AUTO_START allow; appops get com.gathin.tvhome APP_AUTO_START'
& "$repo\tools\theme.ps1" -TvHost $TvHost "$PSScriptRoot\theme"
diff --git a/examples/tcl-55s470g/install.sh b/examples/tcl-55s470g/install.sh
index a3117803a..0f74f383b 100644
--- a/examples/tcl-55s470g/install.sh
+++ b/examples/tcl-55s470g/install.sh
@@ -18,4 +18,7 @@ fi
"$PY" -I tools/tv.py "pm disable-user --user 0 com.google.android.tungsten.setupwraith"
# HOME_KEY_SERVICE=1: the remote's gear button (keycode 83) opens the quick settings panel, see theme/config.json.
HOME_KEY_SERVICE=1 launcher/build-and-install.sh
+# TCL's boot blocker (TclAppBoot) refuses to start the key service after a restart unless the launcher
+# may auto-start; without this the gear and app buttons die at every boot until the service is toggled.
+"$PY" -I tools/tv.py "appops set com.gathin.tvhome APP_AUTO_START allow; appops get com.gathin.tvhome APP_AUTO_START"
tools/theme.sh examples/tcl-55s470g/theme
diff --git a/examples/tcl-55s470g/theme/config.json b/examples/tcl-55s470g/theme/config.json
index 3e3bda05d..ee7baa88e 100644
--- a/examples/tcl-55s470g/theme/config.json
+++ b/examples/tcl-55s470g/theme/config.json
@@ -12,5 +12,12 @@
"background_color": "#000000",
"wallpaper": false,
"settings_key_keycodes": [83],
- "settings_key_panel": true
+ "settings_key_panel": true,
+ "app_keys": {
+ "4062": "com.netflix.ninja",
+ "4099": "com.amazon.amazonvideo.livingroom",
+ "4065": "com.google.android.youtube.tv",
+ "4160": "com.apple.atve.androidtv.appletv",
+ "4163": "com.tubitv"
+ }
}