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
Fix Home crash loop on Google TV 14 when disabling launcherx
hieu.sats39990fb7018e
diff --git a/README.md b/README.mdindex c0eb26820..ab4375943 100644--- a/README.md+++ b/README.md@@ -111,6 +111,7 @@ Lists that people have tested and contributed live in [`examples/`](examples/):| Sony BRAVIA XBR-65X900E (2017) | Android TV 9 || NVIDIA SHIELD TV Pro 2019 (P2897) | Android TV 11 || Xiaomi MiTV-MOOR2 (venom) | Google TV 11 |+| Xiaomi TV A Pro 75" 2026 (MiTV-MZTU0) | Google TV 14 |Your TV not here? The prompt works regardless, it discovers the bloat itself. If you add yourlist afterwards, the next person with your model skips that step. See@@ -236,6 +237,12 @@ Things that bit us or contributors, so they don't bite you.`com.google.android.tungsten.setupwraith` package is what frees the slot. It is the first-runsetup wizard, so everyday use is unaffected, but re-enable it before a factory reset - list it inyour `debloat.txt` and `tools/restore.sh` does that for you.+- **The TV drops off Wi-Fi every minute right after the install**, seen on Google TV 14 (Xiaomi+ MiTV-MZTU0): the same setupwraith `.RecoveryActivity` took Home and system_server crash-looped+ on it. The install script now starts the new launcher before disabling the stock one, sets the+ home preference last (Android drops it whenever the set of HOME apps changes) and prints what+ HOME resolves to; disable setupwraith as above. If you're already in the loop:+ `tools/tv.py 'pm enable --user 0 com.google.android.apps.tv.launcherx'`.- **No on-screen keyboard** after switching launchers, seen on Xiaomi: the default input methodpointed at a Baidu keyboard that isn't installed. Fix:`tools/tv.py 'ime set com.google.android.inputmethod.latin/com.android.inputmethod.latin.LatinIME'`diff --git a/examples/README.md b/examples/README.mdindex e613867ca..4cacbf597 100644--- a/examples/README.md+++ b/examples/README.md@@ -20,6 +20,7 @@ on that firmware, grouped and commented. These are starting points: comment out| `tcl-beyondtv/` | TCL BeyondTV (India) | Android TV 9 | TCL analytics, content feed, TCL app store, Google recommendation rows; Jio/Airtel/Hotstar apps untouched || `nvidia-shield-tv-pro-2019/` | NVIDIA SHIELD TV Pro 2019 (P2897, mdarcy) | Android TV 11 | NVIDIA telemetry, GameStream leftovers, sponsored rows, partner auto-installs || `xiaomi-mitv-moor2/` | Xiaomi MiTV-MOOR2 (venom, MediaTek) | Google TV 11 | Mi ad row and PatchWall, Mi analytics, MiLink, store demo; setup wizard off so a third-party launcher can own Home |+| `xiaomi-tv-a-pro-2026/` | Xiaomi TV A Pro 75" 2026 (MiTV-MZTU0, river, MediaTek) | Google TV 14 | PatchWall/Mi Home tab, Mi analytics, TV Manager, updaters; setup wizard off, launcherx crash-loop notes |To add your TV, see [CONTRIBUTING.md](../CONTRIBUTING.md). The quickest way to get a list is torun the prompt in [PROMPT.md](../PROMPT.md) and copy the packages your assistant disabled.diff --git a/examples/xiaomi-tv-a-pro-2026/debloat.txt b/examples/xiaomi-tv-a-pro-2026/debloat.txtnew file mode 100644index 000000000..d1e37b9fb--- /dev/null+++ b/examples/xiaomi-tv-a-pro-2026/debloat.txt@@ -0,0 +1,62 @@+# Xiaomi TV A Pro 75" 2026 (MiTV-MZTU0, codename river, MediaTek), Google TV / Android 14 (SDK 34),+# firmware UKN1.240806.017.V816.0.25.3.10.URTMIXM. Likely a good start for other 2024+ Xiaomi Google TVs.+# Live TV app: com.mitv.livetv (set it as live_tv_package and hide it in launcher config.xml).+# Stock launcher: com.google.android.apps.tv.launcherx (pass it to restore.sh and build-and-install.sh:+# STOCK_LAUNCHER=com.google.android.apps.tv.launcherx launcher/build-and-install.sh).+#+# Apply: TV_HOST=<tv ip> tools/disable.sh examples/xiaomi-tv-a-pro-2026/debloat.txt+# Undo: TV_HOST=<tv ip> tools/restore.sh examples/xiaomi-tv-a-pro-2026/debloat.txt com.google.android.apps.tv.launcherx+# Everything is DISABLED, not uninstalled. Comment out any line you want to keep.+#+# Keep (TV needs them): mitv.service and com.mitv.overseaservice (remote keys, Netflix button, BT remote),+# com.mediatek.* (extservice, tv.agent, tis, tuners, airplay), com.mitv.livetv, com.mi.bluetooth,+# com.mitv.setup, com.xiaomi.android.tvsetup.partnercustomizer, com.xiaomi.mitv.scenemode (game mode).+# Already disabled at the factory: com.xiaomi.floatingframe, com.iwedia.tvinput, atsc/isdb tuners.+# Default IME is Gboard, no keyboard quirk. 1.8 GB RAM.+#+# Google TV 14 quirk (the important one): HOME is resolved by intent priority here and the saved+# "default home" is ignored. launcherx has priority 2, the setup wizard's RecoveryActivity priority 1,+# a sideloaded launcher 0. Disable launcherx alone and Home lands on RecoveryActivity, which+# crash-loops system_server (soft reboots every ~60 s, Wi-Fi drops). Shell may not disable that one+# activity, so the whole setup wizard package is disabled below; it is only used for first-time setup.+# Re-enable it (and launcherx) before a factory reset or to get the Google home back: restore.sh does.+# The firmware re-enables com.netflix.ninja by itself (Netflix button), so don't bother disabling it.++# Xiaomi + Google telemetry+com.miui.tv.analytics+com.xiaomi.statistic+com.xiaomi.tvqs.overseas.y24 # Xiaomi quality-stats uploader (DROPBOX_ENTRY_ADDED, upload log)+com.google.android.feedback++# PatchWall / "Mi Home" tab, content rows, promos+com.mitv.tvhome.atv # PatchWall+com.mitv.tvhome.michannel+com.mitv.tvhome.mitvplus # Mi TV+ FAST channels+com.mitv.tvhome.oemtab # the "Mi Home" tab injected into Google TV home+com.xm.webcontent+android.autoinstalls.config.google.gtvpai # Play auto-install of partner apps++# Xiaomi background services+com.xiaomi.mitv.tvmanager # "TV Manager" cleaner / booster+com.xiaomi.mitv.updateservice # firmware updates: re-enable these three to check for one+com.mitv.upgrader+com.mediatek.tv.systemupdater++# Google TV setup wizard: only its RecoveryActivity matters after setup, see the quirk above.+# Disable it before build-and-install.sh, or Home may crash-loop when launcherx goes away.+com.google.android.tungsten.setupwraith++# Personal choice: Chromecast built-in (AirPlay, Miracast and Mi Cast kept)+com.google.android.apps.mediashell++# Preloaded apps+com.google.android.play.games+com.xiaomi.mimusic2++# Personal choice: preloaded streaming apps not used (YouTube and Netflix kept)+com.amazon.amazonvideo.livingroom+com.google.android.youtube.tvmusic++# Optional, uncomment if unused+# com.google.android.videos # Google TV / Play Movies app+# com.google.android.apps.tv.dreamx # Google ambient screensaver (switch to the Clock dream first)diff --git a/launcher/build-and-install.ps1 b/launcher/build-and-install.ps1index 23e6d566f..caf9490bc 100644--- a/launcher/build-and-install.ps1+++ b/launcher/build-and-install.ps1@@ -41,7 +41,10 @@ Write-Host $outif ("$out" -match 'Error') { throw 'could not set the new launcher as home; the stock launcher was left untouched' }@('pm grant com.gathin.tvhome android.permission.ACCESS_FINE_LOCATION 2>/dev/null; echo location-granted',+ "am start -W -n com.gathin.tvhome/.MainActivity | grep -E '^(Status|Error)'",+ "pm disable-user --user 0 $StockLauncher",'cmd package set-home-activity --user 0 com.gathin.tvhome/.MainActivity',- "pm disable-user --user 0 $StockLauncher"+ 'cmd package resolve-activity --brief -c android.intent.category.HOME -a android.intent.action.MAIN | tail -n 1') | & $py -I ..\tools\tv.py --batch+# Order matters, see build-and-install.sh. The last line printed must be com.gathin.tvhome.Write-Host 'Installed. Press Home on the remote to see it.'diff --git a/launcher/build-and-install.sh b/launcher/build-and-install.shindex 66d537252..0ab0ee196 100755--- a/launcher/build-and-install.sh+++ b/launcher/build-and-install.sh@@ -29,7 +29,13 @@ printf '%s\n' \"pm install -r /data/local/tmp/tvhome.apk" \"rm -f /data/local/tmp/tvhome.apk" \"pm grant com.gathin.tvhome android.permission.ACCESS_FINE_LOCATION 2>/dev/null; echo location-granted" \- "cmd package set-home-activity --user 0 com.gathin.tvhome/.MainActivity" \+ "am start -W -n com.gathin.tvhome/.MainActivity | grep -E '^(Status|Error)'" \"pm disable-user --user 0 $STOCK_LAUNCHER" \+ "cmd package set-home-activity --user 0 com.gathin.tvhome/.MainActivity" \+ "cmd package resolve-activity --brief -c android.intent.category.HOME -a android.intent.action.MAIN | tail -n 1" \| "$PY" -I ../tools/tv.py --batch+# Order matters: the new launcher is started before the stock one is disabled, and the home+# preference is set after. Android drops the preference whenever the set of HOME apps changes, and+# on Google TV 14 the next candidate is the setup wizard's RecoveryActivity, which crash-loops+# system_server (see examples/xiaomi-tv-a-pro-2026). The last line must print com.gathin.tvhome.echo "Installed. Press Home on the remote to see it."