Skip to content

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

examples: add Xiaomi MiTV-ASTP0 (mulan, L55M7-EA), China firmware

Kien3076fca28ef7
diff --git a/README.md b/README.md
index c9aafb767..b8e459f5b 100644
--- a/README.md
+++ b/README.md
@@ -236,6 +236,7 @@ BYINTEK, JMGO, Portronics, Stellamore, Wanbo and XGIMI projectors
| Xiaomi Mi TV 4A (MiTV-MOOQ1) | Android TV 10 |
| 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) |
| Xiaomi MiTV-ASTP1 (maverick), China firmware 2.40.641.0514.cn, 1 GB RAM, 720p | Android TV 9 (CN build) |
| Xiaomi MiTV-AXFR1 (rango, Amlogic, 1 GB), India | Android TV 11 |
| Xiaomi MiTV-AXSO0 (dangal; Mi TV 4C Pro 2019 / 4A Pro) | Android TV 9 |
diff --git a/examples/README.md b/examples/README.md
index efc67da78..fcb1592fd 100644
--- a/examples/README.md
+++ b/examples/README.md
@@ -141,6 +141,7 @@ on that firmware, grouped and commented. These are starting points: comment out
| `xiaomi-mi-tv-4a/` | Xiaomi Mi TV 4A (MiTV-MOOQ1) | Android TV 10 | PatchWall, Mi analytics, SmartShare, MiLink |
| `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 |
| `xiaomi-mitv-astp1/` | Xiaomi MiTV-ASTP1 (maverick), China firmware 2.40.641.0514.cn, 1 GB RAM, 720p | Android TV 9 (CN build) | First CN-firmware Xiaomi: no Google apps; stock launcher `com.mitv.tvhome` (pass `STOCK_LAUNCHER`); ADB closes on every reboot; Mi analytics/push/ads, shop plugin, TV Manager, updater off; casting and app store kept |
| `xiaomi-mitv-axfr1/` | Xiaomi MiTV-AXFR1 (rango, Amlogic, 1 GB), India | Android TV 11 | PatchWall, Mi analytics, sponsored rows, partner auto-installs, TV Manager; mirroring, OTA and unused streaming apps off by choice; Chromecast and voice kept; PatchWall's input popup is unused (input picker is Live TV's); custom HOME accepted, setupwraith does not claim HOME |
| `xiaomi-mitv-axso0/` | Xiaomi MiTV-AXSO0 (dangal; Mi TV 4C Pro 2019 / 4A Pro) | Android TV 9 | PatchWall, Glance ads, Mi TV+, Sensara, Mi analytics, MiLink; voice, Chromecast, unused streaming apps off by choice |
diff --git a/examples/xiaomi-mitv-astp0/debloat.txt b/examples/xiaomi-mitv-astp0/debloat.txt
new file mode 100644
index 000000000..d021a0480
--- /dev/null
+++ b/examples/xiaomi-mitv-astp0/debloat.txt
@@ -0,0 +1,98 @@
+# Xiaomi MiTV-ASTP0 (codename mulan; China-market firmware, sold as L55M7-EA), Android 9 (SDK 28),
+# firmware 22.12.2.1630, Amlogic/droidlogic, 1.5 GB RAM, 1080p panel. Used in Vietnam.
+# Stock launcher: com.mitv.tvhome (HOME activity .MainActivityUserMode). It is not in
+# KNOWN_STOCK_LAUNCHERS, so install with: STOCK_LAUNCHER=com.mitv.tvhome launcher/build-and-install.sh
+#
+# Apply: TV_HOST=<tv ip> tools/disable.sh examples/xiaomi-mitv-astp0/debloat.txt
+# Undo: TV_HOST=<tv ip> tools/restore.sh examples/xiaomi-mitv-astp0/debloat.txt com.mitv.tvhome
+# Everything is DISABLED, not uninstalled. Comment out any line you want to keep.
+#
+# Notes from this firmware:
+# - Same family as xiaomi-mitv-astp1; this list starts from that one, minus what this build lacks
+# (com.gitvdemo.video, com.duokan.videodaily, com.xiaomi.tv.gallery, com.newtv.cboxtv).
+# - No CN streaming apps preinstalled; no Google apps besides the YouTube and katniss the owner sideloaded.
+# - Network ADB (port 5555) closes on every reboot; re-enable it in
+# Settings -> Account & Security -> ADB debugging after each power cycle. Wi-Fi also sleeps in
+# standby, so the TV drops off the network until it is woken.
+# - mitv.service is the core MiTV service: do not touch it. The owner chose to drop payment, Mi Home,
+# Mi Video, the voice assistant and every casting receiver but AirPlay (in com.xiaomi.mitv.smartshare).
+# The app store and com.mitv.videoplayer (USB files) stay.
+# - com.xiaomi.mitv.remotecontroller.service looped at 100-190% CPU and flooded logd (~490 MB in
+# 30 min): its relay host is gone, so it is disabled below. ES File Explorer ran DLNA and a WebView
+# in the background; it is replaced by Material Files (F-Droid, me.zhanghai.android.files).
+# - Home stays com.mitv.tvhome: set-home-activity succeeds but resolution ignores it, and with
+# com.mitv.tvhome disabled Home falls to com.android.tv.settings/.system.FallbackHome. Keep it
+# enabled; an accessibility service that answers the Home key (HOME_KEY_SERVICE=1) brings the new
+# launcher up instead.
+# - The firmware has no night mode setting: cmd uimode night yes|no|auto. Auto needs a location for
+# sunset and the TV has none, so it stays in day mode.
+# - The remote has no Input button; its Menu key (three lines) is KEYCODE_MENU, scancode 127. Inputs
+# switch only through Xiaomi's player: am start -a com.xiaomi.mitv.tvplayer.EXTSRC_PLAY
+# -n com.xiaomi.mitv.tvplayer/.ExternalSourceActivity --ei input N (HDMI1-3 = 23-25, AV = 2).
+# Starting the HDMI channel URI with a plain VIEW lets any app that claims every VIEW catch it.
+# - The time zone ships as Asia/Shanghai, an hour ahead in Vietnam. Set the one the IP locates
+# (get.geojs.io/v1/ip/geo.json "timezone"): service call alarm 3 s16 Asia/Ho_Chi_Minh
+# - Picture: Settings -> Image settings -> Display model is kept per source; "Picture" is the vivid
+# one (contrast 55, saturation 60, cold), "Standard" is flat.
+
+# Xiaomi telemetry / push / cloud control
+com.miui.analytics
+com.miui.tv.analytics
+com.xiaomi.statistic
+com.mitv.cloudcontrol
+com.xiaomi.mitv.tvpush.tvpushservice
+com.android.smspush
+
+# Ads / promoted content / shopping
+com.xm.webcontent
+com.mitv.shoplugin # TV shopping channel plugin
+com.xiaomi.mitv.shop # Xiaomi shop
+
+# Xiaomi background services
+com.xiaomi.mitv.tvmanager # "TV Manager" cleaner
+com.xiaomi.mitv.upgrade # firmware updates: re-enable to check for one
+com.xiaomi.gamecenter.sdk.service.mibox
+com.xiaomi.mitv.karaoke.service
+com.xiaomi.wakeupservice # Chinese wake word for the voice assistant, ~30% CPU all the time
+
+# Preloaded apps not used
+com.xiaomi.mimusic2 # Mi Music
+com.mitv.gallery # Media Explorer still opens USB photos
+com.xiaomi.screenrecorder
+com.xiaomi.mitv.smartpanel # smart home panel
+com.xiaomi.mitv.calendar
+com.xiaomi.tweather # CN weather
+com.mitv.screensaver # Xiaomi screensaver; the launcher's clock screensaver takes over
+com.xiaomi.mitv.healthdiagnosis # TV self-diagnosis
+com.xiaomi.mitv.legal.webview # terms and privacy viewer
+com.android.printspooler # printing
+com.xiaomi.mibox.lockscreen # child lock screen
+
+# Casting except AirPlay (com.xiaomi.mitv.smartshare keeps .mairplay.AirPlayService on port 47000)
+com.xiaomi.miplay # MiPlay, Xiaomi phone casting
+com.duokan.airkan.tvbox # AirKan DLNA
+com.xiaomi.wfdsinkhelperservice # Miracast sink helper
+com.xiaomi.mi_connect_service # Mi Connect phone link
+
+# Phone remote, air mouse and the TV assistant relay. It reconnects to relay01.c.assistant.tv.mi.com,
+# which no longer resolves, about 19 times a second with no backoff: ~190% CPU in GC after every boot.
+# The Bluetooth remote runs in com.android.bluetooth (BleRemoteService) and is not affected.
+com.xiaomi.mitv.remotecontroller.service
+
+# Chinese voice assistant (owner's choice)
+com.xiaomi.voicecontrol
+com.xiaomi.mico.mqtt.service.application.tv # Xiao AI speaker link
+
+# Chinese payment (owner's choice)
+com.mipay.wallet.tv
+com.xiaomi.mitv.pay
+com.xiaomi.mitv.payment
+
+# Content (owner's choice)
+com.mitv.mivideoplayer # Mi Video, CN streaming; com.mitv.videoplayer still plays USB files
+com.xiaomi.smarthome.tv # Mi Home on the TV
+
+# Keyboard: Gboard for Android TV 16.1.02 (com.google.android.inputmethod.latin, tv_release armeabi-v7a,
+# minSdk 26; 17.x needs Android 10) is the only IME: ime enable/set .../com.android.inputmethod.latin.LatinIME.
+# It logs missing Play Services but types fine. Re-enable Sogou before removing it, or the TV has no keyboard.
+com.sohu.inputmethod.sogou.tv