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/tcl-43c645: drop its own install and restore scripts for the shared tools, which keep the Wi-Fi guard and the undo record (#1717)
Gathin23817af1086a97
diff --git a/examples/README.md b/examples/README.mdindex 86519c8bf..666f9c419 100644--- a/examples/README.md+++ b/examples/README.md@@ -224,7 +224,7 @@ on that firmware, grouped and commented. These are starting points: comment out| `tcl-32sf560-fire-tv/` | TCL 32SF560 (TCL Fire TV, AFTSHN02, shine) | Fire OS 7.7.1.7 / Android 9 | Same build as `toshiba-fire-tv-aftha004/`: Amazon ACR, metrics and log uploads, ad ID and bidding, Shopping, demo content, tutorials, promos, recommendation rows, Silk, account sync, dummy placeholders and the Alexa helpers (`com.amazon.vizzini` returns at every boot and is not listed); Miracast/DIAL receivers, printing and the forced-OTA promoter off by choice; OTA itself protected and running; Live TV, tuner and input stack, AirPlay, Appstore, Prime Video, sideloads and the stock launcher kept; debloat only, reboot-checked || `tcl-g06-google-tv-indonesia/` | TCL 40" Smart TV (G06, MediaTek MT9221 / T221, AR2101, V8-T221T02-LF1V058), Indonesia | Google TV 11 | First T02 (Indonesia) firmware: TCL promos, popups, dashboard, TGuard, hotel menu, Google partner plumbing, voice assistant, Chromecast, USB player and unused preloads (Prime Video, WeTV, OTTPlay, File Commander) off; YouTube, Netflix, Vidio, launcherx, ttvs and the phone remote kept; usercenter comes back at every boot; debloat only, from Termux on a phone || `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); also TCL 50C635 / 60C635 (G03_4K_GB, Realtek rtd288o), Spain | Google TV launcher on Android TV 11 | TCL BI/TTVS/logkit analytics, promos and content rows, TCL Live FAST channels, Google partner plumbing, setupwraith (takes HOME once the stock launcher is off), unused preloads; voice assistant, firmware updater and Miracast off by choice; Chromecast kept; Netflix/YouTube/Prime buttons fixed with app_keys 4062/4065/4099, TCL (4020) and gear (4077) buttons open Settings; config.json, build-and-install and restore scripts; tested on real 43", 50" and 60" units |+| `tcl-43c645/` | TCL 43C645 (Smart TV Pro, Realtek RTD2851 / R51MT05, V8-R51MT05-LF1V652); also TCL 50C635 / 60C635 (G03_4K_GB, Realtek rtd288o), Spain | Google TV launcher on Android TV 11 | TCL BI/TTVS/logkit analytics, promos and content rows, TCL Live FAST channels, Google partner plumbing, setupwraith (takes HOME once the stock launcher is off), unused preloads; voice assistant, firmware updater and Miracast off by choice; Chromecast kept; Netflix/YouTube/Prime buttons fixed with app_keys 4062/4065/4099, TCL (4020) and gear (4077) buttons open Settings; config.json for tools/theme.sh; tested on real 43", 50" and 60" units || `tcl-43ep660/` | TCL 43EP660 (Europe, BeyondTV, Realtek rtd285o, V8-R851T02-LF1V378) | Android TV 9 | TCL BI analytics, user center, TCL Channel, message box, stickers, TV Guard, T-Cast, app store, USB players; voice and Miracast off by choice, Chromecast and updaters kept; stock launcher has HOME priority 2, so it must be disabled; setupwraith owns the setup Wi-Fi and does not claim HOME, so it stays; `StartandroidService` kept (device authentication) || `tcl-43p615/` | TCL 43P615 (Europe, BeyondTV, Realtek RTD2851, AR06) | Android TV 11 | Sibling of the BeyondTV2 Android 11 above (AR05); same TCL set plus dashboard, useragreement, copydatatotv and notereminder; **`com.google.android.videos` re-enables on every boot** (and YouTube came back via a Play update), `usercenter` stays off unlike the Android 9 RTD2851 sets; 2 HDMI + AV through TvInputManager, Inputs pill works, setupwraith does not claim HOME; voice, Miracast/MagiConnect, stock screensaver and TCL Dashboard off by choice, Chromecast, OTA and phone remote kept; launcher installed and reboot-checked, TV Bro replaces a Play-installed white-label browser || `tcl-43p725/` | TCL 43P725 (Smart TV Pro, BeyondTV4, Realtek rtd288o), Italy | Android TV 11 | TCL BI analytics, TGuard, promo content feeds and messages, retail demo, sticker, notereminder; `com.tcl.overseasappshow` must be disabled first to prevent promo packages re-enabling on boot; `com.google.android.tungsten.setupwraith` owns the setup Wi-Fi (do not disable); hardware inputs and Live TV kept; AdGuard Private DNS works; launcher works with 4-app dock |diff --git a/examples/tcl-43c645/README.md b/examples/tcl-43c645/README.mdindex a7cef2145..c93b4a12b 100644--- a/examples/tcl-43c645/README.md+++ b/examples/tcl-43c645/README.md@@ -24,17 +24,19 @@ If you try them, say how it went in an issue.|---|---|| `debloat.txt` | Groups 1-3 (both TVs' telemetry, promos and extras, setupwraith), 4 (more TCL telemetry, content and unused preloads) and 5 (voice assistant, by choice) || `config.json` | Launcher overlay for these TVs: dock, Live TV app, remote buttons |-| `build-and-install.sh` | Builds `launcher/`, installs it, pushes `config.json`, makes it Home, disables launcherx and setupwraith, switches the key services on |-| `restore.sh` | Re-enables everything in `debloat.txt`, gives Home back to launcherx, switches the key services off (`--uninstall` also removes the launcher) |++This folder used to ship its own `build-and-install.sh` and `restore.sh`. They skipped the shared tools' Wi-Fi+guard and the record that undo works from (#1717), so use the shared ones:```sh-TV_HOST=<tv ip> tools/disable.sh examples/tcl-43c645/debloat.txt # or one group at a time-TV_HOST=<tv ip> examples/tcl-43c645/build-and-install.sh-TV_HOST=<tv ip> examples/tcl-43c645/restore.sh # undo+TV_HOST=<tv ip> tools/disable.sh examples/tcl-43c645/debloat.txt # or one group at a time+TV_HOST=<tv ip> HOME_KEY_SERVICE=1 INPUT_KEY_SERVICE=1 launcher/build-and-install.sh+TV_HOST=<tv ip> tools/theme.sh examples/tcl-43c645 # dock, Live TV app, remote buttons+TV_HOST=<tv ip> tools/restore.sh examples/tcl-43c645/debloat.txt com.google.android.apps.tv.launcherx # undo```-The scripts use the stock `adb` from platform-tools (`$ANDROID_HOME/platform-tools/adb`). On WSL2 the adb-daemon hung while forking; `adb -P 15037 nodaemon server` in another terminal plus `ADB_PORT=15037` worked.+On WSL2 the adb daemon hung while forking; `adb -P 15037 nodaemon server` in another terminal plus+`ADB_PORT=15037` worked.## Re-enable one app@@ -46,7 +48,7 @@ adb shell pm enable <package> # e.g. com.tcl.ui_mediaCenter for USB dri## Change the dock order or the wallpaper-Edit `dock_apps` in `config.json` (four package names, left to right) and run `build-and-install.sh` again.+Edit `dock_apps` in `config.json` (four package names, left to right) and run `tools/theme.sh examples/tcl-43c645` again.Package names: `adb shell pm list packages -3`.For a wallpaper, copy this folder's `config.json` into a theme folder, add `"wallpaper": true` and a dark@@ -79,7 +81,7 @@ remote. Injected keys never reach the accessibility services, so `input keyevent- **Accessibility services after a reinstall**: Android unbinds them on reinstall and binds them again onlywhen `enabled_accessibility_services` changes. Writing the same value back leaves them enabled but unbound- and the remote buttons dead, so `build-and-install.sh` clears the list first. Do not `am force-stop` the+ and the remote buttons dead, so the old per-folder script cleared the list first (the shared tools check the helpers are bound, #1237). Do not `am force-stop` thelauncher: the services land in "Crashed services" until the next reinstall.- `TclAppBoot` refuses to bind services of packages without TCL's `OP_AUTO_START` while their process is notrunning (`callee_does't_have_OP_AUTO_START_permission` in logcat). After a cold reboot the launcher'sdiff --git a/examples/tcl-43c645/debloat.txt b/examples/tcl-43c645/debloat.txtindex bf13022c8..fdc11ea8c 100644--- a/examples/tcl-43c645/debloat.txt+++ b/examples/tcl-43c645/debloat.txt@@ -20,7 +20,6 @@## Apply: TV_HOST=<tv ip> tools/disable.sh examples/tcl-43c645/debloat.txt# Undo: TV_HOST=<tv ip> tools/restore.sh examples/tcl-43c645/debloat.txt com.google.android.apps.tv.launcherx-# (or examples/tcl-43c645/restore.sh, which also gives Home back to launcherx)# Everything is DISABLED, not uninstalled. Comment out any line you want to keep.## Stock launcher: com.google.android.apps.tv.launcherx. HOME fallback com.google.android.tungsten.setupwraithdiff --git a/examples/tcl-43c645/tv.json b/examples/tcl-43c645/tv.jsonindex a2aeb6b9f..e05d6caff 100644--- a/examples/tcl-43c645/tv.json+++ b/examples/tcl-43c645/tv.json@@ -2,5 +2,5 @@"tv": "TCL 43C645 (Smart TV Pro, Realtek RTD2851 / R51MT05, V8-R51MT05-LF1V652); also TCL 50C635 / 60C635 (G03_4K_GB, Realtek rtd288o), Spain","os": "Google TV launcher on Android TV 11","brand": "TCL",- "notes": "TCL BI/TTVS/logkit analytics, promos and content rows, TCL Live FAST channels, Google partner plumbing, setupwraith (takes HOME once the stock launcher is off), unused preloads; voice assistant, firmware updater and Miracast off by choice; Chromecast kept; Netflix/YouTube/Prime buttons fixed with app_keys 4062/4065/4099, TCL (4020) and gear (4077) buttons open Settings; config.json, build-and-install and restore scripts; tested on real 43\", 50\" and 60\" units"+ "notes": "TCL BI/TTVS/logkit analytics, promos and content rows, TCL Live FAST channels, Google partner plumbing, setupwraith (takes HOME once the stock launcher is off), unused preloads; voice assistant, firmware updater and Miracast off by choice; Chromecast kept; Netflix/YouTube/Prime buttons fixed with app_keys 4062/4065/4099, TCL (4020) and gear (4077) buttons open Settings; config.json for tools/theme.sh; tested on real 43\", 50\" and 60\" units"}diff --git a/tests/test_restore_references.py b/tests/test_restore_references.pyindex 9396259c1..79aa7060d 100644--- a/tests/test_restore_references.py+++ b/tests/test_restore_references.py@@ -202,15 +202,15 @@ class RestoreReferencesTest(unittest.TestCase):"than the list shows")def test_a_folder_script_a_page_names_is_there(self):- # examples/epson-ls800, anker-nebula-d2426 and tcl-43c645 ship the install and restore scripts- # they came with, and their pages name them; the TCL 55S470G header named one its folder does- # not have, so an owner's first undo command was "No such file".+ # examples/epson-ls800 ships the restore script it came with, and its page names it (tcl-43c645+ # dropped its own scripts for the shared tools, #1717); the TCL 55S470G header named one its+ # folder does not have, so an owner's first undo command was "No such file".missing = [(str(path), name) for path, name in read_script_references(ROOT)if not (ROOT / name).is_file()]self.assertEqual([], missing,"these lines hand the owner a script inside a list folder that is not in the ""repo, so the command fails before anything reaches the TV")- self.assertGreaterEqual(len(read_script_references(ROOT)), 4,+ self.assertGreaterEqual(len(read_script_references(ROOT)), 2,"the folders that do ship such a script should be read; the scanner ""found fewer")