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: Xiaomi MiTV-ANSP0 (小米电视5 Pro, CN firmware, Android 9) debloat list + firmware notes
foreverskyb1962448220d
diff --git a/docs/devices/xiaomi-mitv-ansp0-jobs.txt b/docs/devices/xiaomi-mitv-ansp0-jobs.txtnew file mode 100644index 000000000..eb0d13e81--- /dev/null+++ b/docs/devices/xiaomi-mitv-ansp0-jobs.txt@@ -0,0 +1,71 @@+# Xiaomi MiTV-ANSP0 (小米电视5 Pro 65"), China (codename jobs, Amlogic).+# Android 9 (SDK 28), firmware 23.6.5.3226 (build PPR1.180610.011), 4 GB RAM, 54 GB /data.+# UI reports 1920x1080 at 320 dpi.+# Checked on a real TV on 2026-10-20, with the reference launcher (version 2.2) as Home.+# Compatibility notes only, plus the debloat list next to this file in examples/xiaomi-mitv-ansp0/.+#+# Everything below was read with tools/tv.py on a tv whose overlay has no Google services at all.++# ---- Home: PatchWall must stay enabled ----+# Stock launcher: com.mitv.tvhome (version 3.50.1621), HOME activity .MainActivityUserMode.+# Its HOME filter is priority 0 and the reference launcher's is priority 0 too, so the tie is settled+# by the preferred activity:+#+# cmd package set-home-activity --user 0 com.gathin.tvhome/.MainActivity+#+# While com.mitv.tvhome is enabled that preference holds, survives a reboot, and PatchWall is never+# shown. Disabling com.mitv.tvhome makes HOME resolve to+# com.android.tv.settings/.system.FallbackHome even though its filter is priority -1000, and the TV+# shows a black screen: pressing Home does nothing visible, and set-home-activity still reports+# "Success" while resolve-activity keeps answering FallbackHome. enable--user 0 com.mitv.tvhome and+# set the preference again to recover. launcher/build-and-install.sh's own handover check catches+# this and rolls back to PatchWall (it reported "Home resolves to+# com.android.tv.settings/.system.FallbackHome" on the first attempt here).++# ---- Settings ----+# Unlike the MiTV-ASTP1 CN build, the plain framework settings intents DO resolve here:+# android.settings.SETTINGS -> com.android.tv.settings/.MainSettings+# android.settings.WIFI_SETTINGS -> com.android.tv.settings/.connectivity.NetworkActivity+# com.xiaomi.mitv.settings is present as well (the vendor UI with its own+# com.xiaomi.mitv.settings.* actions), but the launcher needs no settings_* fallback keys.+# android.settings.TV_SETTINGS resolves to nothing.++# ---- Inputs: listed, but switching needs a vendor extra ----+# TvInputManager registers (all under com.droidlogic.tvinput):+# HDMI1 com.droidlogic.tvinput/.services.Hdmi1InputService/HW5 (state 1 = connected)+# HDMI2 com.droidlogic.tvinput/.services.Hdmi2InputService/HW6+# HDMI3 com.droidlogic.tvinput/.services.Hdmi3InputService/HW7+# AV com.droidlogic.tvinput/.services.AV1InputService/HW1+# ADTV com.droidlogic.tvinput/.services.ADTVInputService/HW16 (state 0)+#+# Nothing answers ACTION_VIEW on TvContract's passthrough channel URI ("No activities found" for+# content://android.media.tv/passthrough/), so the launcher's Inputs rows list the ports and do+# nothing when clicked. com.xiaomi.mitv.tvplayer registers no URI scheme at all; it switches sources+# with explicit actions and an INTEGER extra (same shape as the MiTV-MFTR0 Android 14 notes):+# HDMI1 am start -n com.xiaomi.mitv.tvplayer/.ExternalSourceActivity --ei input 23 [verified]+# HDMI2 input 24, HDMI3 input 25, AV input 2 [values from the MFTR0 notes, not re-tested here]+# TV/ATV com.xiaomi.mitv.tvplayer.ATV_PLAY -> .AtvActivity+# DTMB com.xiaomi.mitv.tvplayer.DTMB_PLAY -> .dtmb.DTMBActivity+# Starting ExternalSourceActivity without the extra also switches to a source (the last one used), so+# wiring `input_action` to EXTSRC_PLAY would send every HDMI row to the same port - do not.+# Live TV via the launcher's live_tv_package/live_tv_action = com.xiaomi.mitv.tvplayer ++# com.xiaomi.mitv.tvplayer.ATV_PLAY works.++# ---- ADB ----+# ro.adb.secure=1. Network ADB on 5555 closes on every reboot and has to be re-enabled in+# Settings -> 账号与安全 -> ADB 调试. It survived all the work above, but not the reboot test.++# ---- Sideloading ----+# system setting `pi_config` carries Xiaomi's install blacklist for this firmware:+# "根据互联网电视相关要求,应用存在违规功能,禁止安装。" ("app has prohibited features, install+# blocked"), with app_pi_control / app_pi_install_black_list / app_pi_strong_install_black_list all+# true. It names ~100 packages (IPTV players, third-party launchers, browsers, app stores). A plain+# adb install of a blacklisted package is refused by the package installer. The reference launcher+# (com.gathin.tvhome) installed normally; com.dangbeimarket (当贝市场) and a FongMi build+# (com.hisen.android.tv) are installed and working.++# ---- App discovery ----+# LEANBACK_LAUNCHER: only the four apps the owner kept (FongMi, bilibili TV, Dangbei Market, QQ Music+# TV). CATEGORY_LAUNCHER additionally has com.mitv.tvhome, com.xiaomi.mitv.settings,+# com.xiaomi.mitv.smartshare and com.xiaomi.mitv.systemui. On a set with few TV apps the grid is+# therefore empty until something else is installed.diff --git a/examples/README.md b/examples/README.mdindex da48e71be..bebcb150e 100644--- a/examples/README.md+++ b/examples/README.md@@ -103,6 +103,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-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; ADB closes on every reboot || `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 |@@ -117,6 +118,7 @@ Notes for models that have no tested list yet live in [`docs/devices/`](../docs/- [TCL `75c63b`](../docs/devices/tcl-75c63b.md), owner-reported retail model, `Smart TV Pro` / `BeyondTV4`, Android 11, `V8-R51MT05-LF1V652`: launcher-only installation, HOME priorities and component restrictions, correct Live TV player package, restoration and explicit test limits.- [Xiaomi MiTV-MFTR0 "freeguy"](../docs/devices/xiaomi-mitv-mftr0-freeguy.txt), China, Android 14: inputs, Xiaomi settings intents, app discovery.+- [Xiaomi MiTV-ANSP0 "jobs"](../docs/devices/xiaomi-mitv-ansp0-jobs.txt), China, Android 9: Home/FallbackHome, settings intents, inputs and the `EXTSRC_PLAY` extra, ADB on reboot, the vendor install blacklist.Notes for a model that has no tested list yet live in [`docs/devices/`](../docs/devices/) (Xiaomi MiTV-MFTR0 "freeguy", China, Android 14: inputs, Xiaomi settings intents, app discovery).diff --git a/examples/xiaomi-mitv-ansp0/debloat.txt b/examples/xiaomi-mitv-ansp0/debloat.txtnew file mode 100644index 000000000..21b07f9be--- /dev/null+++ b/examples/xiaomi-mitv-ansp0/debloat.txt@@ -0,0 +1,91 @@+# 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+# 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.+# - 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).++# 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++# 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.smartpanel # smart-home panel+com.xiaomi.smarthome.tv # Mi Home+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")+com.xiaomi.mitv.pay # Mi payment+com.xiaomi.mitv.payment # payment component+com.xiaomi.voicecontrol # Xiao Ai voice control+com.xiaomi.wakeupservice # voice wake-up+com.xiaomi.mico.mqtt.service.application.tv # Mico voice MQTT service++# 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.tvhomediff --git a/examples/xiaomi-mitv-ansp0/screenshot.png b/examples/xiaomi-mitv-ansp0/screenshot.pngnew file mode 100644index 000000000..063b98f48Binary files /dev/null and b/examples/xiaomi-mitv-ansp0/screenshot.png differ