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
Merge PR #399: examples: Xiaomi MiTV-ANSP0 (小米电视5 Pro, CN firmware, Android 9)
Gathin23622e02eca503
diff --cc README.mdindex 7ae69e950,d3ea4f6df..8e2a42f99--- a/README.md+++ b/README.md@@@ -238,6 -217,6 +238,7 @@@ BYINTEK, JMGO, Portronics, Stellamore,| Vu Premium FHD 43-inch (Smart 2K ATV4, hamamatsucho), India | Android TV 9 || Wanbo X5 Pro projector (built-in Google TV stick: SkyworthDigital YYT, Amlogic), Australia | Google TV 14 || XGIMI Horizon S Pro projector (XK03H, xgimigalileo, MediaTek) | Android TV 11 |++| Xiaomi MiTV-ANSP0 (小米电视5 Pro 65", jobs, Amlogic), China firmware 23.6.5.3226, 4 GB RAM | Android TV 9 (CN build) || Xiaomi Mi Box S (MIBOX4, oneday), streaming box | Android TV 9 || Xiaomi Mi Box S 2nd gen (MiTV-AFKR0, jaws), streaming box | Google TV 11 || Xiaomi Mi TV (MiTV-MOOQ0, croods) | Android TV 10 |diff --cc examples/README.mdindex e281bf65f,d8eadda4f..5df409ad1--- a/examples/README.md+++ b/examples/README.md@@@ -114,6 -103,7 +114,7 @@@ on that firmware, grouped and commented| `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-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-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, updater, preloaded apps, the office-mode second home and voice off; casting, app store and all streaming apps kept; **keep PatchWall enabled** — disabling it drops HOME to FallbackHome's black screen, so set the new launcher as the preferred home instead (survives a reboot); plain settings intents resolve; inputs are listed but switch only through the vendor's `EXTSRC_PLAY` extra; the 儿童 kids home is an exported activity of PatchWall and can be a one-click tile on a replacement Home; ADB closes on every reboot |++| `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-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 || `xiaomi-mitv-axso2/` | Xiaomi MiTV-AXSO2 (dangalUHD, India, 2 GB) | Android TV 9 | PatchWall, Mi TV+, Sensara, Mi analytics, TV Manager, updater, partner auto-installs, old partner app copies; voice, all casting and streaming apps kept; sign-in notice and storage notes |diff --cc examples/xiaomi-mitv-ansp0/debloat.txtindex 000000000,aa93e3547..d60981103mode 000000,100644..100644--- a/examples/xiaomi-mitv-ansp0/debloat.txt+++ b/examples/xiaomi-mitv-ansp0/debloat.txt@@@ -1,0 -1,100 +1,101 @@@+ # Xiaomi MiTV-ANSP0 (codename jobs; 小米电视5 Pro 65", China-market firmware), Android 9 (SDK 28),+ # firmware 23.6.5.3226, Amlogic, 4 GB RAM, 1080p UI (320 dpi), 54 GB /data.+ # Stock launcher: com.mitv.tvhome (PatchWall, HOME activity .MainActivityUserMode) - KEEP IT ENABLED,+ # see "Home" below. Install with: STOCK_LAUNCHER=com.mitv.tvhome launcher/build-and-install.sh+ # (build-and-install.sh already knows com.mitv.tvhome, so the argument is optional).+ #+ # Apply: TV_HOST=<tv ip> tools/disable.sh examples/xiaomi-mitv-ansp0/debloat.txt+ # Undo: TV_HOST=<tv ip> tools/restore.sh examples/xiaomi-mitv-ansp0/debloat.txt com.mitv.tvhome++# More notes (settings intents, inputs, ADB, install blacklist): docs/devices/xiaomi-mitv-ansp0-jobs.txt+ # Everything is DISABLED, not uninstalled. Comment out any line you want to keep.+ #+ # Notes from this firmware:+ # - Home: disabling com.mitv.tvhome drops HOME to com.android.tv.settings/.system.FallbackHome+ # (priority -1000 in the manifest, but it still wins once nothing else is left), which shows a+ # black screen. Keeping PatchWall enabled and setting the new launcher as the preferred home+ # works, and survives a reboot; PatchWall is then never shown. Verified with+ # `cmd package set-home-activity --user 0 com.gathin.tvhome/.MainActivity`.+ # - Standard settings intents DO resolve here: android.settings.SETTINGS ->+ # com.android.tv.settings/.MainSettings, android.settings.WIFI_SETTINGS ->+ # com.android.tv.settings/.connectivity.NetworkActivity. The launcher's pills need no fallback keys.+ # - Inputs: com.droidlogic.tvinput registers the ports (Hdmi1InputService/HW5,+ # Hdmi2/HW6, Hdmi3/HW7, AV1InputService/HW1), but nothing answers ACTION_VIEW on the standard+ # TvContract passthrough URI, so the launcher lists the ports without being able to switch them.+ # The TV app switches with EXTSRC_PLAY and an integer extra instead; see+ # docs/devices/xiaomi-mitv-ansp0-jobs.txt.+ # - Network ADB (port 5555) closes on every reboot; re-enable it in+ # Settings -> 账号与安全 (Account & Security) -> ADB 调试 after each power cycle.+ # - `pm disable-user` is accepted for the shell user on this build (unlike MiTV-ANTL0, which needs+ # `pm hide`).+ # - mitv.service is the core MiTV service: do not touch it.+ # - Voice: disabling voicecontrol, wakeupservice, the Mico MQTT service and the two Mi Home+ # packages also stops an external Xiao Ai speaker from controlling the TV (its "turn the TV+ # off" command). Verified both ways on this set; see the Voice group below.+ # - com.xiaomi.mitv.settings is the vendor settings UI; the standard com.android.tv.settings app is+ # also present and answers the plain settings actions.+ # - No Google apps at all. Content comes from CN streaming apps; casting (smartshare / miplay /+ # wfdsinkhelperservice / duokan.airkan.tvbox / upnp) and the app store are deliberately kept.+ # - com.mitv.care is disabled by the factory already.+ #+ # Owner's-choice removals NOT listed below (disabled here, re-enable in Settings > Apps if needed):+ # com.douyu.xl.douyutv (Douyu), net.cibntv.ott.sk (CIBN 4K), com.lutongnet.nldmxXiaomiChildren-# (children's training app), com.wrbug.dumpdex (a dex-dump tool the owner installed in 2023).++# (children's training app) and one sideloaded tool.++ # Xiaomi telemetry / push / cloud control+ com.miui.analytics # Mi analytics+ com.miui.tv.analytics # TV analytics+ com.xiaomi.statistic # statistics upload+ com.xiaomi.tvqs # quality system: uploads crash/perf/dropbox entries+ com.xiaomi.mitv.csi # "after-sales assistant": satisfaction survey upload+ com.mitv.cloudcontrol # cloud control: starts on connectivity, pushes apps remotely+ com.android.smspush # SMS push, useless on a TV++ # Ads / promoted content+ com.xm.webcontent # MiWebView promo container; also fetches the screensaver ads+ com.mitv.shoplugin # TV shopping channel plugin (Taobao SDK)+ com.gitvdemo.video # GITV promo demo reel+ com.duokan.videodaily # video daily promos++ # Xiaomi background services+ com.xiaomi.mitv.tvmanager # "TV Manager" cleaner+ com.xiaomi.gamecenter.sdk.service.mibox # game centre SDK-com.xiaomi.mitv.upgrade # firmware updates: re-enable to check for one++# com.xiaomi.mitv.upgrade # firmware updater: kept on so updates arrive (#322)++ # Preloaded apps not used+ com.xiaomi.mimusic2 # Mi Music+ com.xiaomi.tv.gallery # Mi photo album+ com.mitv.gallery # Media Explorer as a tile; USB browsing still works+ com.xiaomi.screenrecorder # screen recorder+ com.xiaomi.mitv.calendar # calendar+ com.mitv.alarmcenter # alarms+ com.xiaomi.mitv.handbook # user handbook+ com.xiaomi.tweather # weather++ # Off by choice: features this owner does not use (comment out what you do use)+ com.xiaomi.mitv.karaoke.service # karaoke+ com.xiaomi.mitv.tvvideocall # MiTime video calls+ com.xiaomi.eetv.litehome # a second home screen ("办公模式" office mode)+ com.xiaomi.mitv.light # light-effect app ("Symphony of Shadows")++ # Voice and Mi Home. KEEP THESE if an external Xiao Ai (小爱) speaker should be able to control the+ # TV: disabling all five cut a household's voice "turn the TV off" in testing, and enabling them again+ # restored it. The TV-side voice remote may only need voicecontrol/wakeupservice; the speaker path goes+ # through the Mico MQTT service and the Mi Home packages. Not narrowed down to one package.+ com.xiaomi.mitv.smartpanel # smart-home panel+ com.xiaomi.smarthome.tv # Mi Home+ com.xiaomi.voicecontrol # Xiao Ai voice control+ com.xiaomi.wakeupservice # voice wake-up+ com.xiaomi.mico.mqtt.service.application.tv # Mico voice MQTT service+ # Deliberately NOT disabled: com.xiaomi.mitv.pay and com.xiaomi.mitv.payment. Disabling them+ # leaves the TV unable to complete a membership purchase or renewal, and a viewer who pays for+ # the kids membership (儿童成长VIP) loses the only way to renew on the set.++ # Stock screensaver, replaced by the launcher's ClockDream. Apply only AFTER the launcher is Home and+ # its screensaver is selected, otherwise the TV has no screensaver:+ # settings put secure screensaver_components com.gathin.tvhome/.ClockDream+ # settings put secure screensaver_enabled 1+ com.mitv.screensaver++ # Stock launcher: KEEP ENABLED (see "Home" above). It is the only app left that can answer HOME if the+ # preferred-home setting is ever cleared, and disabling it lands on FallbackHome's black screen.+ # com.mitv.tvhome