Skip to content

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

Add Xiaomi Mi Box S (MIBOX4, Android TV 9) debloat example

Narendra Ram283677aff5d3
diff --git a/README.md b/README.md
index 89c5b11cc..396e29384 100644
--- a/README.md
+++ b/README.md
@@ -99,6 +99,7 @@ Lists that people have tested and contributed live in [`examples/`](examples/):
|---|---|
| Xiaomi Mi TV 4A (MiTV-MOOQ1) | Android TV 10 |
| Xiaomi MiTV-AXSO0 | Android TV 9 |
+| Xiaomi Mi Box S (MIBOX4), streaming box | Android TV 9 |
| TCL 55" 4K Google TV, 2023 (G10) | Google TV 12 |
| SANYO ATV R2 | Android TV 9 |
| OnePlus TV (D00) | Google TV 14 |
diff --git a/examples/README.md b/examples/README.md
index 944aba859..22f2fe239 100644
--- a/examples/README.md
+++ b/examples/README.md
@@ -8,6 +8,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 |
| `tcl-g10-google-tv/` | TCL 55" 4K Google TV, 2023 (G10, G10_4K_US_NF) | Google TV 12 | TCL TV+, TCL Live, store demo, smartlink installer |
| `xiaomi-mitv-axso0/` | Xiaomi MiTV-AXSO0 (dangal) | Android TV 9 | PatchWall, Mi analytics, MiLink; voice, Chromecast, unused streaming apps off by choice |
+| `xiaomi-mi-box-s/` | Xiaomi Mi Box S (MIBOX4, oneday), streaming box | Android TV 9 | PatchWall, Mi analytics, Alphonso ad tracking, MiLink; voice, casting, phone remote off by choice |
| `sanyo-atv-r2/` | SANYO ATV R2 (SCBC, Realtek RTD285O) | Android TV 9 | S-Channels, E-SHOW demo, Vewd, TV Booster, SANYO OTA |
| `oneplus-tv-dubai/` | OnePlus TV (D00, Dubai) | Google TV 14 | HeyTap/OnePlus extras, OnePlus Connect, Smart Home |
diff --git a/examples/xiaomi-mi-box-s/debloat.txt b/examples/xiaomi-mi-box-s/debloat.txt
new file mode 100644
index 000000000..596450bcf
--- /dev/null
+++ b/examples/xiaomi-mi-box-s/debloat.txt
@@ -0,0 +1,73 @@
+# Xiaomi Mi Box S (model MIBOX4, MDZ-22-AB, codename oneday, Amlogic gxl), Android TV 9 (SDK 28),
+# firmware PI.3933 (built 2021-09-28), security patch 2021-07-05, 2 GB RAM, 1920x1080. Indian unit:
+# PatchWall arrived through Xiaomi's update service.
+# Fingerprint: Xiaomi/oneday/oneday:9/PI/3933:user/release-keys
+#
+# Apply: TV_HOST=<box ip> tools/disable.sh examples/xiaomi-mi-box-s/debloat.txt
+# Undo: TV_HOST=<box ip> tools/restore.sh examples/xiaomi-mi-box-s/debloat.txt
+# Everything is DISABLED, not uninstalled. Comment out any line you want to keep.
+#
+# A streaming box: no HDMI-in or tuner, so the Inputs menu has nothing to list; set live_tv_package empty in
+# config.xml. Stock launcher: com.google.android.tvlauncher (the scripts' default).
+#
+# Notes from this box:
+# - Leave alone: com.xiaomi.android.tvsetup.partnercustomizer (receives the remote's shortcut buttons as
+# GLOBAL_BUTTON, and runs the remote-pairing steps of setup), mitv.service (Xiaomi TvServer, persistent),
+# com.google.android.tungsten.setupwraith (remote pairing), com.droidlogic* (Amlogic system, Bluetooth).
+# - USB debugging alone opens network ADB on port 5555 (service.adb.tcp.port=5555).
+# - USB debugging CUTS POWER to the USB port: with sys.usb.config=adb, /vendor/etc/init/hw/init.amlogic.usb.rc
+# writes 0xFDFFFFFF to register 0xc883443c and the port switches to ADB device mode, so a USB speaker or drive
+# goes dead; sys.usb.config=mtp (debugging off) writes 0xFD7FFFFF and powers it again. Turn debugging off when done.
+# - cmd package set-home-activity needs the component on Android 9 (com.gathin.tvhome/.MainActivity).
+# - Location is off, so Android 9 hides the Wi-Fi name from apps and the launcher's pill just says "Wi-Fi".
+# - Remote (Vendor_2717_Product_32b9): the Netflix key still opens Netflix; BUTTON_2 opened Live Channels and
+# does nothing once it is disabled; BUTTON_3/4 and ALL_APPS did nothing even on stock. No crashes either way.
+# - Survives a reboot: nothing is re-enabled at boot, the launcher stays Home. Free RAM after boot went from
+# about 770 MB to 1.15 GB.
+# - A process of the disabled stock launcher can linger until the next reboot; `am force-stop` clears it.
+
+# Xiaomi + Google telemetry and ad tracking
+com.miui.tv.analytics # Mi analytics: reads logs and app usage
+tv.alphonso.alphonso_eula # Alphonso ad tracking, reads app usage stats
+com.google.android.feedback
+com.google.android.tv.bugreportsender
+
+# PatchWall, content rows, promos, auto-installs
+com.mitv.tvhome.atv # PatchWall
+com.mitv.tvhome.michannel # Mi Channel rows on the home screen
+com.xm.webcontent # Xiaomi web promos
+com.google.android.tvrecommendations
+android.autoinstalls.config.xioami.mibox3 # Play auto-install of partner apps (sic, "xioami")
+
+# Xiaomi background services
+com.xiaomi.mitv.updateservice # firmware and PatchWall updates, installs apps; re-enable to check for an update
+com.mitv.download.service # its download helper
+
+# Personal choice: voice assistant (the mic button stops working)
+com.google.android.katniss
+com.google.android.speech.pumpkin
+
+# Personal choice: casting, mirroring and the phone remote
+com.google.android.apps.mediashell # Chromecast built-in
+com.mitv.milinkservice # Mi cast (MiLink)
+com.mitv.videoplayer # Mi video player, used by MiLink; VLC opens video files instead
+com.google.android.tv.remote.service # Google TV / Android TV Remote phone app
+
+# Preloaded apps
+com.google.android.tv # Live Channels
+com.google.android.marvin.talkback # screen reader (was off)
+com.android.printspooler
+
+# Google Ambient photo screensaver, replaced by the launcher's Clock. Switch the screensaver first:
+# tools/tv.py 'settings put secure screensaver_components com.gathin.tvhome/.ClockDream'
+com.google.android.backdrop
+
+# Already disabled on this unit before we started; uncomment the ones yours still has enabled
+# com.amazon.amazonvideo.livingroom # Prime Video
+# com.google.android.youtube.tvmusic
+# com.google.android.videos # Play Movies & TV
+# com.google.android.play.games
+# com.android.camera2
+
+# Stock Google TV launcher, replaced by launcher/
+com.google.android.tvlauncher