Skip to content

Debloat any Android or Google TV over Wi-Fi and get an Apple TV-style home.

Add Xiaomi Mi TV Stick 4K 2nd gen (MiTV-AFMU1) debloat list

fad1b6e92065d1
diff --git a/README.md b/README.md
index 21e873747..101d348ab 100644
--- a/README.md
+++ b/README.md
@@ -266,6 +266,7 @@ BYINTEK, JMGO, Portronics, Stellamore, Wanbo and XGIMI projectors
| Xiaomi Mi Box S 2nd gen (MiTV-AFKR0, jaws), streaming box | Google TV 11 |
| Xiaomi Mi TV (MiTV-MOOQ0, croods) | Android TV 10 |
| Xiaomi Mi TV 4A (MiTV-MOOQ1) | Android TV 10 |
+| Xiaomi Mi TV Stick 4K 2nd gen (MiTV-AFMU1, adastra) | Android TV 14 |
| Xiaomi MiTV-AESP0 stick (aquaman, 1 GB) | Android TV 9 |
| Xiaomi MiTV-ANSP0 (小米电视5 Pro 65", jobs, Amlogic), China firmware 23.6.5.3226, 4 GB RAM | Android TV 9 (CN build) |
| Xiaomi MiTV-ASTP0 (mulan, sold as L55M7-EA), China firmware 22.12.2.1630, 1.5 GB RAM | Android TV 9 (CN build) |
diff --git a/examples/README.md b/examples/README.md
index 82d19b3bd..bdcb01585 100644
--- a/examples/README.md
+++ b/examples/README.md
@@ -161,6 +161,7 @@ on that firmware, grouped and commented. These are starting points: comment out
| `xiaomi-mi-box-s-2nd-gen/` | Xiaomi Mi Box S 2nd gen (MiTV-AFKR0, jaws), streaming box | Google TV 11 | Mi ad row and PatchWall, Mi analytics, partner auto-installs, update service off by choice; setup wizard off for the launcher, Wi-Fi password re-entry note |
| `xiaomi-mitv-mooq0/` | Xiaomi Mi TV (MiTV-MOOQ0, croods) | Android TV 10 | PatchWall, Mi analytics, MiChannel, TV Manager, Alexa bridge; factory test app also claims HOME; notes from #81 |
| `xiaomi-mi-tv-4a/` | Xiaomi Mi TV 4A (MiTV-MOOQ1) | Android TV 10 | PatchWall, Mi analytics, SmartShare, MiLink |
+| `xiaomi-mi-tv-stick-4k-gen2/` | Xiaomi Mi TV Stick 4K 2nd gen (MiTV-AFMU1, adastra) | Android TV 14 | Provisional, tested one day: Mi analytics and ad services, promo rows, casting and Mi video off; stock launcher and setupwraith out (Wi-Fi checked first); YouTube app and firmware updates off by choice |
| `xiaomi-mitv-aesp0/` | Xiaomi MiTV-AESP0 stick (aquaman, 1 GB) | Android TV 9 | No inputs; Home key sends ALL_APPS, needs `HOME_KEY_SERVICE=1`; Chromecast kept |
| `xiaomi-mitv-ansp0/` | Xiaomi MiTV-ANSP0 (小米电视5 Pro 65", jobs, Amlogic), China firmware 23.6.5.3226, 4 GB RAM | Android TV 9 (CN build) | Second CN-firmware Xiaomi, no Google apps: Mi analytics/push/cloud control, ad web container, shop plugin, promo reels, TV Manager, game SDK, preloaded apps, office-mode second home and voice off; updater kept; **keep PatchWall enabled** (disabling it leaves FallbackHome's black screen), set the new launcher as preferred home instead; inputs switch only with the vendor's `EXTSRC_PLAY` extra; ADB closes on every reboot; [more notes](../docs/devices/xiaomi-mitv-ansp0-jobs.txt) |
| `xiaomi-mitv-astp0/` | Xiaomi MiTV-ASTP0 (mulan, sold as L55M7-EA), China firmware 22.12.2.1630, 1.5 GB RAM | Android TV 9 (CN build) | Sibling of ASTP1: Mi analytics/push/cloud control, shop plugin, TV Manager, the Chinese wake word (~30% CPU) and the phone-remote relay that loops at 100-190% CPU off; casting except AirPlay, payment, voice and Mi Video off by choice; keep `com.mitv.tvhome` (Home falls to FallbackHome without it); inputs switch only with Xiaomi's `EXTSRC_PLAY`; time zone ships as Asia/Shanghai |
diff --git a/examples/xiaomi-mi-tv-stick-4k-gen2/debloat.txt b/examples/xiaomi-mi-tv-stick-4k-gen2/debloat.txt
new file mode 100644
index 000000000..51b7906b2
--- /dev/null
+++ b/examples/xiaomi-mi-tv-stick-4k-gen2/debloat.txt
@@ -0,0 +1,68 @@
+# Xiaomi Mi TV Stick 4K (2nd gen) (MiTV-AFMU1, codename adastra, device twilight), Android TV 14 (Google TV),
+# SDK 34, firmware UKG3.250826.001.V816.0.7.0.UZFAATK. 1.9 GB RAM, /system is full (100%), so nothing frees there.
+#
+# Apply: TV_HOST=<tv ip> tools/disable.sh examples/xiaomi-mi-tv-stick-4k-gen2/debloat.txt
+# Undo: TV_HOST=<tv ip> tools/restore.sh examples/xiaomi-mi-tv-stick-4k-gen2/debloat.txt
+# Everything is DISABLED, not uninstalled. Comment out any line you want to keep.
+#
+# Tested for one day, in batches with screenshots between them, then a reboot. Treat this as provisional
+# until it has been used for a few days (CONTRIBUTING.md).
+#
+# Already disabled by the firmware before any change (not listed): Netflix, Prime Video, Mi channels
+# (michannel, atv), Google calendar sync, partner setup, Talkback, Health Connect controller.
+# Removed for user 0 by the firmware after the first reboot (not listed): YouTube Music and Mi Plus.
+#
+# Notes from this stick:
+# - Stock launcher com.google.android.apps.tv.launcherx must go, but disabling it alone makes Home resolve to
+# setupwraith's RecoveryActivity. Disable setupwraith in the same list, after checking
+# `dumpsys wifi | grep -o 'cname=[^ ]*'`: here the saved network belonged to android.uid.system, so it
+# stayed on Wi-Fi. If it belongs to setupwraith, forget and re-join the network first.
+# - build-and-install.ps1 disables launcherx after the new launcher takes Home; run this list after that.
+# - Mi TV Stick 4K gen 2 with the cleanyourtv launcher: install with launcher/build-and-install.ps1 -TvHost <ip>.
+# - Wireless debugging (port 41817, TLS) is not supported by tools/tv.py; use USB debugging on port 5555.
+# - Network debugging was off after a reboot here (observed once); re-enable it before running the tools.
+# - Keeping on purpose: Google Play Store, Play Services, TV input and remote services, Bluetooth, Droidlogic.
+#
+# Kept by choice, re-enable if you want them:
+# - com.google.android.youtube.tv: the YouTube app here. Off because the tile uses SmartTube instead.
+# - com.google.android.apps.mediashell (Chromecast), com.google.android.katniss (Google Assistant voice),
+# com.google.android.apps.tv.dreamx (Google ambient screensaver, replaced by the launcher clock screensaver).
+# - com.xiaomi.mitv.updateservice: off, so firmware updates are not offered. Re-enable to check for updates.
+# - Casting (smartshare, wfdsinkhelperservice, mi_connect_service) is off here. Phone casting was not tested.
+
+# Xiaomi and Google telemetry
+com.miui.tv.analytics
+com.xiaomi.statistic
+com.xiaomi.tvqs.overseas.y24 # quality-stats uploader and quick panel
+com.google.android.feedback
+com.android.tv.feedbackconsent
+
+# Ad personalisation (Privacy Sandbox and on-device ad services)
+com.android.adservices.api
+com.android.ondevicepersonalization.services
+com.android.federatedcompute.services
+
+# Content rows, promos and auto-installs
+com.mitv.tvhome.oemtab
+com.xm.webcontent # Xiaomi promo web pages
+android.autoinstalls.config.soc.amlogic # Amlogic partner auto-installs
+
+# Preloaded apps and services not needed on a stick
+com.google.android.play.games
+com.google.android.apps.mediashell # Chromecast built-in (see note above)
+com.google.android.katniss # Google Assistant voice search (see note above)
+com.google.android.apps.tv.dreamx # Google ambient screensaver (see note above)
+com.google.android.youtube.tv # YouTube app (see note above)
+com.netflix.tokenmanager # Netflix sign-in token, Netflix itself is already off
+com.android.printspooler # printing
+com.android.providers.contacts # contacts, nothing on a TV uses it
+com.android.health.connect.backuprestore
+com.xiaomi.mitv.smartshare # Xiaomi screen share
+com.xiaomi.wfdsinkhelperservice # Miracast sink helper
+com.xiaomi.mi_connect_service # Mi Connect
+com.mitv.videoplayer # Mi video player
+com.xiaomi.mitv.updateservice # firmware update checks (see note above)
+
+# Stock launcher and setup wizard, replaced by launcher/ (see notes above)
+com.google.android.apps.tv.launcherx
+com.google.android.tungsten.setupwraith