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: add Home+ STB-6252C (Inspur, MediaTek MT5221), Android TV 11
shiiyuan821211e417129677e8
diff --git a/examples/homeplus-stb-6252c/README.md b/examples/homeplus-stb-6252c/README.mdnew file mode 100644index 000000000..52c6f133c--- /dev/null+++ b/examples/homeplus-stb-6252c/README.md@@ -0,0 +1,58 @@+# Home+ STB-6252C++The cable and OTT box China Network Systems (Home+, 中嘉寬頻, Taiwan) rents out, made by Inspur:+`STB-6252C`, MediaTek MT5221, 1.85 GB RAM, 32-bit userspace, Android TV 11 (API 30, Operator Tier),+build `Homeplustv/STB6252C/STB6252C:11/MAIN/2.22.12`. Debloated and running this repo's launcher in place+of the operator launcher. Everything is disabled, nothing is uninstalled; `debloat.txt` says why each+package went and lists what was kept on purpose.++All commands run from the repo root on Windows. ADB has to be on for any of them: Developer options >+USB debugging, then accept the prompt on the box. Port 5555 opens with that alone.++## Install++```powershell+tools\disable.ps1 -TvHost <box ip> examples\homeplus-stb-6252c\debloat.txt+launcher\build-and-install.ps1 -TvHost <box ip> -StockLauncher com.inspur.isoc.launcher+```++`-StockLauncher` is required: the operator launcher is not one the script recognises.++Run `build-and-install.ps1` in a console window. With command-line tools 15859902 the SDK writes XML+version 4, Gradle prints a harmless warning about it on stderr, and Windows PowerShell 5.1 turns that line+into a terminating error when stderr is redirected. The script stops before it touches the box.++## Undo everything++```powershell+tools\restore.ps1 -TvHost <box ip> examples\homeplus-stb-6252c\debloat.txt -Stock com.inspur.isoc.launcher+```++## Live TV++The Live TV app is `com.android.tv` (the operator's LiveTv_CNS build) on the DVB-C tuner+`com.inspur.tang.mwtvinput/.MWTvInputService/HW28`. Put it in the dock and set it as `live_tv_package`.++The launcher's Inputs menu sends Live TV a passthrough channel URI. LiveTv_CNS cannot parse it on a cold+start, and its window closes again, which looks like a crash. In a theme's `config.json`:++```json+"live_tv_package": "com.android.tv",+"live_tv_input_id": "none",+"input_sources": ["HW28=-"]+```++`live_tv_input_id` names an input that does not exist, so the Live TV row falls back to starting the app+normally, which works. `input_sources` drops the tuner's own row, which sends the same URI.++## Notes++- `screencap` returns an empty file. Check Home with `dumpsys window | grep mCurrentFocus`.+- There is no Google launcher. The only other HOME claimant is `com.android.tv.settings/.system.FallbackHome`.+- `com.inspur.android.daemon` stays enabled. It runs the front LED, a low-memory process killer, the+ remote's global keys (the YouTube button) and some boot-time settings. It does not re-enable packages+ or reset Home, and it did not kill the launcher in the background.+- The box is usually on Wi-Fi. Disabling a `com.inspur.*` package with the system uid logs+ "Remove all networks for app", but the saved networks belong to the system and survived. Check+ `cmd wifi list-networks` before and after.+- The box is not Netflix certified, and Play Store reports Netflix as incompatible.diff --git a/examples/homeplus-stb-6252c/debloat.txt b/examples/homeplus-stb-6252c/debloat.txtnew file mode 100644index 000000000..81aa02562--- /dev/null+++ b/examples/homeplus-stb-6252c/debloat.txt@@ -0,0 +1,86 @@+# Home+ (中嘉寬頻, Taiwan) STB-6252C, Inspur "Homeplustv", MediaTek MT5221, 1.85 GB RAM, 32-bit (armeabi-v7a)+# Android TV 11 (API 30), Operator Tier. Tested on build Homeplustv/STB6252C/STB6252C:11/MAIN/2.22.12 (2024-09-05 patch).+#+# Apply: tools\disable.ps1 -TvHost <box ip> examples\homeplus-stb-6252c\debloat.txt+# Undo: tools\restore.ps1 -TvHost <box ip> examples\homeplus-stb-6252c\debloat.txt -Stock com.inspur.isoc.launcher+# Everything is DISABLED, not uninstalled. Comment out any line you want to keep.+#+# Connecting: Developer options > USB debugging. service.adb.tcp.port=5555 is baked into the firmware,+# so port 5555 is open whenever USB debugging is on. ro.adb.secure=1: accept the prompt on screen once.+# No device owner / MDM. Sideloading is allowed (install_non_market_apps=1).+#+# Quirks: `screencap` returns a 0-byte file on this box, so verify Home with+# `dumpsys window | grep mCurrentFocus` instead of screenshots.+#+# Stock launcher: com.inspur.isoc.launcher (CNS_Launcher, HOME priority 2). There is NO Google launcher+# on this box; the only other HOME claimant is com.android.tv.settings/.system.FallbackHome. The+# launcher rotates friDay 影音 promo posters every 5 s (RecommendPosterRotationFrameView). Its embedded+# TvInputService is not a registered TV input (dumpsys tv_input lists only the DVB-C tuner+# com.inspur.tang.mwtvinput/.MWTvInputService/HW28), so disabling the launcher does not touch cable TV.+# It is NOT in this list: launcher\build-and-install.ps1 -StockLauncher com.inspur.isoc.launcher disables+# it once com.gathin.tvhome owns Home. While it stays enabled, HOME priority 2 beats the new launcher's 0+# and `cmd package set-home-activity` to com.gathin.tvhome is ignored.+#+# Live TV: com.android.tv (operator build LiveTv_CNS) on the tuner above. It cannot parse the passthrough+# channel URI the launcher's Inputs menu sends on a cold start (ContentUriUtils.safeParseId), and its window+# closes again, which looks like a crash. Set "live_tv_input_id": "none" in a theme so the Live TV row starts+# the app normally, and "input_sources": ["HW28=-"] to drop the tuner's own row, which sends the same URI.+#+# Firmware updater: this list DISABLES com.inspur.httpupgrade (the operator's OTA client, a PERSISTENT+# priv-app). Reason: the owner chose to freeze the firmware so that an operator update cannot re-enable the+# packages below or hand Home back to the stock launcher. Consequence: no firmware, security-patch or+# channel-table updates arrive while it is off. Being PERSISTENT, an empty process still starts at boot+# (no services, about 5 MB). Re-enable it (`pm enable com.inspur.httpupgrade`), let the update run, then+# re-apply the list with tools\check.py --fix.+#+# Watchdog: com.inspur.android.daemon is left enabled. From its APK: LightsService (front LED),+# ProcessMonitorService (force-stops cached processes not on the allow list in assets/processes.json),+# GlobalKeyReceiver (remote keys such as YouTube), and boot-time sleep/dream/animation/HDMI-CEC settings.+# Nothing in it re-enables packages or resets Home, and it did not kill com.gathin.tvhome in the+# background (Android protects the Home process). Disabling it would lose the LED and the YouTube key.+#+# Wi-Fi: disabling a uid 1000 com.inspur.* package logs "Remove all networks for app"; the saved networks+# survived because their creator is android.uid.system. Check `cmd wifi list-networks` before and after.+#+# Leave alone: com.inspur.tang.mwtvinput (DVB-C cable tuner, TIF input), com.android.tv (Live TV),+# com.inspur.cns.settings (channel and time settings), com.atv.keymanage (remote keys), com.atv.setupwizard,+# com.actions.* (Bluetooth remote firmware, pairing, volume), com.omni.simplesetup (remote's TV/AVR IR setup),+# com.omni.modeswitch, com.omni.sci, com.mstar.* and com.mtk.systemcontrol (SoC services),+# com.google.android.tv.remote.service (BT remote), com.google.android.tungsten.setupwraith,+# Play Store / Play services, the keyboard. Never start com.inspur.factory (factory test).+#+# Kept on by the owner's choice (disable them if you do not use them): com.google.android.katniss+# (voice search, 110-196 MB resident), com.google.android.apps.mediashell (Chromecast built-in, about 137 MB),+# com.google.android.youtube.tv, com.disney.disneyplus, tw.com.app.watchtv, com.inspur.member.center,+# com.omni.otademo (ODM OTA), com.inspur.cnsvbm (VbmService + AreaLimitationService; purpose unknown,+# may be tied to the cable entitlement, untested).+#+# Netflix: the box is not Netflix certified (no ro.netflix.* properties); Play Store answers+# "your device isn't compatible with this version".++# Ads on the home screen and interstitials+com.inspur.adservice # CNS_AD: operator ad service, resident BaseService/ADService (system uid)+com.litv.interstital # LiTV interstitial ad SDK (LiAdSDK)+com.inspur.cns.ticker # 跑馬燈 FloatTextService: scrolling text overlay fed by DVB DSMCC++# Google recommendations / telemetry+com.google.android.tvrecommendations # recommendation rows + notification panel service (~26 MB resident)+com.google.android.feedback # Google feedback reports+com.google.android.syncadapters.calendar # calendar sync, nothing on the box uses it++# Preloads nothing on a TV box needs+com.google.android.play.games # Play Games++# Streaming apps the owner does not use (comment out the ones you watch). All but HBO GO are+# UPDATED_SYSTEM_APP: base APK in /system/product/app, Play update in /data. They auto-start at boot and+# each holds 130-170 MB while idle, so this group is where the RAM goes.+com.skysoft.kkbox.android # KKBOX (base /system/product/app/KKBOX)+com.catchplay.asiaplay.common.tv # CATCHPLAY++com.litv.cable.home # LiTV+net.fetnet.fetvod.tv # friDay 影音 (base /system/product/app/friDayAPP); the launcher's poster carousel advertises it+tv.fourgtv.video # 四季線上 4gTV (base /system/product/app/4gTVshow)+com.hbo.asia.androidtv # HBO GO (plain third-party app, Play Store reinstalls it)+com.google.android.videos # Google Play Movies & TV (base /system/product/app/VideosPano)++# Operator firmware updater (see header for why; comment this line out to receive updates again)+com.inspur.httpupgrade # 中嘉 OTA client, resident HttpService, PERSISTENTdiff --git a/examples/homeplus-stb-6252c/tv.json b/examples/homeplus-stb-6252c/tv.jsonnew file mode 100644index 000000000..0e32eef61--- /dev/null+++ b/examples/homeplus-stb-6252c/tv.json@@ -0,0 +1,6 @@+{+ "tv": "Home+ STB-6252C (中嘉寬頻, Inspur, MT5221), DVB-C/OTT box",+ "os": "Android TV 11",+ "brand": "Home+",+ "notes": "Operator ad service, LiTV ad SDK, DVB ticker overlay, Google recommendations/feedback, Play Games; KKBOX, CATCHPLAY+, LiTV, friDay, 4gTV, HBO GO, Play Movies off by choice; operator OTA off to freeze firmware; operator launcher replaced (HOME priority 2, pass -StockLauncher); watchdog daemon kept; DVB-C tuner must stay; Live TV needs live_tv_input_id none; screencap returns empty; not Netflix certified; 1.85 GB"+}