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
docs(examples): Mi Box S 2nd gen build 683 variant and theme
Carmonacu429d4c866bd6
diff --git a/examples/xiaomi-mi-box-s-2nd-gen/README.md b/examples/xiaomi-mi-box-s-2nd-gen/README.mdnew file mode 100644index 000000000..a65cba2d3--- /dev/null+++ b/examples/xiaomi-mi-box-s-2nd-gen/README.md@@ -0,0 +1,69 @@+# Xiaomi Mi Box S 2nd gen (MiTV-AFKR0) — validated variants++Stock list: [`debloat.txt`](debloat.txt) (launcherx + setupwraith after CleanYourTV is Home).++## RTT0.211222.001.683 (EU, Carmonacu setup)++Validated on **MiTV-AFKR0** / **jaws**, **Google TV 11**, build **`RTT0.211222.001.683`**, 2 GB RAM, Xiaomi RC+(`Vendor_2717_Product_32b9.kl`). Differs from the **737/772** notes in the header of `debloat.txt`: shortcut scancodes+use **425/426** for YouTube (not keycode 190), **240/416** for Netflix, **207** for Prime Video.++### Extra packages disabled (beyond `debloat.txt`)++| Package | Why |+| --- | --- |+| `com.xiaomi.android.tvsetup.partnercustomizer` | Stock shortcut handler; must be off for `app_keys` / CleanYourTV key services |+| `com.google.android.youtube.tv` | Replaced by SmartTube (`org.smarttube.stable`) |+| `com.netflix.ninja` | Not used |++### Launcher++- CleanYourTV with **`InputKeyService`** and **`HomeKeyService`** (`launcher/build-and-install.ps1 -InputKeyService -HomeKeyService`).+- Theme: [`carmonacu-theme/`](carmonacu-theme/) (nature photos from `themes/nature-calm`, green-tinted background, dock + remote map in `config.json`).++```powershell+$env:TV_HOST = '<box-ip>'+powershell -ExecutionPolicy Bypass -File tools\theme.ps1 -TvHost $env:TV_HOST examples\xiaomi-mi-box-s-2nd-gen\carmonacu-theme+```++### Remote (`app_keys` in theme / `config.xml`)++| Button | Scancode(s) | App |+| --- | --- | --- |+| Netflix | 240, 416 | Crunchyroll |+| YouTube | 425, 426 | SmartTube stable |+| Prime | 207 | Max (`com.wbd.stream`) |++Wake the remote with **OK** before testing; first press after sleep is often dropped.++### Private DNS (AdGuard)++Blocks many tracker/ad domains system-wide; **does not** remove in-app video ads inside YouTube (use SmartTube) or all+streaming ads (Disney+/Max may still show promos). Tested:++```powershell+adb -s <box-ip>:5555 shell settings put global private_dns_specifier dns.adguard-dns.com+adb -s <box-ip>:5555 shell settings put global private_dns_mode hostname+```++Undo: `settings put global private_dns_mode opportunistic` (and delete specifier if needed).++### Animation scale++Snappier UI on 2 GB devices:++```powershell+adb shell settings put global window_animation_scale 0.5+adb shell settings put global transition_animation_scale 0.5+adb shell settings put global animator_duration_scale 0.5+```++### Apply debloat (this variant)++Use the stock list, then the extras above (or `debloat-phase1.txt` + `setupwraith` after launcher install). Keep+`com.xiaomi.mitv.updateservice` disabled only if you accept no OTA from Xiaomi.++### Still working after soak++Wi‑Fi (re-enter password once if `setupwraith` was removed while the network was tied to it), Chromecast, Google+Assistant, SmartTube + Disney+ + Crunchyroll + Max, Bluetooth remote shortcuts via scancodes.diff --git a/examples/xiaomi-mi-box-s-2nd-gen/carmonacu-theme/CREDITS.md b/examples/xiaomi-mi-box-s-2nd-gen/carmonacu-theme/CREDITS.mdnew file mode 100644index 000000000..212493371--- /dev/null+++ b/examples/xiaomi-mi-box-s-2nd-gen/carmonacu-theme/CREDITS.md@@ -0,0 +1,31 @@+Wallpaper photos from Wikimedia Commons, each under its own licence (CC BY or CC BY-SA), not the repository's MIT licence.+Changes made to every picture: cropped to 16:9, resized (1920x1080, or a little smaller to stay under 300 KB) and darkened toward the bottom and left edges so the dock+and text stay readable. Adaptations of the CC BY-SA pictures stay under CC BY-SA.++- 001.jpg: "Karst mountains colorful clouds and mist at sunrise from the top of Mount Nam Xay Vang Vieng Laos.jpg" by Basile Morin, CC BY-SA 4.0+ https://commons.wikimedia.org/wiki/File:Karst_mountains_colorful_clouds_and_mist_at_sunrise_from_the_top_of_Mount_Nam_Xay_Vang_Vieng_Laos.jpg+- 002.jpg: "Foggy Reflections - Loch Tummel.jpg" by Eric Kilby, CC BY-SA 4.0+ https://commons.wikimedia.org/wiki/File:Foggy_Reflections_-_Loch_Tummel.jpg+- 003.jpg: "Morning at Tham Sakoen.jpg" by BerryJ, CC BY-SA 4.0+ https://commons.wikimedia.org/wiki/File:Morning_at_Tham_Sakoen.jpg+- 004.jpg: "Lake Mystery, Canterbury, New Zealand 05.jpg" by Michal Klajban, CC BY-SA 4.0+ https://commons.wikimedia.org/wiki/File:Lake_Mystery,_Canterbury,_New_Zealand_05.jpg+- 005.jpg: "Pryor's Wood Bluebells 2017-04-26-4.jpg" by Colin, CC BY-SA 4.0+ https://commons.wikimedia.org/wiki/File:Pryor%27s_Wood_Bluebells_2017-04-26-4.jpg+- 006.jpg: "Steindorf am Ossiacher See Sankt Urban Ossiacher See und Dobratsch 04112015 2185.jpg" by Johann Jaritz, CC BY-SA 4.0+ https://commons.wikimedia.org/wiki/File:Steindorf_am_Ossiacher_See_Sankt_Urban_Ossiacher_See_und_Dobratsch_04112015_2185.jpg+- 007.jpg: "Karula vaade.jpg" by Amadvr, CC BY-SA 3.0+ https://commons.wikimedia.org/wiki/File:Karula_vaade.jpg+- 008.jpg: "Dülmen, Rorup, NSG Roruper Holz -- 2021 -- 8187-91.jpg" by Dietmar Rabich, CC BY-SA 4.0+ https://commons.wikimedia.org/wiki/File:D%C3%BClmen,_Rorup,_NSG_Roruper_Holz_--_2021_--_8187-91.jpg+- 009.jpg: "Mossy forest in Lierneux (DSC01260).jpg" by Trougnouf, CC BY 4.0+ https://commons.wikimedia.org/wiki/File:Mossy_forest_in_Lierneux_(DSC01260).jpg+- 010.jpg: "Cheow Lan Lake, Rainforest, Khao Sok, Thailand.jpg" by Vyacheslav Argenberg, CC BY 4.0+ https://commons.wikimedia.org/wiki/File:Cheow_Lan_Lake,_Rainforest,_Khao_Sok,_Thailand.jpg+- 011.jpg: "Тарасів обрій. Світанок (edited).jpg" by Oleksandr Malyon adapted by Radomianin, CC BY-SA 4.0+ https://commons.wikimedia.org/wiki/File:%D0%A2%D0%B0%D1%80%D0%B0%D1%81%D1%96%D0%B2_%D0%BE%D0%B1%D1%80%D1%96%D0%B9._%D0%A1%D0%B2%D1%96%D1%82%D0%B0%D0%BD%D0%BE%D0%BA_(edited).jpg+- 012.jpg: "Kuang Si Falls and a turquoise water pool in Luang Prabang province Laos.jpg" by Basile Morin, CC BY-SA 4.0+ https://commons.wikimedia.org/wiki/File:Kuang_Si_Falls_and_a_turquoise_water_pool_in_Luang_Prabang_province_Laos.jpg++Licences: CC BY 4.0 https://creativecommons.org/licenses/by/4.0/ , CC BY-SA 4.0 https://creativecommons.org/licenses/by-sa/4.0/ ,+CC BY-SA 3.0 https://creativecommons.org/licenses/by-sa/3.0/diff --git a/examples/xiaomi-mi-box-s-2nd-gen/carmonacu-theme/config.json b/examples/xiaomi-mi-box-s-2nd-gen/carmonacu-theme/config.jsonnew file mode 100644index 000000000..ea924ee08--- /dev/null+++ b/examples/xiaomi-mi-box-s-2nd-gen/carmonacu-theme/config.json@@ -0,0 +1,41 @@+{+ "greeting_name": "Carmonacu",+ "dock_apps": [+ "org.smarttube.stable",+ "com.disney.disneyplus",+ "com.crunchyroll.crunchyroid",+ "com.wbd.stream"+ ],+ "hidden_apps": [+ "com.netflix.ninja",+ "com.google.android.youtube.tv",+ "com.amazon.amazonvideo.livingroom"+ ],+ "app_keys": [+ "scan:240:com.crunchyroll.crunchyroid",+ "scan:416:com.crunchyroll.crunchyroid",+ "scan:425:org.smarttube.stable",+ "scan:426:org.smarttube.stable",+ "scan:207:com.wbd.stream"+ ],+ "background_color": "#071510",+ "wallpaper": true,+ "wallpaper_rotation_minutes": 5,+ "wallpaper_order": "shuffle",+ "wallpaper_captions": true,+ "wallpaper_true_color": true,+ "wallpaper_dim": 14,+ "columns": 6,+ "rows_below_dock": 1,+ "fill_dock": true,+ "dock_glass": true,+ "dock_opacity": 40,+ "dock_even_padding": true,+ "icon_only_buttons": true,+ "icon_only_inputs": true,+ "ambient_glow": false,+ "app_glow": true,+ "fade_rows": true,+ "focus_overshoot": false,+ "advanced_effects": true+}diff --git a/examples/xiaomi-mi-box-s-2nd-gen/carmonacu-theme/screenshot.jpg b/examples/xiaomi-mi-box-s-2nd-gen/carmonacu-theme/screenshot.jpgnew file mode 100644index 000000000..c3eb1adcaBinary files /dev/null and b/examples/xiaomi-mi-box-s-2nd-gen/carmonacu-theme/screenshot.jpg differdiff --git a/examples/xiaomi-mi-box-s-2nd-gen/carmonacu-theme/wallpapers/001.jpg b/examples/xiaomi-mi-box-s-2nd-gen/carmonacu-theme/wallpapers/001.jpgnew file mode 100644index 000000000..5e586db91Binary files /dev/null and b/examples/xiaomi-mi-box-s-2nd-gen/carmonacu-theme/wallpapers/001.jpg differdiff --git a/examples/xiaomi-mi-box-s-2nd-gen/carmonacu-theme/wallpapers/002.jpg b/examples/xiaomi-mi-box-s-2nd-gen/carmonacu-theme/wallpapers/002.jpgnew file mode 100644index 000000000..81f400b91Binary files /dev/null and b/examples/xiaomi-mi-box-s-2nd-gen/carmonacu-theme/wallpapers/002.jpg differdiff --git a/examples/xiaomi-mi-box-s-2nd-gen/carmonacu-theme/wallpapers/003.jpg b/examples/xiaomi-mi-box-s-2nd-gen/carmonacu-theme/wallpapers/003.jpgnew file mode 100644index 000000000..8918eeb48Binary files /dev/null and b/examples/xiaomi-mi-box-s-2nd-gen/carmonacu-theme/wallpapers/003.jpg differdiff --git a/examples/xiaomi-mi-box-s-2nd-gen/carmonacu-theme/wallpapers/004.jpg b/examples/xiaomi-mi-box-s-2nd-gen/carmonacu-theme/wallpapers/004.jpgnew file mode 100644index 000000000..c820b5af3Binary files /dev/null and b/examples/xiaomi-mi-box-s-2nd-gen/carmonacu-theme/wallpapers/004.jpg differdiff --git a/examples/xiaomi-mi-box-s-2nd-gen/carmonacu-theme/wallpapers/005.jpg b/examples/xiaomi-mi-box-s-2nd-gen/carmonacu-theme/wallpapers/005.jpgnew file mode 100644index 000000000..73ceafd30Binary files /dev/null and b/examples/xiaomi-mi-box-s-2nd-gen/carmonacu-theme/wallpapers/005.jpg differdiff --git a/examples/xiaomi-mi-box-s-2nd-gen/carmonacu-theme/wallpapers/006.jpg b/examples/xiaomi-mi-box-s-2nd-gen/carmonacu-theme/wallpapers/006.jpgnew file mode 100644index 000000000..49323790bBinary files /dev/null and b/examples/xiaomi-mi-box-s-2nd-gen/carmonacu-theme/wallpapers/006.jpg differdiff --git a/examples/xiaomi-mi-box-s-2nd-gen/carmonacu-theme/wallpapers/007.jpg b/examples/xiaomi-mi-box-s-2nd-gen/carmonacu-theme/wallpapers/007.jpgnew file mode 100644index 000000000..e7c6552e2Binary files /dev/null and b/examples/xiaomi-mi-box-s-2nd-gen/carmonacu-theme/wallpapers/007.jpg differdiff --git a/examples/xiaomi-mi-box-s-2nd-gen/carmonacu-theme/wallpapers/008.jpg b/examples/xiaomi-mi-box-s-2nd-gen/carmonacu-theme/wallpapers/008.jpgnew file mode 100644index 000000000..c58355eefBinary files /dev/null and b/examples/xiaomi-mi-box-s-2nd-gen/carmonacu-theme/wallpapers/008.jpg differdiff --git a/examples/xiaomi-mi-box-s-2nd-gen/carmonacu-theme/wallpapers/009.jpg b/examples/xiaomi-mi-box-s-2nd-gen/carmonacu-theme/wallpapers/009.jpgnew file mode 100644index 000000000..e6edaa4cdBinary files /dev/null and b/examples/xiaomi-mi-box-s-2nd-gen/carmonacu-theme/wallpapers/009.jpg differdiff --git a/examples/xiaomi-mi-box-s-2nd-gen/carmonacu-theme/wallpapers/010.jpg b/examples/xiaomi-mi-box-s-2nd-gen/carmonacu-theme/wallpapers/010.jpgnew file mode 100644index 000000000..4bc6c2bbeBinary files /dev/null and b/examples/xiaomi-mi-box-s-2nd-gen/carmonacu-theme/wallpapers/010.jpg differdiff --git a/examples/xiaomi-mi-box-s-2nd-gen/carmonacu-theme/wallpapers/011.jpg b/examples/xiaomi-mi-box-s-2nd-gen/carmonacu-theme/wallpapers/011.jpgnew file mode 100644index 000000000..db51b6bbbBinary files /dev/null and b/examples/xiaomi-mi-box-s-2nd-gen/carmonacu-theme/wallpapers/011.jpg differdiff --git a/examples/xiaomi-mi-box-s-2nd-gen/carmonacu-theme/wallpapers/012.jpg b/examples/xiaomi-mi-box-s-2nd-gen/carmonacu-theme/wallpapers/012.jpgnew file mode 100644index 000000000..0b1481489Binary files /dev/null and b/examples/xiaomi-mi-box-s-2nd-gen/carmonacu-theme/wallpapers/012.jpg differdiff --git a/examples/xiaomi-mi-box-s-2nd-gen/carmonacu-theme/wallpapers/captions.txt b/examples/xiaomi-mi-box-s-2nd-gen/carmonacu-theme/wallpapers/captions.txtnew file mode 100644index 000000000..f7e3fa260--- /dev/null+++ b/examples/xiaomi-mi-box-s-2nd-gen/carmonacu-theme/wallpapers/captions.txt@@ -0,0 +1,12 @@+001.jpg Misty karst valley at sunrise, Laos - Basile Morin, CC BY-SA 4.0+002.jpg Autumn reflections, Loch Tummel, Scotland - Eric Kilby, CC BY-SA 4.0+003.jpg Morning mist at Tham Sakoen, Thailand - BerryJ, CC BY-SA 4.0+004.jpg Lake Mystery, New Zealand - Michal Klajban, CC BY-SA 4.0+005.jpg Spring bluebell beech wood, Pryor's Wood UK - Colin, CC BY-SA 4.0+006.jpg Autumn calm lake, Ossiacher See Austria - Johann Jaritz, CC BY-SA 4.0+007.jpg Winter frosted forest at sunrise, Karula Estonia - Amadvr, CC BY-SA 3.0+008.jpg Green forest with sunbeams, Roruper Holz Germany - Dietmar Rabich, CC BY-SA 4.0+009.jpg Mossy forest, Lierneux Belgium - Trougnouf, CC BY 4.0+010.jpg Misty rainforest lake, Khao Sok Thailand - Vyacheslav Argenberg, CC BY 4.0+011.jpg Misty river dawn, Cherkasy Ukraine - Oleksandr Malyon, CC BY-SA 4.0+012.jpg Kuang Si turquoise pool, Laos - Basile Morin, CC BY-SA 4.0diff --git a/examples/xiaomi-mi-box-s-2nd-gen/debloat-phase1.txt b/examples/xiaomi-mi-box-s-2nd-gen/debloat-phase1.txtnew file mode 100644index 000000000..8c4df9900--- /dev/null+++ b/examples/xiaomi-mi-box-s-2nd-gen/debloat-phase1.txt@@ -0,0 +1,21 @@+# Phase 1: telemetry, Mi promos, preloads — before disabling setupwraith.+# See README.md (build 683). Omit lines you want to keep.++com.miui.tv.analytics+com.xiaomi.statistic+com.google.android.feedback+com.google.android.partnersetup+com.mitv.tvhome.oemtab+com.mitv.tvhome.michannel+com.mitv.tvhome.mitvplus+com.mitv.tvhome.atv+com.xm.webcontent+android.autoinstalls.config.xioami.mibox3+com.xiaomi.mitv.updateservice+com.amazon.amazonvideo.livingroom+com.google.android.videos+com.google.android.play.games+com.android.printspooler+com.xiaomi.android.tvsetup.partnercustomizer+com.google.android.youtube.tv+com.netflix.ninjadiff --git a/examples/xiaomi-mi-box-s-2nd-gen/debloat-phase2-setupwraith.txt b/examples/xiaomi-mi-box-s-2nd-gen/debloat-phase2-setupwraith.txtnew file mode 100644index 000000000..a10ea6be9--- /dev/null+++ b/examples/xiaomi-mi-box-s-2nd-gen/debloat-phase2-setupwraith.txt@@ -0,0 +1 @@+com.google.android.tungsten.setupwraithdiff --git a/examples/xiaomi-mi-box-s-2nd-gen/debloat.txt b/examples/xiaomi-mi-box-s-2nd-gen/debloat.txtindex 82ecfc4b9..43363558f 100644--- a/examples/xiaomi-mi-box-s-2nd-gen/debloat.txt+++ b/examples/xiaomi-mi-box-s-2nd-gen/debloat.txt@@ -83,6 +83,12 @@ com.amazon.amazonvideo.livingroom # Prime Videocom.google.android.videos # Google TV / Play Moviescom.google.android.play.gamescom.android.printspooler+# com.google.android.youtube.tv # optional: disable when using SmartTube (org.smarttube.stable)+# com.netflix.ninja # optional: disable if unused++# Remote shortcut handler on Mi Box S 2nd gen; disable when using CleanYourTV app_keys + InputKeyService+# (see README.md, build 683). Safe on 737 when you do not rely on app_keys.+# com.xiaomi.android.tvsetup.partnercustomizer# ONLY AFTER com.gathin.tvhome IS INSTALLED. Disabling launcherx alone hands Home to the setup wizard's# RecoveryActivity, so the wizard has to go too. Re-enable it before a factory reset (restore.sh does).diff --git a/examples/xiaomi-mi-box-s-2nd-gen/tv.json b/examples/xiaomi-mi-box-s-2nd-gen/tv.jsonindex 35773b3e1..abb839a4c 100644--- a/examples/xiaomi-mi-box-s-2nd-gen/tv.json+++ b/examples/xiaomi-mi-box-s-2nd-gen/tv.json@@ -2,5 +2,5 @@"tv": "Xiaomi Mi Box S 2nd gen (MiTV-AFKR0, jaws), streaming box","os": "Google TV 11","brand": "Xiaomi",- "notes": "Mi ad row and PatchWall, Mi analytics, partner auto-installs, update service off by choice; setup wizard off for the launcher, Wi-Fi password re-entry note"+ "notes": "Mi ad row and PatchWall, Mi analytics, partner auto-installs; setupwraith off for launcher; EU build 683: disable partnercustomizer for app_keys, YouTube scancodes 425/426 — see README.md and carmonacu-theme/"}