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
examples: restore RockTek GB1 remote keys
Nikita Zlobin3144742108b8
diff --git a/examples/README.md b/examples/README.mdindex 92fc3cb34..fadcaf037 100644--- a/examples/README.md+++ b/examples/README.md@@ -96,7 +96,7 @@ on that firmware, grouped and commented. These are starting points: comment out| `rca-ai-pont/` | RCA AI PONT SA (Changhong, redwood, ISDB92RC; also sold as realme 40-inch) | Android 14 | Homwee store/tools (incl. chtvmanager) and installers, Anoki ACR, FAST channels (re-enabled by firmware at boot); keep partnercustomizer (crash-loops tv.service); 1 GB || `redmi-mitv-antl0/` | Redmi TV (MiTV-ANTL0, starwars) | Android 5.1.1 (not Android TV) | Mi push/web-content/cloud-control ads, TV Taobao, stock screensaver, OTA; needs `pm hide` instead of `pm disable-user`; startup-ad method depends on firmware and stock-launcher version, see the [L43M7-EA settings-only case](../docs/devices/xiaomi-l43m7-ea-antl0.md) || `redmi-mitv-mftp0/` | Redmi TV (MiTV-MFTP0, alita), China firmware 23.2.10.6129 | Android TV 9 (CN build) | CN-firmware Redmi, no Google apps: Mi analytics, tvqs, after-sales survey upload, cloud control, promo web container, shop plugin and store, preloaded apps, Mi Home off; `pm disable-user` works; **keep PatchWall enabled**: Home is a package-name allowlist like MiTV-AETP0, the `com.ts.launcher` application-ID build became Home and survived a reboot, do not run `build-and-install.sh` with defaults; startup ad off with `boot_ad_switch 0` on launcher 3.49.1601; `com.gitvdemo.video` is 银河奇异果 (iQIYI), kept; push service (installer whitelist), voice, casting, OTA, payments kept |-| `rocktek-gb1/` | RockTek GB1 | Google TV 14 | Provisional seven-package list: Android privacy-sandbox services, feedback and unused media apps; setupwraith and launcherx off only after a confirmed Home handover and Wi-Fi ownership check; some branded remote buttons stop working with launcherx off, not yet mapped |+| `rocktek-gb1/` | RockTek GB1 | Google TV 14 | Provisional seven-package list: Android privacy-sandbox services, feedback and unused media apps; setupwraith and launcherx off only after a confirmed Home handover and Wi-Fi ownership check; [gear and Macro buttons restored](rocktek-gb1/README.md) through the device overlay || `sanyo-atv-r2/` | SANYO ATV R2 (SCBC, Realtek RTD285O) | Android TV 9 | S-Channels, E-SHOW demo, Vewd, TV Booster, SANYO OTA || `sankey-smart2ktvse/` | Sankey SMART2KTVSE (Whale OS, SiliconPlayer am30bm) | Android TV 13 | Whale OS (Zeasn) telemetry/services, factory apps, AI voice assistant, ad services, updaters; stock launcher `com.whaletv.launcher` replaced with CleanYourTV; Live TV `com.zeasn.livetv` kept (needed for HDMI inputs); camera `com.android.camera2` disabled (system app, cannot uninstall); MENU+1147 does NOT work on this model; ADB enabled via Activity Launcher app; 1 GB RAM; ADB over WiFi on port 5555 after enabling Developer Options via Activity Launcher app || `sharp-aquos-tve21f/` | SHARP AQUOS TVE21F (AQUOS-TVE21F, banqiao, CVTE/MediaTek), UK | Android TV 14 | Anoki ACR, retail demo, factory/test apps, PAI auto-installs; Google recommendations and setup wizard (Wi-Fi owned by system); Assistant, Chromecast and phone remote off by choice; unused streaming off by choice; 1.8 GB; YouTube button stays with the vendor `com.cvte.hotkey.dispatcher` |diff --git a/examples/rocktek-gb1/README.md b/examples/rocktek-gb1/README.mdnew file mode 100644index 000000000..1e360fbe5--- /dev/null+++ b/examples/rocktek-gb1/README.md@@ -0,0 +1,51 @@+# RockTek GB1++Tested on RockTek GB1, Google TV 14, firmware `UTT1.241206.001.142008`.++## What is in this folder++| File | Purpose |+|---|---|+| `debloat.txt` | The reversible disabled-package list: seven unused/privacy packages plus the setup wizard required for the Home handover. |+| `config.json` | A launcher overlay that restores the two remote controls documented below. Push it with `tools/theme.sh examples/rocktek-gb1` (or `tools/theme.ps1 -TvHost <tv ip> examples/rocktek-gb1`). |++`config.json` is deliberately device-specific. It leaves the built-in launcher defaults unchanged for every+other TV.++## Home handover++Google TV Home is `com.google.android.apps.tv.launcherx`. It was disabled only after+`com.gathin.tvhome` had become Home and stayed there across a reboot. The first-run wizard,+`com.google.android.tungsten.setupwraith`, also has to be disabled on this unit for the replacement Home+to remain active.++Before applying `setupwraith`, check which package owns the saved Wi-Fi network. `tools/disable.sh` and+`disable.ps1` refuse to disable it while it owns that network; forget and rejoin Wi-Fi in TV Settings first.+Re-enable it before a factory reset or remote re-pairing. Casting behaviour after disabling it has not been+tested, so this list makes no claim about Chromecast.++## Remote buttons after Google TV Home++The stock launcher had been handling two physical controls. With it disabled they stopped doing anything;+the optional `HomeKeyService` can consume the framework key events first and start the intended action.+Install with `HOME_KEY_SERVICE=1` (or `-HomeKeyService` in PowerShell), then push this folder's+`config.json`.++| Physical control | Framework event | Restored action |+|---|---|---|+| Settings / gear | `KEYCODE_NOTIFICATION` (83); Linux scan code 240 | Opens the TV's Settings through `settings_key_keycodes` |+| Macro | `KEYCODE_GUIDE` (172) | Opens the installed `com.seena.app` through `app_keys` |++The launcher filters Android `KeyEvent` values, so the overlay uses the delivered keycodes rather than a+raw HID `MSC_SCAN` value. These mappings were verified with the real remote; `input keyevent` over ADB+does not exercise an accessibility key service and is not a valid test.++`HomeKeyService` is optional and a force-stop of the launcher unbinds it. Re-enable the service before+testing again. Check that holding Volume Up and Down still repeats normally before leaving it enabled;+that repeat behaviour has not yet been recorded for this firmware. Other branded buttons are not mapped.++## Verification still needed before submitting upstream++The list, Home handover, reboot and the two buttons above have been checked. Use the box normally for a+few days, then update this note with any package that had to be re-enabled. Test streaming apps you use,+voice, casting and firmware update behaviour explicitly before claiming them preserved or disabled.diff --git a/examples/rocktek-gb1/config.json b/examples/rocktek-gb1/config.jsonnew file mode 100644index 000000000..06264a4f2--- /dev/null+++ b/examples/rocktek-gb1/config.json@@ -0,0 +1,6 @@+{+ "settings_key_keycodes": [83],+ "app_keys": [+ "KEYCODE_GUIDE:com.seena.app"+ ]+}diff --git a/examples/rocktek-gb1/debloat.txt b/examples/rocktek-gb1/debloat.txtindex 8979a6262..97dc6e8e7 100644--- a/examples/rocktek-gb1/debloat.txt+++ b/examples/rocktek-gb1/debloat.txt@@ -20,10 +20,11 @@# charge. Before applying the line, check whether it owns the saved Wi-Fi network: disable.sh will# refuse it while it does. Rejoin the network in Settings first if necessary, and re-enable it before# a factory reset or remote re-pairing.-# - With launcherx disabled, some branded remote buttons which Google TV Home handled no longer work.-# The affected buttons and their keycodes have not been recorded yet, so no key-service mapping is-# claimed here. Test the real remote; see docs/TROUBLESHOOTING.md, "Accessibility helper enabled but-# the remote button does nothing", before adding a mapping.+# - With launcherx disabled, the gear and Macro buttons that Google TV Home handled initially stopped+# working. examples/rocktek-gb1/config.json restores them through HomeKeyService: gear is Android+# keycode 83 and opens TV Settings; Macro is KEYCODE_GUIDE (172) and opens com.seena.app. Enable+# HomeKeyService at installation and test the physical remote, not an injected key. Other branded+# buttons are untested; see examples/rocktek-gb1/README.md before adding a mapping.# Android advertising / personalization and feedbackcom.android.ondevicepersonalization.services