Skip to content

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

examples/tcl-g09-google-tv: map the remote's Netflix, Prime Video and YouTube buttons

Cristian Rojasa1ef5326353b
diff --git a/examples/tcl-g09-google-tv/README.md b/examples/tcl-g09-google-tv/README.md
index b0e57caac..820120e42 100644
--- a/examples/tcl-g09-google-tv/README.md
+++ b/examples/tcl-g09-google-tv/README.md
@@ -19,7 +19,7 @@ then `build-and-install.sh` starts the new launcher and only then disables launc
```bash
TV_HOST=<tv-ip> tools/disable.sh examples/tcl-g09-google-tv/debloat.txt
-TV_HOST=<tv-ip> launcher/build-and-install.sh
+INPUT_KEY_SERVICE=1 TV_HOST=<tv-ip> launcher/build-and-install.sh
TV_HOST=<tv-ip> tools/theme.sh examples/tcl-g09-google-tv
TV_HOST=<tv-ip> tools/venv/bin/python -I tools/tv.py 'settings put secure screensaver_components com.gathin.tvhome/.ClockDream'
```
@@ -55,10 +55,31 @@ Edit `dock_apps` in `config.json`: package names, left to right; an app that isn
above, no rebuild needed. `com.tcl.tv` and `com.tcl.suspension` are in `hidden_apps` because the Inputs
pill already covers Live TV and the inputs. All keys: [`themes/README.md`](../../themes/README.md).
+## Remote app buttons
+
+With Google TV's home disabled, the Netflix, Prime Video and YouTube buttons on the TCL remote do nothing:
+they send TCL's own keycodes, which TCL's shortcut manager hands to the stock home. `config.json` maps them
+back through the launcher's `InputKeyService`, which is why the install line above passes
+`INPUT_KEY_SERVICE=1`. Re-pass it on every reinstall; a reinstall drops the service from the accessibility list.
+
+| Button | Keycode | Scancode | Note |
+|---|---|---|---|
+| Netflix | 4062 | 472 | `app_keys` |
+| Prime Video | 4099 | 473 | `app_keys` |
+| YouTube | 4065 | 569 | `app_keys` |
+| Disney+ | | | keeps working on its own |
+| TCL Channel | 4020 | 456 | opens `com.tcl.waterfall.overseas`, which the list disables; map it to any app you like |
+| Shield (TCL Guard) | 4140 | 660 | opens TGuard, which the list disables; free to map |
+
+Found with `logcat` while pressing each button: TCL logs every press as `handleKeyBeforeQueueing event=KeyEvent
+{ ... keyCode=..., scanCode=... }` from `WindowManager`. Keys injected over ADB never reach `InputKeyService`,
+so check with the real remote.
+
## Notes for this set
-- The remote's Input button keeps working without Google TV's home: TCL draws that panel itself, so the
- launcher's optional `INPUT_KEY_SERVICE` is not needed.
+- The remote's Input button keeps working without Google TV's home: TCL draws that panel itself.
+ `INPUT_KEY_SERVICE` is only needed for the app buttons above.
+- Same lists and buttons on a second unit with firmware STT2.230203.001 AS10 (G09_4K_GB_32BIT).
- Firmware updates come through Play Services and are untouched.
- Screenshots come out black while HDMI or Live TV is on screen; press Home first.
- Switch USB debugging off when you're done; the launcher keeps working without it.
diff --git a/examples/tcl-g09-google-tv/config.json b/examples/tcl-g09-google-tv/config.json
index e2d964714..8abee63c6 100644
--- a/examples/tcl-g09-google-tv/config.json
+++ b/examples/tcl-g09-google-tv/config.json
@@ -11,5 +11,10 @@
],
"live_tv_package": "com.tcl.tv",
"columns": 4,
- "rows_below_dock": 0
+ "rows_below_dock": 0,
+ "app_keys": [
+ "4062:com.netflix.ninja",
+ "4099:com.amazon.amazonvideo.livingroom",
+ "4065:com.google.android.youtube.tv"
+ ]
}