Skip to content

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

examples: add Xiaomi Mi Box S (MIBOX4, oneday), Android TV 12 update, with its remote

Alimango Studio4ac3201f41ea
diff --git a/examples/xiaomi-mi-box-s-android12/README.md b/examples/xiaomi-mi-box-s-android12/README.md
new file mode 100644
index 000000000..3afaf65e5
--- /dev/null
+++ b/examples/xiaomi-mi-box-s-android12/README.md
@@ -0,0 +1,47 @@
+# Xiaomi Mi Box S (MIBOX4), Android TV 12
+
+The same box as [`xiaomi-mi-box-s`](../xiaomi-mi-box-s/) after Xiaomi's Android 12 update: build
+`Xiaomi/oneday/oneday:12/STTC.230106.001/4560:user/release-keys`, security patch 2023-09-05, SDK 31, 2 GB RAM,
+1920x1080. In daily family use since 2026-10-22 with a custom launcher as Home and the packages in
+[`debloat.txt`](debloat.txt) disabled.
+
+## The remote
+
+The bundled Bluetooth remote, as Android 12 sees it (`dumpsys input`):
+
+| | |
+|---|---|
+| Name | `Xiaomi RC` |
+| Bus | Bluetooth HID (`bus=0x0005`) |
+| Vendor / product | `0x2717` / `0x32b9` |
+| Key layout | `/vendor/usr/keylayout/Vendor_2717_Product_32b9.kl` (with a matching `.idc`) |
+| Classes | keyboard, D-pad, cursor, mic |
+
+Pairing is held by `com.google.android.tv.remote.service` (it scans for the name `Xiaomi RC`), so leave that
+package enabled. HDMI-CEC from the TV's own remote comes in as a separate device (`cec_input`).
+
+The buttons, from the `.kl` on this build:
+
+| Button | Scancode | Android key | Notes |
+|---|---|---|---|
+| Power | 116 | `POWER` | |
+| D-pad, OK | 103/108/105/106, 28 and 353 | `DPAD_*`, `DPAD_CENTER` | |
+| Back | 158 (also 173, 174) | `BACK` | |
+| Home | 172 (also 102) | `HOME` | |
+| ☰ (menu) | 127, 139 | `MENU` | Checked with the real remote: reaches the app in front, so a launcher can use it. |
+| Apps | 580 (also 216) | `ALL_APPS` | As on Android 9: Android hands it to `com.android.tv.settings`, which ignores it. |
+| Mic | 582 (also 144) | `ASSIST` | Checked with the real remote: goes to whatever holds the Assistant role (Google Assistant by default) through the remote service, not to the app in front. A launcher that holds the role gets it. |
+| Volume +/− | 115, 114 | `VOLUME_UP`, `VOLUME_DOWN` | Xiaomi's SystemUI draws its own volume pill on the right; it cannot be hidden without root. |
+| Netflix, Prime Video | 393, 240, 416 | `BUTTON_6` | Changed from Android 9, where 393 was `NETFLIX`. Not checked with a press on this unit. |
+
+To see a press yourself: `TV_HOST=<tv ip> tools/venv/bin/python -I tools/tv.py 'getevent -lt'`, then press the
+button.
+
+## What differs from the Android 9 list
+
+- Android 12 has no Backdrop screensaver; Xiaomi's is `com.mitv.dream`. Set `screensaver_components` to
+ another dream (the launcher's clock, or `com.android.dreams.basic/.Colors`) before disabling it.
+- The firmware updater (`com.xiaomi.mitv.updateservice`) and its download helper are commented out in the list,
+ as upstream prefers. This unit has both disabled by the family's choice.
+- Mi analytics and the Xiaomi stats uploader were removed for user 0 on this unit before the list existed; the
+ list disables them instead, which `tools/restore.sh` can undo.
diff --git a/examples/xiaomi-mi-box-s-android12/debloat.txt b/examples/xiaomi-mi-box-s-android12/debloat.txt
new file mode 100644
index 000000000..4120d6c20
--- /dev/null
+++ b/examples/xiaomi-mi-box-s-android12/debloat.txt
@@ -0,0 +1,42 @@
+# Xiaomi Mi Box S (model MIBOX4, codename oneday), Android TV 12 (SDK 31), firmware STTC.230106.001.4560,
+# security patch 2023-09-05, 2 GB RAM, 1920x1080. Upstream's xiaomi-mi-box-s list is the same box on Android 9;
+# this unit runs Xiaomi's Android 12 update.
+# Fingerprint: Xiaomi/oneday/oneday:12/STTC.230106.001/4560:user/release-keys
+#
+# Apply: TV_HOST=<box ip> tools/disable.sh examples/xiaomi-mi-box-s-android12/debloat.txt
+# Undo: TV_HOST=<box ip> tools/restore.sh examples/xiaomi-mi-box-s-android12/debloat.txt
+# Everything is DISABLED, not uninstalled. Comment out any line you want to keep.
+#
+# A streaming box: no HDMI-in or tuner. Stock launcher: com.google.android.tvlauncher (the scripts' default).
+# The remote and its buttons on this build: README.md in this folder.
+#
+# Notes from this box (in daily family use since 2026-10-22 with a custom launcher as Home):
+# - Every active line below is disabled on this unit except the two telemetry apps, which were removed for
+# user 0 on 2026-10-22 before this list existed; disabling them is the reversible way to get the same result.
+# - The remote's mic button is ASSIST and goes to Google Assistant through the TV remote service; no app can
+# intercept it unless it holds the Assistant role.
+# - Xiaomi's own volume pill (SystemUI VolumeVerticalUIManager) cannot be hidden without root on Android 12.
+# - With PatchWall, the recommendations and Xiaomi's screensaver off, the box idles noticeably cooler and the
+# launcher scrolls without stutter; nothing else changed in two days of Netflix, Prime Video and YouTube.
+
+# Xiaomi telemetry
+com.miui.tv.analytics # Mi analytics: reads logs and app usage
+com.xiaomi.statistic # Xiaomi usage stats uploader
+
+# PatchWall, content rows, ad-funded channels
+com.mitv.tvhome.atv # PatchWall
+com.mitv.tvhome.michannel # Mi Channel rows
+com.mitv.tvhome.mitvplus # Mi TV+ ad-funded channels
+com.google.android.tvrecommendations
+com.xm.webcontent # Xiaomi web promos
+
+# Xiaomi updater: left enabled here. This unit has both disabled by the family's choice (no surprise
+# PatchWall reinstalls); uncomment only if you will re-enable them now and then to check for an update.
+# com.xiaomi.mitv.updateservice # firmware and PatchWall updates, installs apps
+# com.mitv.download.service # its download helper
+
+# Personal choice: Mi casting
+com.mitv.milinkservice # Mi cast (MiLink); Chromecast is separate and keeps working
+
+# Xiaomi screensaver, replaced by the launcher's clock
+com.mitv.dream # set screensaver_components to another dream first, or the screen stays on
diff --git a/examples/xiaomi-mi-box-s-android12/tv.json b/examples/xiaomi-mi-box-s-android12/tv.json
new file mode 100644
index 000000000..5ce530289
--- /dev/null
+++ b/examples/xiaomi-mi-box-s-android12/tv.json
@@ -0,0 +1,6 @@
+{
+ "tv": "Xiaomi Mi Box S (MIBOX4, oneday), streaming box, Android 12 update",
+ "os": "Android TV 12",
+ "brand": "Xiaomi",
+ "notes": "PatchWall, Mi channels and Mi TV+, Mi analytics and stats uploader, web promos, recommendations, MiLink and Xiaomi screensaver off; Chromecast, voice and updater kept; [remote and buttons](xiaomi-mi-box-s-android12/README.md)"
+}