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 G08_4K_GB (Smart TV Pro), Google TV 14, zh-TW firmware
Your Namefd23804065cb
diff --git a/README.md b/README.mdindex 8981a502e..633df736a 100644--- a/README.md+++ b/README.md@@ -295,6 +295,7 @@ Anker Nebula, BYINTEK, Epson, Gadnic, JMGO, Portronics, Stellamore, Wanbo and XG| TCL Smart TV Pro (G05, G05_4K_US, MediaTek MT5889) | Google TV 11 || TCL Smart TV Pro (G08, G08_4K_GB, MediaTek), Australian firmware | Google TV 12 || TCL Smart TV Pro (G08, G08_4K_GB, MediaTek), Europe/UK firmware | Android TV 12 |+| TCL Smart TV Pro (G08, G08_4K_GB, MediaTek), Taiwan firmware | Google TV 14 || TCL Smart TV Pro (G09, G09_4K_GB, Amlogic T5M, 2 GB), UK firmware, Brazil | Google TV 12 || TCL UnionTV, Latin America (TCL-built like Thomson 32HE5800, Realtek RT2841) | Android TV 9 || Tele System TS ON T2/HD (ONT2HD, SDMC, Amlogic), Italy | Android TV 11 |diff --git a/examples/README.md b/examples/README.mdindex 345a0002d..a7d2d4953 100644--- a/examples/README.md+++ b/examples/README.md@@ -171,6 +171,7 @@ on that firmware, grouped and commented. These are starting points: comment out| `tcl-q7c-google-tv/` | TCL Q7C (Smart TV Pro, G08, G08_4K_GB, MediaTek tcl9618), European firmware | Google TV 14 | Same build as the 85RM7L list (AU02), with the launcher: TCL promos, home pushes, Channel+/waterfall, account, TGuard cleaner, log capture, Android 14 ad and privacy services, manual/repair/hearing/solo apps, soundbar updater, Alexa; Assistant, AirPlay, Miracast/T-Cast, Netflix, Prime Video, Google TV and Play Games off by choice; ttvs, Chromecast, game bar and dreamx kept; launcherx and setupwraith off (Ethernet, FORCE_SETUPWRAITH=1); every remote button is scancode 240, keycodes in the README (Settings 83, YouTube 190); the debugging switch did not close port 5555, check adb_enabled; reboot-checked || `tcl-g08-eu-android12/` | TCL Smart TV Pro (G08, G08_4K_GB, MediaTek), Europe/UK firmware | Android TV 12 | Older EU G08 build (STT2.221228.001 AS34): the US list applies only partially — no Samba-ACR ttvs payload, no AirplayAPK, no hotelmenu/TV+/e-sticker preloads, no Android 14 ad services. TCL pushes/demo/help, duplicate webviews, Mediatek casting leftovers, Play Movies, TTS, dreamx, printspooler; suspension/interactive/ttvs listed as DO-NOT-DISABLE (they host the Source-key QuickPanel and the TIAS source overlay — disabling kills the remote Source key, verified fix on a live set); stock launcher kept; debloat only || `tcl-g08-au-android12/` | TCL Smart TV Pro (G08, G08_4K_GB, MediaTek), Australian firmware | Google TV 12 | Same fingerprint as the EU G08 list (STT2.221228.001 AS34) plus the Australian preloads: Stan, AirPlay (kept), TCL Channel, TCL Live free channels (channelplus), e-sticker, hotel portal, TCL Guard; no Google Cast or voice assistant. Launcher with HomeKeyService: Settings, TV (HDMI 1), YouTube→SmartTube and Netflix→Plex buttons mapped, at the cost of volume repeat (measured on this G08 too). No aerial, so with channelplus off there is no Live TV: the tuner only holds TCL Live IP channels and falls back to HDMI 1 |+| `tcl-g08-4k-gb/` | TCL Smart TV Pro (G08, G08_4K_GB, MediaTek), Taiwan firmware | Google TV 14 | Same G08_4K_GB board and UTT2.250416.001 AU02 build as the Q7C list, zh-TW region and preloads: TCL telemetry/logging, content waterfall, dashboard, e-sticker, hotel menu, EULA, repair/instructions and the Ginga middleware; Android 14 ad, privacy and federated-learning services; health, UWB, camera, print and wallpaper modules; Miracast/MagicConnect and the phone remote off, AirPlay kept; Google Cast is unavailable on this set (mediashell ships disabled and the shell cannot enable it); launcherx and setupwraith off for a custom launcher; 36 packages, five days of use || `tcl-ak30a5/` | TCL ak30a5 (China, Amlogic) | Android TV 9 | No Google services, TCL boot ad + analytics, no TvInputManager, installs via USB only; debloat only, third-party launchers cannot be installed on this firmware || `tcl-beyondtv/` | TCL BeyondTV (India) | Android TV 9 | TCL analytics, content feed, TCL app store, Google recommendation rows; Jio/Airtel/Hotstar apps untouched || `tcl-beyondtv-pl/` | TCL BeyondTV, Poland (Realtek RTD2851, AP03, 2 GB) | Android TV 9 | TCL BI analytics, promo rows, cyberui, TV Guard and app store, preloads; voice, Miracast/T-Cast, YouTube, player.pl, Spotify and Steam Link off by choice; Chromecast and firmware updater kept; `com.tcl.notereminder` is re-enabled at every boot; launcher installed as default home, stock launcher disabled; one session plus a reboot, not yet lived with for days |diff --git a/examples/tcl-g08-4k-gb/README.md b/examples/tcl-g08-4k-gb/README.mdnew file mode 100644index 000000000..70115cd1e--- /dev/null+++ b/examples/tcl-g08-4k-gb/README.md@@ -0,0 +1,98 @@+# TCL G08_4K_GB — "Smart TV Pro" (4K)++| | |+|---|---|+| OS | Google TV, Android 14 / SDK 34 |+| Firmware | `tcl9618-user 14 UTT2.250416.001 AU02 release-keys` |+| Region | zh-TW |+| Stock launcher | `com.google.android.apps.tv.launcherx` — Google TV, not Android TV's `com.google.android.tvlauncher` |+| Live TV app | `com.tcl.tv` (`com.tcl.player.TVActivity`) |+| Packages | 154 installed, none disabled out of the box |++`debloat.txt` is the exact list applied, 36 packages. `config.json` is the dock that was built into the+launcher. Two other G08 folders exist; this one is the `G08_4K_GB` board on the **Google TV 14** branch+(`UTT2.250416.001`), which is neither the Android TV 12 (`STT2.221228.001`) EU/UK build nor the+`G08_4K_US` one.++## Replacing the Home key takes two packages, and `setupwraith` is the one people miss++```bash+pm disable-user --user 0 com.google.android.apps.tv.launcherx # the Google TV launcher+pm disable-user --user 0 com.google.android.tungsten.setupwraith # the blocker — see below+```++`setupwraith`'s `RecoveryActivity` declares `CATEGORY_HOME` too, with `priority=1` — deliberately just+above the default (`0`) — so it beats any third-party launcher the moment the stock one is disabled. The+TV then boots into a black "setup recovery" screen with a broken Home key. Disabling the whole package is+the only way to make the custom launcher the sole HOME candidate.++**Re-enable it (`pm enable com.google.android.tungsten.setupwraith`) before a factory reset** or before+running the Google TV setup wizard again.++## Four other routes to the Home key do not work on this firmware++All four were tried on a live set; don't spend time on them.++| Route | Result |+|---|---|+| `cmd package set-home-activity --user 0 <component>` | Prints `Success`, but nothing changes: `resolve-activity` still returns the old launcher and no preferred activity is recorded. A no-op on this build. |+| `android:priority` on the HOME `<intent-filter>` | Ignored for third-party apps. The installed APK was pulled back and verified to carry `priority="2"`, then `"1000"`; the package manager still reported `priority=0` and kept resolving to `setupwraith`. |+| `cmd role add-role-holder android.app.role.HOME <pkg>` | Succeeds — `dumpsys role` shows `holders=<pkg>` — but HOME resolution ignores it. |+| `pm disable-user <setupwraith>/<...>.RecoveryActivity` | Refused: `SecurityException: Shell cannot change component state for ...` |++## The Inputs menu and this set's TV app++Tapping an HDMI entry in the launcher's Inputs menu once killed the TV app outright:++```+NumberFormatException: For input string: "com.tcl.tvinput/.TvPassThroughService/HDMI110008"+ at com.tcl.player.intentprocess.processor.TuneChannelIntentProcessor.process+```++`TvContract.buildChannelUriForPassthroughInput()` is the documented way to tune a passthrough input, but+TCL's TV app runs `ContentUris.parseId()` over the URI's last path segment — which for a passthrough input+is the input id, not a number. It throws in `onNewIntent`, the app dies, and the input switch dies with it.+That intent has exactly **one** handler on this set (`com.tcl.tv/.player.TVActivity`, for both+`vnd.android.cursor.item/channel` and `...dir/channel`), so there is no alternative route to fall back to:++- `android.media.tv.action.SETUP_INPUTS` opens TCL's *streaming channels* setup screen, not the HDMI list.+- `com.tcl.action.HDMI_ACTIVE_SOURCE` (handled by `com.tcl.tv/.receiver.HdmiControllerReceiver`) is what the+ CEC stack broadcasts when a device becomes the active source. Its extra is a Parcelable device info, so+ it cannot be forged from an app or from the shell.++The same intent (ACTION_VIEW with the channel URI and `vnd.android.cursor.item/channel`) switched cleanly to+HDMI 1 and HDMI 2 on a later run of the same set with launcher 2.6, with no crash, so the failure depends on+something we did not reproduce. Recorded because it was seen; switch inputs with the remote's input key+either way.++## Windows notes++- **Piping a command list into `tv.py --batch` from PowerShell** prepends a UTF-8 BOM that the device shell+ rejects (`sh: pm: inaccessible or not found`) — the *first* command silently never runs. Redirect from+ `cmd` or bash instead. Git Bash has the opposite trap: MSYS rewrites `/sdcard/...` arguments into Windows+ paths, so `tv.py --pull /sdcard/x.png` fails with `open failed: No such file or directory`. Use+ PowerShell for pulls.+- The repo's `.sh` helpers hard-code `tools/venv/bin/python`; a Windows venv keeps it in+ `tools/venv/Scripts/`. Use the PowerShell twins (`disable.ps1`, `restore.ps1`) or drive `tools/tv.py`+ directly.++## Other notes++- **After debloating, the launcher's app grid is empty** — all remaining apps with a Leanback launcher+ intent are either in the dock or in `hidden_apps`. The grid fills up again as apps are installed.+- **Kept on purpose**: `com.tcl.airplay2`, `com.mediatek.AirplayAPK`, `com.mediatek.airplaydaemon`+ (AirPlay), `com.tcl.UpdatePeripheral` (accessory firmware), `com.tcl.systemserver` (system update path,+ must not be disabled).+- **Casting**: AirPlay is kept, Miracast (`com.tcl.miracast`) and TCL MagicConnect+ (`com.tcl.magiconnectfree`) are off. Google Cast is not available on this set: `mediashell` ships+ disabled and the shell cannot enable it (`Shell cannot change component state for null to 1`).+- **No standalone system-OTA package exists** on this firmware. The only update package is+ `com.tcl.UpdatePeripheral` (peripherals).++## Restore++```powershell+.\tools\restore.ps1 -TvHost <tv ip> examples\tcl-g08-4k-gb\debloat.txt -Stock com.google.android.apps.tv.launcherx+```++Then press Home — the Google TV launcher comes back.diff --git a/examples/tcl-g08-4k-gb/config.json b/examples/tcl-g08-4k-gb/config.jsonnew file mode 100644index 000000000..07578df1e--- /dev/null+++ b/examples/tcl-g08-4k-gb/config.json@@ -0,0 +1,15 @@+{+ "dock_apps": [+ "hami.androidtv",+ "com.google.android.youtube.tv",+ "com.tcl.ui_mediaCenter",+ "com.android.vending"+ ],+ "hidden_apps": [+ "com.android.tv.settings",+ "com.tcl.guard",+ "com.tcl.suspension"+ ],+ "live_tv_package": "com.tcl.tv",+ "columns": 4+}diff --git a/examples/tcl-g08-4k-gb/debloat.txt b/examples/tcl-g08-4k-gb/debloat.txtnew file mode 100644index 000000000..4cb75c433--- /dev/null+++ b/examples/tcl-g08-4k-gb/debloat.txt@@ -0,0 +1,76 @@+# TCL G08_4K_GB ("Smart TV Pro", 4K), Google TV, Android 14 / SDK 34, firmware UTT2.250416.001 AU02+# Region: zh-TW. 154 packages installed, none disabled at the time this list was written.+#+# Apply: TV_HOST=<tv ip> tools/disable.sh examples/tcl-g08-4k-gb/debloat.txt+# Undo: TV_HOST=<tv ip> tools/restore.sh examples/tcl-g08-4k-gb/debloat.txt+# Everything is DISABLED, not uninstalled. Comment out any line you want to keep.+#+# This TV needs TWO packages disabled before the custom launcher can own the Home key,+# plus one role grant. See the LAUNCHER REPLACEMENT section at the bottom.++# --- TCL telemetry / analytics -------------------------------------------------+com.tcl.logkit # TCL logging + telemetry++# --- Google telemetry / ads ----------------------------------------------------+com.google.android.feedback # "send feedback" service+com.google.android.partnersetup # carrier/partner customisation on first boot+com.android.adservices.api # Privacy Sandbox ads API (no use on a TV)+com.android.ondevicepersonalization.services # on-device ad personalisation+com.android.federatedcompute.services # federated learning (telemetry)++# --- TCL content rows, promos, demo/store apps ---------------------------------+com.tcl.waterfall.overseas # TCL content waterfall / recommendation feed+com.tcl.dashboard # TCL dashboard+com.tcl.exhibit # "T-Exhibition" store/demo app+com.tcl.tv.tclhome_passive # passive home content+com.tcl.partnercustomizer # partner skin/customisation+com.tcl.interactive # TCL interactive services+com.tcl.channelplus # TCL channel promo+com.tcl.esticker # stickers+com.tcl.ocean.instructions # e-manual / instructions+com.tcl.repairguide # repair guide+com.tcl.t_solo # "listen alone" Bluetooth mode+com.tcl.hotelmenu # hotel mode menu+com.tcl.useragreement # EULA screen+tv.mopa.ginga # Ginga interactive-TV middleware (Brazil only)++# --- Streaming apps not used (confirmed) ---------------------------------------+com.netflix.ninja+com.netflix.tokenmanager+com.amazon.amazonvideo.livingroom++# --- Casting: AirPlay kept, everything else off --------------------------------+com.tcl.miracast # Miracast+com.tcl.magiconnectfree # TCL MagicConnect screen mirroring+com.google.android.tv.remote.service # Google TV phone-app virtual remote+# KEPT on purpose: com.tcl.airplay2, com.mediatek.AirplayAPK, com.mediatek.airplaydaemon++# --- Voice assistant not used (confirmed) --------------------------------------+com.tcl.eva # TCL voice assistant. Note: this TV has no Google+ # Assistant (com.google.android.katniss is not installed).++# --- Android modules with no purpose on a TV -----------------------------------+com.android.healthconnect.controller+com.android.health.connect.backuprestore+com.android.uwb.resources # no UWB radio+com.android.cameraextensions # no camera+com.android.printspooler # no printing+com.android.wallpaperbackup+com.google.android.syncadapters.calendar # calendar sync++# --- LAUNCHER REPLACEMENT (required on this firmware) --------------------------+# The stock Google TV launcher.+com.google.android.apps.tv.launcherx+#+# ALSO REQUIRED: com.google.android.tungsten.setupwraith+# Its RecoveryActivity declares CATEGORY_HOME with priority=1, deliberately just above the+# default (0), so it beats any third-party launcher. On this firmware none of the normal+# routes work: `cmd package set-home-activity` returns Success but is a no-op, the manifest's+# android:priority is ignored for third-party apps (PM still reports 0 even with 1000 in the+# APK), and `cmd role add-role-holder android.app.role.HOME` succeeds without affecting HOME+# resolution. Disabling only the RecoveryActivity component is refused by the shell+# (SecurityException). Disabling the whole package is the only way, and it makes the custom+# launcher the sole HOME candidate.+# Re-enable it with `pm enable com.google.android.tungsten.setupwraith` before a factory+# reset or before re-running the Google TV setup wizard.+com.google.android.tungsten.setupwraith