Skip to content

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

examples: add Xiaomi MiTV-MOOR0 (venom, MediaTek), Google TV 11

saarpatraec93073f73c
diff --git a/examples/xiaomi-mitv-moor0/README.md b/examples/xiaomi-mitv-moor0/README.md
new file mode 100644
index 000000000..a6f9cbdb0
--- /dev/null
+++ b/examples/xiaomi-mitv-moor0/README.md
@@ -0,0 +1,51 @@
+# Xiaomi MiTV-MOOR0 (`venom`, Google TV / Android 11)
+
+Tested on a **Xiaomi MiTV-MOOR0** (`ro.product.device = venom`, MediaTek, 1.8 GB RAM, 1920x1080 @ 320 dpi), Android 11 (SDK 30), firmware `RTM5.220609.003.1246`.
+
+## Apply and undo
+
+From the repository root:
+
+```sh
+# 1. Disable bloatware (including setupwraith once Wi-Fi ownership is verified)
+TV_HOST=<tv ip> tools/disable.sh examples/xiaomi-mitv-moor0/debloat.txt
+
+# 2. Build and install the launcher, and disable launcherx
+TV_HOST=<tv ip> launcher/build-and-install.sh
+
+# 3. Apply the 5-column dock and Live TV configuration
+TV_HOST=<tv ip> tools/theme.sh examples/xiaomi-mitv-moor0
+```
+
+On Windows PowerShell:
+
+```powershell
+powershell -ExecutionPolicy Bypass -File tools\disable.ps1 -TvHost <tv ip> examples\xiaomi-mitv-moor0\debloat.txt
+powershell -ExecutionPolicy Bypass -File launcher\build-and-install.ps1 -TvHost <tv ip>
+powershell -ExecutionPolicy Bypass -File tools\theme.ps1 -TvHost <tv ip> examples\xiaomi-mitv-moor0
+```
+
+To restore everything back to the original state:
+
+```sh
+TV_HOST=<tv ip> tools/restore.sh examples/xiaomi-mitv-moor0/debloat.txt com.google.android.apps.tv.launcherx
+```
+
+To re-enable a single app at any time:
+
+```sh
+TV_HOST=<tv ip> tools/tv.py 'pm enable --user 0 <package>'
+```
+
+## Notes on this firmware
+
+- **HOME claimants:** Four activities claim `android.intent.category.HOME` out of the box:
+ 1. `com.google.android.apps.tv.launcherx/.home.HomeActivity` (`priority=2`)
+ 2. `com.google.android.tungsten.setupwraith/.RecoveryActivity` (`priority=1`)
+ 3. `com.duokan.factorytest/.FactoryLauncher` (`priority=0`)
+ 4. `com.android.tv.settings/.system.FallbackHome` (`priority=-1000`)
+
+ Both `com.duokan.factorytest` and `com.google.android.tungsten.setupwraith` are included in [`debloat.txt`](debloat.txt) so that `com.gathin.tvhome/.MainActivity` owns Home cleanly. On this unit all saved Wi-Fi networks belonged to `cname=android.uid.system:1000` (`dumpsys wifi | grep -o 'cname=[^ ]*'`); `tools/disable.sh` checks this automatically before disabling `setupwraith`.
+- **Inputs & Live TV:** `com.mitv.livetv` owns `.input.SelectInputActivity` and `.tv.MainActivity`. [`config.json`](config.json) sets `"live_tv_package": "com.mitv.livetv"` and hides the duplicate tile from the grid (`"hidden_apps": ["com.mitv.livetv"]`). The launcher's **Inputs** pill lists HDMI 1–3 (with CEC/custom labels and connection state), AV, and Live TV via `com.mediatek.tvinput` and `com.mediatek.tv.service`.
+- **Dock & wallpaper:** Edit [`config.json`](config.json) (`columns` and `dock_apps`), or place a `wallpaper.jpg` in this folder, and re-run `tools/theme.sh examples/xiaomi-mitv-moor0` (or hold OK on the Settings pill on the TV to reorder tiles or pick a wallpaper on-device).
+- **Remote buttons:** As on [`xiaomi-mitv-moor2`](../xiaomi-mitv-moor2/debloat.txt), once `launcherx` is disabled, if the physical Settings (`KEYCODE_SETTINGS`, 176), Input (`KEYCODE_TV_INPUT`, 178) or YouTube (`KEYCODE_BUTTON_3`, 190) buttons on the remote stop responding, pass `HOME_KEY_SERVICE=1 INPUT_KEY_SERVICE=1` (PowerShell: `-HomeKeyService -InputKeyService`) to `launcher/build-and-install`. Note that binding a key-filtering accessibility service on this MediaTek Google TV 11 platform makes a held Volume button step once per press instead of ramping continuously.
diff --git a/examples/xiaomi-mitv-moor0/config.json b/examples/xiaomi-mitv-moor0/config.json
new file mode 100644
index 000000000..572634e32
--- /dev/null
+++ b/examples/xiaomi-mitv-moor0/config.json
@@ -0,0 +1,17 @@
+{
+ "columns": 5,
+ "dock_apps": [
+ "ar.tvplayer.tv",
+ "org.smarttube.beta",
+ "de.rtli.tvnow",
+ "org.jellyfin.androidtv",
+ "de.swr.avp.ard.tv"
+ ],
+ "hidden_apps": [
+ "com.mitv.livetv"
+ ],
+ "live_tv_package": "com.mitv.livetv",
+ "app_keys": [
+ "190:org.smarttube.beta"
+ ]
+}
diff --git a/examples/xiaomi-mitv-moor0/debloat.txt b/examples/xiaomi-mitv-moor0/debloat.txt
new file mode 100644
index 000000000..3a5151984
--- /dev/null
+++ b/examples/xiaomi-mitv-moor0/debloat.txt
@@ -0,0 +1,81 @@
+# Xiaomi MiTV-MOOR0 (codename venom), Google TV / Android 11, firmware RTM5.220609.003.1246
+# MediaTek chipset, 1.8 GB RAM.
+#
+# Package names that differ from the repo defaults on this firmware:
+# stock launcher com.google.android.apps.tv.launcherx (NOT com.google.android.tvlauncher)
+# Live TV app com.mitv.livetv (NOT com.mediatek.wwtv.tvcenter), so set
+# live_tv_package in config.xml or config.json
+# Both are arguments: launcher/build-and-install.sh takes STOCK_LAUNCHER, tools/restore.sh takes the
+# stock launcher as its second argument.
+#
+# Apply: TV_HOST=<tv ip> tools/disable.sh examples/xiaomi-mitv-moor0/debloat.txt
+# Undo: TV_HOST=<tv ip> tools/restore.sh examples/xiaomi-mitv-moor0/debloat.txt com.google.android.apps.tv.launcherx
+# Everything is DISABLED for user 0, not uninstalled. Comment out any line you want to keep.
+#
+# Kept deliberately, checked with `dumpsys package`:
+# com.mitv.livetv owns .input.SelectInputActivity and .tv.MainActivity (HDMI/AV/tuner switcher)
+# mitv.service PERSISTENT; core TV service and remote key handling
+# com.mediatek.network PERSISTENT network monitor
+# com.mitv.overseaservice PERSISTENT; hosts .netflixService (Netflix key on the remote)
+# com.mediatek.tvinput, com.mediatek.tv.service HDMI / tuner input framework
+# com.mi.bluetooth remote + Bluetooth pairing
+# com.google.android.tv.remote.service phone-as-remote pairing
+# com.xiaomi.android.tvsetup.partnercustomizer holds BleRcActivity (Bluetooth remote pairing) and global key receiver
+# com.xiaomi.gtv.settings provides MainSliceProvider for Settings
+# com.xiaomi.mitv.scenemode MiTVSceneMode picture/sound scene settings
+# com.google.android.apps.mediashell Chromecast built-in (kept by owner's choice)
+# com.xiaomi.mitv.updateservice, com.mitv.upgrader, com.mitv.ABUpdateStatus firmware updaters (kept by owner's choice)
+#
+# Quirk: com.duokan.factorytest declares the HOME intent at priority 0, the same priority as a third-party
+# launcher. Disable it before disabling launcherx so Home can never fall back to the factory test app.
+
+# ---- Xiaomi and Google telemetry ----
+com.miui.tv.analytics
+com.xiaomi.statistic
+com.xiaomi.tvqs.overseas # Firebase analytics + DOWNLOAD_WITHOUT_NOTIFICATION
+com.google.android.feedback # crash / feedback reporting
+com.google.android.partnersetup # Google RLZ attribution pings
+
+# ---- Ad rows, promos and content providers on the home screen ----
+com.mitv.tvhome.oemtab # holds ACCESS_ADSERVICES_AD_ID/_ATTRIBUTION - the ad row
+com.mitv.tvhome.michannel # Mi content rows
+com.mitv.tvhome.mitvplus # Mi TV+ ad-funded channels
+com.mitv.tvhome.atv # PatchWall home
+com.xm.webcontent # Xiaomi web promo WebView
+android.autoinstalls.config.xiaomi.amelie # silent preload installer config
+
+# ---- Retail demo mode, Xiaomi nagware and factory apps ----
+fusion.android.tv.demo # in-store demo loop
+com.xiaomi.mitv.tvmanager # "TV Manager" cleaner
+com.mitv.toolhouse
+com.xiaomi.mitv.manualhelp # on-screen user manual
+com.xiaomo.tv.milegal # legal notices app
+com.mstar.android.tv.disclaimercustomization # legal screen of the first-run setup wizard
+com.mediatek.wwtv.webview # vendor web view shell
+com.duokan.factorytest # factory test app; claims HOME at priority 0
+mediatek.factorymenu.ui # factory menu: disabled, never launched
+
+# ---- Mi Cast / Miracast, voice assistant and Xiaomi media apps (off by choice; Chromecast kept) ----
+com.xiaomi.mitv.smartshare
+com.xiaomi.wfdsinkhelperservice # Miracast sink
+com.google.android.katniss # Google Assistant voice search
+com.google.android.tv.assistant # Google TV Assistant bridge
+com.xiaomi.mitv.mediaexplorer # Xiaomi USB media explorer (third-party file manager used instead)
+com.mitv.videoplayer # Xiaomi USB video player
+com.mitv.gallery # Xiaomi gallery
+
+# ---- Preloaded apps, off by choice - comment out any you use ----
+com.xiaomi.mimusic2 # Mi Music
+com.google.android.play.games # Play Games
+com.google.android.videos # Google TV / Play Movies & TV
+com.google.android.youtube.tvmusic # YouTube Music
+# Disabled on this unit (SmartTube is used instead); uncomment to disable the stock YouTube app:
+# com.google.android.youtube.tv # stock YouTube app
+
+# ---------------------------------------------------------------------------------------------
+# ONLY AFTER com.gathin.tvhome IS INSTALLED.
+# com.google.android.tungsten.setupwraith also answers HOME (.RecoveryActivity at priority 1), which
+# outranks a third-party launcher once launcherx is disabled. On this unit all saved Wi-Fi networks
+# belong to android.uid.system:1000 (`dumpsys wifi | grep -o 'cname=[^ ]*'`), so disabling setupwraith
+# leaves Wi-Fi untouched.
+com.google.android.tungsten.setupwraith # setup wizard; blocks a third-party launcher from Home
diff --git a/examples/xiaomi-mitv-moor0/tv.json b/examples/xiaomi-mitv-moor0/tv.json
new file mode 100644
index 000000000..ef7add7e3
--- /dev/null
+++ b/examples/xiaomi-mitv-moor0/tv.json
@@ -0,0 +1,6 @@
+{
+ "tv": "Xiaomi MiTV-MOOR0 (venom, MediaTek)",
+ "os": "Google TV 11",
+ "brand": "Xiaomi",
+ "notes": "Mi ad row and PatchWall, Mi analytics, store demo, factory test HOME claimant (`com.duokan.factorytest`); voice, Miracast, Xiaomi media apps and stock YouTube off by choice, Chromecast and firmware updaters kept; setup wizard off (saved Wi-Fi belonged to `android.uid.system`) and `launcherx` replaced by CleanYourTV"
+}