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 Haier HRA962X2 (Ali6G), Android TV 9
laohuang12581c9fd516e67d9
diff --git a/examples/haier-hra962x2/README.md b/examples/haier-hra962x2/README.mdnew file mode 100644index 000000000..2feae1c63--- /dev/null+++ b/examples/haier-hra962x2/README.md@@ -0,0 +1,62 @@+# Haier HRA962X2 (HRA962X2_2G_ALI6G_A)++A China-market Haier set on the Aliyun YunOS stack (Ali6G board), Android 9, 2 GB of RAM,+firmware PPR1.180610.011.20220314. The stock Home is Youku's launcher; the debloat list+disables 40 packages: YunOS ad and telemetry services, the Aligenie voice stack, AirPlay and+Miracast receivers, the Haier U+ IoT apps, preloaded content and the Youku home itself.++## Read this before installing the launcher++**This firmware intercepts the remote's Home key.** `YunOSTVPolicy` (in the system server)+does not send the standard HOME broadcast; it reads `settings system currenthome` and starts+that mode's app directly, sending `yunostv_homeshell://start_home` for mode 3 (the Youku+home). A stock `launcher/build-and-install.sh` run therefore installs and takes Home fine,+but the remote's Home key then does nothing, because no installed launcher answers that URI.++The mode values on this set: 1 and 4 `com.yunos.tv.homeshell`, 2 a child home, 3 the Youku+home, 5 an education home (not installed). Keep the setting at 3.++The way out, on this firmware, is an intent filter for that URI on the launcher's+`MainActivity`:++```xml+<intent-filter>+ <action android:name="android.intent.action.VIEW" />+ <category android:name="android.intent.category.DEFAULT" />+ <category android:name="android.intent.category.BROWSABLE" />+ <data android:scheme="yunostv_homeshell" android:host="start_home" />+</intent-filter>+```++That is a source change to `launcher/app/src/main/AndroidManifest.xml`, so it is not shipped+here: build the launcher from a checkout with this filter added, and the Home key opens it.+`cmd package set-home-activity` alone does not help: it reports `Success` while+`resolve-activity` still names Haier's provision app, and only an explicitly started launcher+holds Home.++## Other things this set does++- **The idle screen is an ad.** The YunOS screensaver (`com.android.dreams.phototable`,+ "Yun Huabao") rotates sponsored pictures with no setting to turn it off in the TV menus.+ `settings put secure screensaver_enabled 0` stops it; the launcher's own clock screensaver+ (`home_idle_clock_minutes` in `config.xml` or a theme) replaces it.+- **Sideloads need an on-TV confirmation.** Installing an APK over ADB raises an+ `AliAlertDialog` "安全风险" (security risk) prompt that ADB key presses do answer: the+ "continue" button is one DPAD up from the default focus. `pm install` also runs minutes on+ this set and often times out the ADB connection while still succeeding - check+ `dumpsys package <pkg> | grep lastUpdateTime` before retrying.+- **The updater pushes preloads.** With `com.yunos.osupdate` enabled it installed+ `com.haier.aitv` (an Aligenie content app) on its own, which is why the list disables it.+ The apps it had pushed on this unit (`com.haier.tv.hm`, `com.haier.haiertv.ims`,+ `com.haier.aitv`, `com.yunos.tv.bluray`) were disabled first and are in the list.+- **Almost nothing declares a leanback entry point.** Fresh out of the box only Youku and the+ stock home answer `LEANBACK_LAUNCHER`, so a new Home comes up nearly empty: turn on+ `app_library` and seed `library_apps` in `launcher/app/src/main/res/values/config.xml` with+ the set's own apps (`com.hrtvbic.usb.mm` is the local media player, `com.xiaobaifile.tv`+ the file manager) before building.+- **No signal at boot.** After a reboot the firmware opens its "no signal" overlay+ (`com.haier.tv.menusetting/.RootActivity`) over the last input; one press of Home goes to+ the launcher. That is stock behaviour, not a debloat side effect.++The dock this set was set up with lives in `config.json` beside this file: the local media+player and the file manager, both installed on the set.diff --git a/examples/haier-hra962x2/config.json b/examples/haier-hra962x2/config.jsonnew file mode 100644index 000000000..6a0c1a7fe--- /dev/null+++ b/examples/haier-hra962x2/config.json@@ -0,0 +1,9 @@+{+ "dock_apps": [+ "com.hrtvbic.usb.mm",+ "com.xiaobaifile.tv"+ ],+ "columns": 4,+ "app_library": true,+ "lunar_date": true+}diff --git a/examples/haier-hra962x2/debloat.txt b/examples/haier-hra962x2/debloat.txtnew file mode 100644index 000000000..975bcc828--- /dev/null+++ b/examples/haier-hra962x2/debloat.txt@@ -0,0 +1,75 @@+# Haier HRA962X2_2G_ALI6G_A (Ali6G board), Android TV 9 (SDK 28), firmware PPR1.180610.011.20220314 test-keys+# A China-market set on the Aliyun YunOS stack: the stock Home is Youku's launcher, and the+# firmware's own packages are com.yunos.* / com.haier.*. Works as a starting point for other+# Haier sets on Ali6G with the same package set.+#+# Apply: TV_HOST=<tv ip> tools/disable.sh examples/haier-hra962x2/debloat.txt+# Undo: TV_HOST=<tv ip> tools/restore.sh examples/haier-hra962x2/debloat.txt+# Everything is DISABLED, not uninstalled. Comment out any line you want to keep.+#+# The updater is disabled here on purpose: on this set com.yunos.osupdate pushed a new preload+# (com.haier.aitv, an Aligenie content app) to /data/app while it was enabled. Re-enable it to+# check for firmware updates (remove the whole line to let check.py --fix re-disable it).+# Firmware updates arrive only while it is enabled.+#+# See README.md in this folder before installing the launcher: this firmware intercepts the+# remote's Home key in YunOSTVPolicy and sends a private intent instead of the standard HOME+# broadcast, so a stock launcher build does not receive the Home key without a manifest filter.++# YunOS advertising and telemetry+com.yunos.advert.service+com.yunos.adoplayer.service # the "Yun Huabao" ad screensaver content+com.yunos.tv.probe+com.yunos.ottauthclient+com.aliyun.uuid+com.alira.info+com.haier.activeuser+com.haier.tv.idst++# Haier promos, retail and webview ad shells+com.app.webapplication # Rendanheyi webview shell+com.haier.tv.downloadapk # silently installs pushed preloads+com.haier.yushuo+com.haier.tv.modelintroduction+com.haier.tv.speakingtest++# Aligenie voice assistant (remote voice button goes quiet)+com.alibaba.ailabs.genievision+com.yunos.tv.alitvasr+com.haier.tv.intelligentvoice+com.haier.voicehelper+com.haier.aitv # Aligenie content app pushed by the updater++# Casting+com.yunos.tv.airplayserver # AirPlay receiver; Chromecast/Miracast unaffected by this line alone+com.droidlogic.miracast # Miracast receiver++# Haier U+ IoT+com.haier.uhome.uplustv+com.haier.uhome.messageboard+com.haier.uhome.push+com.haierubic.usmartdevice+com.haier.tv.iotprovider++# Preloaded content nobody asked for+com.yunos.tv.edu+com.yunos.music+com.yunos.tv.bluray+com.yunos.tv.offline_downloader+com.haier.tv.kidsmode+com.audiocn.karaoke.micmanager # karaoke microphone manager+com.tv.gesturehaier # hand-gesture control+com.nibiru.play # VR video player+com.nibiru.alipaytv+com.haier.tv.hm # pushed Haier content app+com.haier.haiertv.ims # pushed Haier content app++# System tools replaced by the launcher+com.yunos.tvmgr # "Security Manager" cleaner app++# Firmware updater (see header)+com.yunos.osupdate++# Stock launchers, disabled only after launcher/build-and-install.sh made the new launcher Home+com.youku.taitan.tv # Youku stock home with sponsored rows+com.yunos.tv.homeshelldiff --git a/examples/haier-hra962x2/tv.json b/examples/haier-hra962x2/tv.jsonnew file mode 100644index 000000000..f8f634e5a--- /dev/null+++ b/examples/haier-hra962x2/tv.json@@ -0,0 +1,6 @@+{+ "tv": "Haier HRA962X2 (HRA962X2_2G_ALI6G_A)",+ "os": "Android TV 9",+ "brand": "Haier",+ "notes": "YunOS/Ali6G set: Youku stock home, Yun ad services, Aligenie voice, U+ IoT; the Home key needs the YunOS homeshell intent ([notes](haier-hra962x2/README.md))"+}