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: add TCL 65C8L (Smart TV Pro, G17, G17_4K_GB, MediaTek tcl9655), Google TV 14, Australia
whitlore05f3fb0e0a87
diff --git a/examples/tcl-65c8l-google-tv/README.md b/examples/tcl-65c8l-google-tv/README.mdnew file mode 100644index 000000000..5791bbe3f--- /dev/null+++ b/examples/tcl-65c8l-google-tv/README.md@@ -0,0 +1,170 @@+# TCL 65" C8L Google TV++Cleaned up on 24 October 2026, on a real unit in one session. Board **G17** (MediaTek tcl9655), product+`G17_4K_GB`, Android 14, firmware `UTT2.250416.001 AU08`. A newer board than the C7L (G08); this list was+checked package by package against the unit with `dumpsys`. Replace `<tv ip>` below with your TV's IP.++What changed:++- **27 apps disabled**, none uninstalled, listed with reasons in [debloat.txt](debloat.txt): TCL tracking+ (Samba TV ACR, BI analytics, logkit), TCL promos / FAST channels / recommendations and the message hub,+ the retail and hotel demo, the e-manual, repair guide and "cleaner", the partner-app auto-installers+ (gtvpai, partnersetup, smartlink.core), Google feedback, the T-Cast bridge, the soundbar updater, a+ preloaded "AstroTV" service, Google's promo screensaver (dreamx), the setup wizard (setupwraith) and the+ stock Google TV home (launcherx).+- **Google TV home replaced** by the clean launcher from `launcher/`: a dock of Netflix, ABC iview, Plex+ and Prime Video, the other apps in a 4-wide grid, and pills for Inputs, Wi-Fi and Settings. Its clock+ screensaver replaces Google's promo screensaver.+- **Remote buttons remapped** (see below), since the stock home answered them.++Kept by this owner: Google Assistant, Chromecast, AirPlay, Miracast, the game bar, the USB media player,+Play Games, YouTube Music, and every installed streaming app.++Checked afterwards: Live TV (coax tuner) starts, the Input button's source panel opens, the four HDMI+inputs are registered (one named "X Box" over CEC), YouTube streams, and the remapped remote buttons work.+All 27 packages stayed disabled after a reboot; nothing re-enabled.++Take a full backup (package lists, settings, `getprop`) into the gitignored `backup/` folder before any change.++## Connecting to the TV++This set offers only **Wireless debugging** (Settings > System > Developer options). There is no plain+port 5555 until you open it: pair with the on-screen code, connect, then switch to TCP:++```+adb pair <tv ip>:<pairing-port> <code>+adb connect <tv ip>:<connect-port>+adb tcpip 5555+adb connect <tv ip>:5555+```++Now `tools/*` can reach it with `TV_HOST=<tv ip>`. A reboot closes 5555; pair again. Each `tools/*.sh`+script has a PowerShell twin (`tools\disable.ps1`, `tools\restore.ps1`, `tools\theme.ps1`,+`launcher\build-and-install.ps1`) that takes `-TvHost <tv ip>`.++## Forget and re-join Wi-Fi first (Wi-Fi-only sets)++`dumpsys wifi` showed the saved network owned by setupwraith (`cname=...setupwraith`). On a Wi-Fi-only+TV, disabling setupwraith deletes that network and drops Wi-Fi and ADB. On the TV, **forget the network+and join it again** in Settings > Network & Internet; ownership moves to `com.android.tv.settings`, and+setupwraith can then be disabled. Its HOME components could not be disabled on their own (shell+`SecurityException`), so the whole package goes.++## Apply the list and install the launcher++1. Apply the list. `tools/disable.sh` skips setupwraith while it owns Wi-Fi and skips launcherx while it+ owns Home, so run it, do step 2, then re-run it to finish those two:++ ```+ TV_HOST=<tv ip> tools/disable.sh examples/tcl-65c8l-google-tv/debloat.txt+ ```++2. Switch the screensaver to the launcher's clock (dreamx is in the list):++ ```+ TV_HOST=<tv ip> tools/tv.py 'settings put secure screensaver_components com.gathin.tvhome/.ClockDream'+ ```++3. Build the launcher and make it Home (JDK 17, Android SDK 34). This disables launcherx with its+ start-first ordering and verifies Home landed on the new launcher (it rolls back if setupwraith grabs+ it, which is why step 1's Wi-Fi/setupwraith handling comes first):++ ```+ TV_HOST=<tv ip> launcher/build-and-install.sh+ ```++4. Push this folder's [config.json](config.json) (dock, columns, Live TV app, remote-button mappings):++ ```+ TV_HOST=<tv ip> tools/theme.sh examples/tcl-65c8l-google-tv+ ```++5. Turn on the key helper so the remapped buttons work (see the trade-off below):++ ```+ TV_HOST=<tv ip> INPUT_KEY_SERVICE=1 RESTORE_KEY_SERVICES=1 launcher/build-and-install.sh+ TV_HOST=<tv ip> tools/theme.sh examples/tcl-65c8l-google-tv+ ```++## Remote buttons++With launcherx disabled, the Settings, TV-guide and app-shortcut buttons go dead. On this BT remote+(BT_RC833A_B2) they all share scancode 240 but send distinct Android keycodes, so they are mapped by+keycode in [config.json](config.json) `app_keys`:++| Button | keycode | opens |+|---|---|---|+| Settings | 83 | `com.android.tv.settings` |+| TV guide | 4001 | `com.tcl.tv` (Live TV) |+| Netflix | 4062 | `com.netflix.ninja` |+| Prime Video | 4099 | `com.amazon.amazonvideo.livingroom` |+| YouTube | 190 | `com.google.android.youtube.tv` |+| TCL | 4020 | *(unmapped)* |++**Trade-off:** `INPUT_KEY_SERVICE=1` runs a key-filtering accessibility service, and on this board that+stops continuous volume-repeat (holding Volume steps once per press). It is all-or-nothing: leave the+helper off to keep volume hold-to-ramp, at the cost of the remapped buttons. The remote's Home, Back,+D-pad, OK, Volume, Mute, Power and Input buttons work either way; the hardware Input button opens the+system source switcher without a helper.++## Re-enable one app++On the TV: **Settings > Apps > See all apps > Show system apps**, pick the app, choose **Enable**. Or:++```+TV_HOST=<tv ip> tools/tv.py 'pm enable com.tcl.waterfall.overseas'+```++Then put a `#` in front of its line in `debloat.txt`. Leave `launcherx` and `setupwraith` disabled while+the new launcher is Home; use the full undo below instead.++## Change the dock or wallpaper++Edit `dock_apps`/`columns` in [config.json](config.json) and push with the step 4 command (no rebuild).+For a wallpaper, put `wallpaper.jpg` (1920×1080) in this folder and add `"wallpaper": true`. On the TV,+hold OK on the Settings pill to reorder the dock. Every key is in `themes/README.md`.++Package names on this unit: Netflix `com.netflix.ninja`, ABC iview `au.net.abc.iview`, Plex+`com.plexapp.android`, Prime Video `com.amazon.amazonvideo.livingroom`, Disney+ `com.disney.disneyplus`,+Kayo `au.com.kayosports.tv`, 7plus `com.swm.live`, 9Now `au.com.ninenow.ctv`, 10 `au.com.tenplay`,+SBS `com.sbs.ondemand.tv`, Spotify `com.spotify.tv.android`, YouTube Music+`com.google.android.youtube.tvmusic`, Live TV `com.tcl.tv`.++## Ad-blocking DNS (optional)++Private DNS to an ad-blocking resolver works on this TV (it does not block YouTube ads):++```+TV_HOST=<tv ip> tools/tv.py 'settings put global private_dns_specifier dns.adguard-dns.com'+TV_HOST=<tv ip> tools/tv.py 'settings put global private_dns_mode hostname'+```++Undo with `settings put global private_dns_mode opportunistic`.++## After a firmware update++```+TV_HOST=<tv ip> tools/check.py examples/tcl-65c8l-google-tv/debloat.txt com.gathin.tvhome+```++Add `--fix` after `check.py` to re-disable whatever came back and put the launcher back on Home.++## Undo everything++```+TV_HOST=<tv ip> tools/restore.sh examples/tcl-65c8l-google-tv/debloat.txt com.google.android.apps.tv.launcherx+TV_HOST=<tv ip> tools/tv.py 'settings delete secure screensaver_components'+```++The first line turns every disabled app back on and makes the Google TV home Home again. The second puts+Google's screensaver back. To remove the new launcher as well, run+`tools/tv.py 'pm uninstall com.gathin.tvhome'`.++## When you're done++Turn off Wireless/USB debugging and **Revoke USB debugging authorisations** in Developer options, restart+the TV, then check the port is closed ("Connection refused" means it worked):++```+tools/adb-closed.py <tv ip>+```diff --git a/examples/tcl-65c8l-google-tv/config.json b/examples/tcl-65c8l-google-tv/config.jsonnew file mode 100644index 000000000..af091e604--- /dev/null+++ b/examples/tcl-65c8l-google-tv/config.json@@ -0,0 +1,13 @@+{+ "dock_apps": ["com.netflix.ninja", "au.net.abc.iview", "com.plexapp.android", "com.amazon.amazonvideo.livingroom"],+ "columns": 4,+ "live_tv_package": "com.tcl.tv",+ "hidden_apps": [],+ "app_keys": [+ "83:com.android.tv.settings",+ "4001:com.tcl.tv",+ "4062:com.netflix.ninja",+ "4099:com.amazon.amazonvideo.livingroom",+ "190:com.google.android.youtube.tv"+ ]+}diff --git a/examples/tcl-65c8l-google-tv/debloat.txt b/examples/tcl-65c8l-google-tv/debloat.txtnew file mode 100644index 000000000..1c55ab7bd--- /dev/null+++ b/examples/tcl-65c8l-google-tv/debloat.txt@@ -0,0 +1,75 @@+# TCL 65C8L Google TV, 2025, Australia (device G17, model "Smart TV Pro", MediaTek tcl9655)+# Android 14 (Google TV), firmware UTT2.250416.001 AU08, product G17_4K_GB.+# Newer board than the C7L (G08): this list started from examples/tcl-65c7l-google-tv/debloat.txt and was+# checked package by package against this unit with dumpsys. Everything is DISABLED, not uninstalled.+#+# Apply: TV_HOST=<tv ip> tools/disable.sh examples/tcl-65c8l-google-tv/debloat.txt+# Undo: TV_HOST=<tv ip> tools/restore.sh examples/tcl-65c8l-google-tv/debloat.txt com.google.android.apps.tv.launcherx+# Comment out any line you want to keep.+#+# ADB: this set offers only Wireless debugging (no plain 5555). Pair with a code, adb connect, then+# `adb tcpip 5555` so tools/tv.py can reach it; a reboot closes 5555 and needs pairing again.+# Stock launcher: com.google.android.apps.tv.launcherx. Live TV / tuner / HDMI app: com.tcl.tv.+# Left alone as load-bearing or unclear: com.tcl.tv / com.tcl.tvinput (Live TV + tuner/HDMI),+# com.tcl.suspension (Input source panel), com.tcl.initsetup (holds the tuner channel-install service),+# com.tcl.globalkeyoverlay (remote keys), com.tcl.systemserver, com.tcl.webview (a WebView provider),+# com.tcl.hearaid (audio), com.tcl.t_solo, com.tcl.useragreement, com.tcl.factory.view (factory - never touch).+# Kept by this owner: Google Assistant (katniss), Chromecast (mediashell), AirPlay (tcl.airplay2 ++# com.mediatek.AirplayAPK + com.mediatek.airplaydaemon), Miracast (tcl.miracast), the game bar, the USB+# media player (ui_mediaCenter), Play Games, YouTube Music, and every installed streaming app.+#+# Tested 2026-10-24 on a real unit in one session, applied in batches with screenshots between them: Home,+# the Input source panel, Live TV, the HDMI inputs, YouTube with AdGuard Private DNS and the remapped remote+# buttons all kept working. All 27 packages stayed disabled after a reboot; nothing re-enables at boot.+#+# Known quirks on this firmware:+# - The saved Wi-Fi network belonged to setupwraith (dumpsys wifi: cname=...setupwraith). This TV is Wi-Fi+# only, so forget the network and join it again in Settings (owner moves to com.android.tv.settings)+# BEFORE setupwraith is disabled, or the TV drops off Wi-Fi and ADB. setupwraith's HOME components could+# not be disabled on their own (shell SecurityException), so the whole package goes.+# - With launcherx gone, the Settings, TV-guide and app-shortcut buttons go dead. They are remapped in this+# folder's config.json app_keys by Android keycode (all share scancode 240): Settings 83, TV guide 4001,+# Netflix 4062, Prime Video 4099, YouTube 190 (the TCL button is 4020, left unmapped). This needs+# INPUT_KEY_SERVICE=1, and on this board the key-filter service stops continuous volume-repeat (hold-to-ramp+# becomes one step per press) - a trade, not a fault. Leave the helper off to keep volume repeat.++# TCL telemetry and analytics+com.tcl.ttvs # Samba TV ACR viewing tracking, TCL BI analytics+com.tcl.logkit # log capture and upload+com.tcl.usercenter # TCL account sign-in nags++# TCL content, ads and promos+com.tcl.channelplus # TCL Live FAST channels+com.tcl.tv.tclhome_passive # pushes TCL content to the home screen at boot+com.tcl.partnercustomizer # TCL tweaks to Google TV home rows+com.tcl.interactive # TCL TIAS background service+com.tcl.messagebox # TCL push messages and promos+com.tcl.waterfall.overseas # TCL movie/show recommendation browser+com.tcl.dashboard # TCL message/notification promo hub (MessageExtService + DismissService)+com.mirakulo.astrotv.service # preloaded "AstroTV" content service++# Retail demo / hotel mode+com.tcl.exhibit # retail demo+com.tcl.esticker # retail e-sticker overlay+com.tcl.hotelmenu # hotel mode menu++# Preloaded apps and services+com.tcl.ocean.instructions # e-manual+com.tcl.repairguide # repair guide+com.tcl.guard # TCL "cleaner" / app manager+com.tcl.smartlink.core # TCL CustomInstallService (silent partner-app installer)+android.autoinstalls.config.google.gtvpai # silently installs partner apps+com.google.android.partnersetup # partner attribution+com.google.android.feedback # Google feedback uploader+com.android.tv.feedbackconsent # feedback consent prompt+com.tcl.magiconnectfree # TCL T-Cast phone-app bridge+com.tcl.UpdatePeripheral # TCL soundbar/speaker firmware updates (no TCL audio gear here)++# Launcher handover. Disable these only AFTER launcher/ is installed and set as Home.+# setupwraith: forget and re-join the Wi-Fi network first (see header), or the TV drops off Wi-Fi.+# dreamx: set screensaver_components to com.gathin.tvhome/.ClockDream first.+# launcherx: with it gone, setupwraith's RecoveryActivity claims HOME; launcher/build-and-install.sh+# disables launcherx with its start-first ordering and will skip it until the new launcher owns Home.+com.google.android.tungsten.setupwraith+com.google.android.apps.tv.dreamx+com.google.android.apps.tv.launcherxdiff --git a/examples/tcl-65c8l-google-tv/tv.json b/examples/tcl-65c8l-google-tv/tv.jsonnew file mode 100644index 000000000..ce5cb42d9--- /dev/null+++ b/examples/tcl-65c8l-google-tv/tv.json@@ -0,0 +1,6 @@+{+ "tv": "TCL 65C8L (Smart TV Pro, G17, G17_4K_GB, MediaTek tcl9655), 2025, Australia",+ "os": "Google TV 14",+ "brand": "TCL",+ "notes": "First G17 board (firmware UTT2.250416.001 AU08), checked against the C7L list package by package; Samba TV ACR, TCL promos/FAST channels and the message hub, store/hotel demo, partner auto-installs, soundbar updater, a preloaded AstroTV service; Assistant, Chromecast, AirPlay, Miracast, game bar, USB media and Play Games kept; Wireless debugging only (pair, then `adb tcpip 5555`); setupwraith owned the Wi-Fi network, re-join before disabling it; Settings/TV-guide/Netflix/Prime/YouTube buttons remapped by keycode in config.json (all share scancode 240), and the key helper costs continuous volume-repeat on this board; AdGuard Private DNS works; 27 packages survived a reboot; single-session test"+}