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
Merge PR #1061: examples: add TiVo Stream 4K (SEI Robotics, Amlogic S905Y2, NES), Android TV 12
Gathin236ea85f864241
diff --cc examples/tivo-stream-4k/README.mdindex 000000000,422f2eeb5..c75f6e35cmode 000000,100644..100644--- a/examples/tivo-stream-4k/README.md+++ b/examples/tivo-stream-4k/README.md@@@ -1,0 -1,57 +1,57 @@@+ # TiVo Stream 4K++ SEI Robotics `IPA1104HDW` (SKU `RA2400`, device `SEI400TV`), Amlogic S905Y2, 2 GB RAM, Android TV 12, build `SC.1272`,+ security patch 2025-07-05, NES middleware. Tested on one real unit on 2026-10-22.++ ## Why `tools/disable.sh` does not work here++ The firmware answers every `pm disable-user`, `pm disable`, `pm disable <component>` and `pm hide` with a refusal+ ("This command is illegal!", or "Shell cannot change component state"), and refuses `pm uninstall --user 0` for its core+ apps. What works, per package: `pm suspend --user 0`, `cmd appops set <pkg> RUN_ANY_IN_BACKGROUND ignore` and+ `am force-stop`, all of which survive a reboot. A suspended package still receives its boot broadcasts and bindings, so+ some processes come back after every boot and need another `am force-stop`.++ ## Apply++ ```bash+ export TV_HOST=192.168.1.50+ L=examples/tivo-stream-4k/debloat.txt+ tools/venv/bin/python -I tools/recovery.py --save "$L" # record the box first, like tools/disable.sh+ grep -vE '^\s*(#|$)' "$L" | awk '{print $1}' | while read -r p; do+ echo "pm suspend --user 0 $p"+ echo "cmd appops set $p RUN_ANY_IN_BACKGROUND ignore"+ echo "am force-stop $p"+ done | tools/venv/bin/python -I tools/tv.py --batch+ ```+-Do the last group (the stock launcher) only after another launcher answers the Home key, see below.++The last group (the stock launcher) is commented out in the list: uncomment it only after another launcher answers the Home key, see below.++ ## Undo++ ```bash+ L=examples/tivo-stream-4k/debloat.txt+ grep -vE '^\s*(#|$)' "$L" | awk '{print $1}' | while read -r p; do+ echo "pm unsuspend --user 0 $p"+ echo "cmd appops reset --user 0 $p"+ done | tools/venv/bin/python -I tools/tv.py --batch+ ```++ ## The launcher++ The stock launcher declares HOME with priority 2: `set-home-activity` answers `Success` and changes nothing.+ `com.nes.coreservice` (`EvoBlackListAppsFun`) uninstalls, at every boot, every non-system app that declares+ `android.intent.category.HOME`, and a fixed list of 53 packages (alternative launchers, Downloader, Magisk, IPTV+ variants) from `array/evo_black_list_to_uninstall_pkgs` in its `resources.arsc`.++ What worked on this unit, across several reboots with `coreservice` running: remove the HOME category from this+ launcher's `MainActivity` intent filter (it stays listed as a Leanback launcher) and open it by component from a+ small accessibility service on the Home key. The stock launcher cannot be suspended while it owns the HOME role: move+ it first with `cmd package set-home-activity --user 0 com.android.tv.settings/.system.FallbackHome`.++ The remote's Assistant button is handled by Android before the accessibility key filter, so `app_keys` cannot take it.++ Remote buttons (`0471:1207`): TiVo `DVR` (173), Guide `GUIDE` (172), Live keycode `5124`, Skip `MEDIA_SKIP_FORWARD` (272). They do+ nothing on the stock firmware once `com.nes.tvglobalkeyhandler` is gone; map them with `app_keys` and+ `settings_key_keycodes` in a theme, with `HOME_KEY_SERVICE=1`. `theme/config.json` only holds the dock.++ A fuller write-up, the patches and the measurements: https://github.com/lucaswotta/tivo-stream-4k-debloatdiff --cc examples/tivo-stream-4k/debloat.txtindex 000000000,c2fd4b670..127f0c8f3mode 000000,100644..100644--- a/examples/tivo-stream-4k/debloat.txt+++ b/examples/tivo-stream-4k/debloat.txt@@@ -1,0 -1,62 +1,63 @@@+ # TiVo Stream 4K (SEI Robotics IPA1104HDW, SKU RA2400, device SEI400TV, Amlogic S905Y2, NES middleware), 2 GB RAM+ # Android TV 12 (SDK 31), build SC.1272, 32-bit (armeabi-v7a), security patch 2025-07-05+ #+ # Apply and undo: the commands in README.md here, NOT tools/disable.sh (this firmware refuses it).+ # Everything is SUSPENDED and barred from the background, not disabled or uninstalled.+ # Comment out any line you want to keep.+ #+ # Stock launcher: com.google.android.tvlauncher (classic Android TV). HOME priority 2, so set-home-activity says+ # "Success" and changes nothing; README.md here explains how Home reaches another launcher. A streaming stick: no+ # HDMI inputs and no tuner. Suspending the stock launcher only works after it stops owning the HOME role.+ #+ # Known quirks on this firmware:+ # - Every pm disable-user, pm disable <component> and pm hide is refused ("This command is illegal!"); pm uninstall+ # --user 0 is refused for core apps. pm suspend and appops work and survive a reboot.+ # - Port 5555 opens as soon as USB debugging is on, with a per-computer prompt; there is no separate network toggle.+ # - com.nes.coreservice runs EvoBlackListAppsFun at every start (its BootReceiver, kicked by the persistent+ # com.nes.daemon): it uninstalls every non-system app whose activity declares android.intent.category.HOME, and a+ # fixed list of 53 packages from array/evo_black_list_to_uninstall_pkgs (alternative launchers, Downloader,+ # Magisk, IPTV "Magis TV" variants). Suspending it does not stop its boot receiver.+ # - A suspended package still gets its boot broadcasts: coreservice, sageservice, tvlauncher, katniss,+ # tvrecommendations and tvbugtracker are running again after a boot. Stop them with am force-stop.+ #+ # Kept on purpose (checked with dumpsys package):+ # com.uei.uas.tivo UEI QuickSet: the remote switches the TV on and off+ # com.sei.hdmi.services HDMI-CEC+ # com.nes.tivo.remote.pair Bluetooth remote pairing; remote.ota updates the remote's firmware+ # com.google.android.apps.mediashell Chromecast (suspending it saved no memory: another component binds it)+ # Play Store, Play Services, keyboard, TV Settings++ # Telemetry and feedback+ com.google.android.feedback+ com.google.android.partnersetup # Google RLZ partner attribution pings+ com.nes.tvbugtracker # NES bug tracker++ # App blocker and NES background services+ com.nes.coreservice # uninstalls launchers and sideload tools at boot; polls the update status once a second+ com.nes.daemon # persistent: the system re-creates it, so suspending changes nothing visible+ com.tivo.sageservice # TiVo service, no use outside the US++ # Recommendations, partner rows and auto-installs+ com.google.android.tvrecommendations # also switch its notification listener off: cmd notification disallow_listener+ android.autoinstalls.config.sei # Play auto-install of partner apps++ # Preloaded apps, off by choice+ com.android.printspooler+ com.google.android.marvin.talkback # re-enable if you need the screen reader+-# Stock launcher and unused services (after another launcher is Home and the HOME role has moved)-com.google.android.tvlauncher-com.google.android.backdrop # ambient screensaver-com.android.camera2 # no camera on a stick-com.android.gallery3d-com.google.android.katniss # Assistant; also clear settings assistant and voice_interaction_service, or the system keeps it alive++# Stock launcher and unused services: only once another launcher answers the Home key and the HOME role has++# moved. The launcher in this repo doesn't take Home on this box yet, so these stay commented out here.++# com.google.android.tvlauncher++# com.google.android.backdrop # ambient screensaver++# com.android.camera2 # no camera on a stick++# com.android.gallery3d++# com.google.android.katniss # Assistant; also clear settings assistant and voice_interaction_service, or the system keeps it alive++ # Already removed by the owner before the list (pm uninstall --user 0), kept as comments so a fresh box can decide:+ # com.tivo.atom+ # com.tivo.tivoplusplayer+ # com.tivo.tvlaunchercustomization+ # com.nes.skywayclient # NES device manager: boot ads, silent installs, firmware check+ # com.nes.tvglobalkeyhandler # remote shortcut keys+ # com.utsmta.app # NES factory test app+ # com.google.android.play.games