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 Acer R3 (SCBC device R3, Realtek rtd2841a), India, Android TV 14
Souvik Pal0a29b0887bca
diff --git a/examples/acer-ar3-r3/README.md b/examples/acer-ar3-r3/README.mdnew file mode 100644index 000000000..e0156cbea--- /dev/null+++ b/examples/acer-ar3-r3/README.md@@ -0,0 +1,124 @@+# Acer R3 (Android TV 14): debloated, with the launcher on the Home button++SCBC device `R3`, Realtek `rtd2841a` (board `rt2841a`), Android TV 14 / SDK 34, build `UKR1.251116`,+incremental `1236`, India. Done over network ADB, with a screenshot before and after the debloat+batch, after the launcher handover, and one cold boot.++Plain Android TV, not Google TV: `com.google.android.tungsten.setupwraith` is not installed on this+unit, so there is no setup-wizard Home/Wi-Fi handover trap (unlike the Google TV R4G note in+[`docs/devices/acer-r4g.md`](../../docs/devices/acer-r4g.md)). Same SCBC/Realtek platform family as+[`acer-ar55ar2851udpro/`](../acer-ar55ar2851udpro/) and+[`docs/devices/acer-ar55ar2851udfl.md`](../../docs/devices/acer-ar55ar2851udfl.md) (Realtek `rtd2851m`+there, `rtd2841a` here).++## Connect++```bash+export TV_HOST=<tv ip>+```++Port 5555 was already open (Developer options > Network/ADB debugging) and stayed open with no+separate Wireless-debugging pairing step.++## Debloat++```bash+TV_HOST=<tv ip> tools/disable.sh examples/acer-ar3-r3/debloat.txt+```++(Windows: `tools\disable.ps1 examples\acer-ar3-r3\debloat.txt`.) 32 packages, all disabled, none+uninstalled. The header of [`debloat.txt`](debloat.txt) says what each group is, what is kept on+purpose, and a firmware quirk with the remote's YouTube button (below). Everything under "Preloaded+apps and casting" is personal choice: comment out whatever you use.++Applied and checked on one unit, in one batch with a screenshot before and after, then one cold boot+(power cable out): Home, the Inputs menu's HDMI1/HDMI2/AV listing (`cmd package query-activities`)+and the dock all still worked afterwards. All 28 newly-disabled packages were still disabled+(`pm list packages -d`) after the reboot, confirming this Android TV variant does not re-enable+packages at boot the way the Google TV R4G note describes for a related platform.++## Launcher++`cmd package set-home-activity` worked directly here (no `stock_home_redirect` /+`HomeKeyService` fallback needed, unlike the `acer-ar55ar2851udpro` unit): the stock launcher+`com.google.android.tvlauncher` is disabled as part of the handover and Home resolves straight to+`com.gathin.tvhome/.MainActivity`, confirmed with `dumpsys activity activities | grep mFocusedApp`+and again after a cold boot.++```bash+HOME_KEY_SERVICE=1 launcher/build-and-install.sh+```++(Windows: `launcher\build-and-install.ps1 -TvHost <tv ip> -HomeKeyService`.) `HomeKeyService` is kept+on for the Home button's long-press fallback and the Settings/Input key-mapping hooks, even though no+redirect or key remapping is actually used on this unit.++[`config.json`](config.json) pushed with `tools/theme.sh examples/acer-ar3-r3`: the Live TV app for+the Inputs menu (HDMI1, HDMI2, AV, Live TV all listed and switch correctly), and `tile_menu` on so+holding OK on a tile offers Move / Replace with another app / App info instead of jumping straight to+Android's App info page. The dock itself (which apps, how many columns) is personal choice and not+part of this list; set `dock_apps` and `columns` to taste in your own theme or `config.xml` rebuild.++### Volume ramp with HomeKeyService bound++With `HomeKeyService` enabled at its default `key_filter` (true), holding Volume Up or Down on the+real remote steps once instead of ramping. This is the documented trade-off in+[`docs/TROUBLESHOOTING.md`](../../docs/TROUBLESHOOTING.md#a-key-helper-is-bound-and-a-held-remote-button-stopped-repeating):+once any accessibility service requests key filtering, this firmware's input pipeline drops the+auto-repeat before any app sees it. Since this unit uses no `settings_key_keycodes`/`scancodes`,+`input_key_keycodes` or `app_keys` that would need the filter, `config.json` sets `"key_filter":+false`: `HomeKeyService` stays bound (for the long-press fallback and any future key mapping) but+stops filtering, and the ramp is back. Confirmed on the real remote: a held Volume Up/Down ramps+normally, and `tile_menu`'s Move still works (hold OK, arrow keys carry the tile, Back drops it).++### Bluetooth Connect add-on (optional, personal choice)++The launcher has no built-in Bluetooth pill. On the tested unit the+[Bluetooth Connect](../../addons/bluetooth-connect/) add-on (`com.gathin.btconnect`) was installed+as a personal convenience, purely by the owner's own choice and not part of the debloat or launcher+steps above: it lists paired speakers with their connection state, and OK connects or disconnects.+Skip this section entirely if you have no need for it; nothing else in this list or `config.json`+depends on it. Verified on the tested unit: opening the tile shows the paired speaker with a working+Connect row.++```bash+TV_HOST=<tv ip> addons/bluetooth-connect/install.sh+```++(On Windows, without a POSIX shell: build with `addons/bluetooth-connect`'s own `gradlew`, then+`tools/b64push.py` the APK, `pm install -r` it over `tools/tv.py`, and grant+`BLUETOOTH_CONNECT` with `pm grant com.gathin.btconnect android.permission.BLUETOOTH_CONNECT`.)++### YouTube remote button: hardware-level, cannot be remapped++The remote's dedicated YouTube button sends keycode 2030, intercepted below Android's input layer by+the persistent system service `com.realtek.keyinterceptserver`, which starts+`com.google.android.youtube.tv` by a package name hardcoded in its own compiled code+(`RtkKeyInterceptService.java`). With YouTube disabled by this list, every press throws+`ActivityNotFoundException` inside that persistent process, which Android then restarts in place:+harmless, but the button does nothing, and `logcat` shows a crash/restart on every press.+`RtkInput`'s own log line ("`ap decide result is 1`") shows the vendor driver already claimed and+handled the key before Android's normal dispatch, let alone an accessibility service, ever sees it,+so the launcher's `app_keys`/`InputKeyService` remapping cannot reach it at all. Comment out the+YouTube line in `debloat.txt` if you want the button to open the real YouTube app without crashing+anything; it cannot be remapped to a different app (such as SmartTube) on this firmware. Same+limitation as the sibling `examples/acer-ar55ar2851udpro` list.++## Remote++Standard Android TV remote keys: Home, Back, volume (ramps correctly with `key_filter` off, see+above), Settings and Input all work with the new launcher. The Inputs menu opened and listed+HDMI1/HDMI2/AV/Live TV correctly on the real remote; the Settings pill opens TV Settings. The hold-OK+tile menu (Move/Replace/App info) is confirmed working on the real remote.++## Undo++```bash+TV_HOST=<tv ip> tools/restore.sh examples/acer-ar3-r3/debloat.txt+TV_HOST=<tv ip> tools/theme.sh --reset+```++Uninstall the launcher (`pm uninstall com.gathin.tvhome`) to give the Home button back to the stock+launcher (`pm enable --user 0 com.google.android.tvlauncher` first, since it was disabled as part of+the handover). If you installed the optional Bluetooth Connect add-on, `pm uninstall+com.gathin.btconnect` removes it too; it is unrelated to the rest of the undo.diff --git a/examples/acer-ar3-r3/config.json b/examples/acer-ar3-r3/config.jsonnew file mode 100644index 000000000..3ae56053c--- /dev/null+++ b/examples/acer-ar3-r3/config.json@@ -0,0 +1,5 @@+{+ "live_tv_package": "com.apps.livetv",+ "tile_menu": true,+ "key_filter": false+}\ No newline at end of filediff --git a/examples/acer-ar3-r3/debloat.txt b/examples/acer-ar3-r3/debloat.txtnew file mode 100644index 000000000..45ff59a40--- /dev/null+++ b/examples/acer-ar3-r3/debloat.txt@@ -0,0 +1,111 @@+# Acer R3 (SCBC device R3, Realtek RTD2841A), India, Android TV 14 (SDK 34), build UKR1.251116+# Fingerprint ACER/ACER/R3:14/UKR1.251116/1236:user/release-keys. Plain Android TV, not Google TV:+# com.google.android.tungsten.setupwraith is not installed on this unit, so there is no Wi-Fi/Home+# handover trap from that app. Same SCBC/Realtek platform family as examples/acer-ar55ar2851udpro+# and docs/devices/acer-ar55ar2851udfl.md (Realtek rtd2851m there, rtd2841a here).+#+# Apply: TV_HOST=<tv ip> tools/disable.ps1 examples/acer-ar3-r3/debloat.txt (or tools/disable.sh)+# Undo: TV_HOST=<tv ip> tools/restore.ps1 examples/acer-ar3-r3/debloat.txt (or tools/restore.sh)+# Everything is DISABLED, not uninstalled. Comment out any line you want to keep.+#+# Stock launcher: com.google.android.tvlauncher (priority 2, isDefault=true). The only other HOME+# claimants are com.apps.tvsettings (priority -999) and com.android.tv.settings (priority -1000),+# both FallbackHome-style, not real launchers. set-home-activity stuck directly here: no+# stock_home_redirect / HomeKeyService fallback was needed to take Home.+# HDMI/AV: com.apps.passthrough. Live TV: com.apps.livetv with com.apps.atv / com.apps.dtv / com.apps.atsc / com.apps.isdb.+#+# Applied and checked on one unit on 2026-10-29, in one batch with a screenshot before and after, then+# one cold boot (power cable out): Home, Live TV's HDMI1/HDMI2/AV listing, HomeKeyService's Home button+# and the launcher's dock all verified before and after the reboot. Every package below stayed disabled+# across that reboot (pm list packages -d), confirming this Android TV variant does not re-enable+# packages at boot the way the Google TV R4G note (docs/devices/acer-r4g.md) describes for a related+# platform. com.google.android.videos (Google Play Movies) is not installed on this unit; its line is+# commented out below so the list can still be applied as a whole.+#+# Kept on purpose, do not disable:+# - com.apps.passthrough, com.apps.atv, com.apps.dtv, com.apps.atsc, com.apps.isdb, com.android.providers.tv,+# com.apps.livetv: HDMI, AV and the tuners.+# - com.realtek.android.globalkeyhandler, com.realtek.keyinterceptserver, com.apps.smartkey, com.apps.virtualkey,+# com.mk.tv.fivekey, com.apps.bluetoothremote: the remote's keys (Input, Settings, YouTube hotkey).+# - com.apps.sys, com.mk.service.tvmidware: TV middleware (as the Haier com.cltv.mal note warns, #1578).+# - com.apps.tvsettings, com.android.tv.settings, com.apps.smartmenu: settings UI and the picture menu.+# - com.realtek.leanbacklauncher.partnercustomizer: supplies the Inputs button on tvlauncher.+# - com.realtek.power, com.realtek.energymode, com.realtek.display.monitor, com.realtek.hw.configprovider,+# com.realtek.media.notification, com.realtek.mdnsoffload, com.android.tv.mdnsoffloadmanager.+# - com.realtek.factorytools, com.apps.factory.ui: factory menus, never launched (do not open them either;+# see PROMPT.md and docs/TROUBLESHOOTING.md on CVTE/Haier factory menus flipping a factory-mode flag).+# - com.apps.ota, com.apps.authota: the firmware updater, left enabled; keep unless you have a reason not to.+# - com.google.android.tv.remote.service, com.google.android.tv.dfuservice, com.google.android.presetup.bluetoothpair,+# com.android.bluetooth, com.android.localtransport: remote pairing, firmware updates and Bluetooth.+# - com.google.android.katniss: Assistant / voice search (mic button).+# - com.google.android.apps.mediashell: Chromecast built-in.+# - com.creative.fastscreen.tv: FastCast Miracast receiver (screen mirroring).+# - com.google.android.inputmethod.latin, com.google.android.gsf, com.google.android.gms, com.android.vending,+# com.google.android.webview: the on-screen keyboard, Play Services and Play Store.+# - com.apps.logapp, com.apps.plugins: unclear/unknown-benefit system packages (logapp shares the system+# UID; plugins reports the remote's battery level), left alone as this repo does for ambiguous packages.+#+# Quirk on this firmware:+# - The remote's YouTube button (keycode 2030) is intercepted below Android's input layer by the+# persistent system service com.realtek.keyinterceptserver, which starts com.google.android.youtube.tv+# by a package name hardcoded in its own compiled code. With that package disabled, every press throws+# ActivityNotFoundException inside that persistent process, which Android then restarts in place+# (harmless, but the button does nothing and logcat shows a crash/restart on every press). The+# launcher's app_keys/InputKeyService remapping cannot reach this key at all: RtkInput's own log line+# ("ap decide result is 1") shows the vendor driver already claimed and handled it before Android's+# normal key dispatch, let alone an accessibility service, ever sees it. Comment out the YouTube line+# below if you want the button to open the real YouTube app without crashing anything; it cannot be+# remapped to a different app on this firmware. Same limitation as the sibling+# examples/acer-ar55ar2851udpro list.+#+# New launcher: HOME_KEY_SERVICE=1 launcher/build-and-install.sh (tvlauncher is disabled below; Home then+# resolves straight to the new launcher with no redirect needed). Keep HomeKeyService bound even though no+# stock_home_redirect is set: it is still what gives Home its long-press fallback and the Settings/Input+# key mapping hooks, should you ever need them. If you enable it with the default key_filter=true and find+# a held Volume Up/Down only steps once instead of ramping, this is the documented trade-off in+# docs/TROUBLESHOOTING.md ("A key helper is bound and a held remote button stopped repeating"): set+# key_filter to false in config.xml (or a theme) to get the ramp back, at no cost on this unit, since no+# settings_key_keycodes/scancodes, input_key_keycodes or app_keys are used here. Confirmed on the remote:+# both the volume ramp and config.xml's tile_menu (hold OK on a tile for Move / Replace / App info) work+# correctly with key_filter=false.++# SCBC / Google telemetry, consent and background sync+com.apps.function.gdpr # SCBC data-consent agent+com.google.android.feedback+com.android.tv.feedbackconsent+com.android.adservices.api+com.android.ondevicepersonalization.services+com.android.federatedcompute.services+com.google.android.partnersetup # Google partner setup / RLZ pings+com.google.android.syncadapters.calendar++# Ads, content rows, auto-installs and demo/signage+com.apps.mk.wd # boot receiver with ClickAd/ClickApp/ClickChannel activities+android.autoinstalls.config.scbc.device # Play auto-installs of partner apps+com.google.android.tvrecommendations # sponsored and recommendation rows on the stock Home+com.apps.esticker # ShowService overlay, demo stickers+com.mk.tv.meeting.service # digital-signage service with an accessibility service+com.apps.tvmanager # TV manager / cleaner++# Not needed on a TV+com.android.healthconnect.controller+com.android.health.connect.backuprestore+com.apps.wifihotspot # TV as a Wi-Fi hotspot+com.mk.tv.timeclock # WorldClock+com.apps.function.audiolink # Audio Link+com.android.dreams.basic # basic "Colors" screensaver+com.android.printspooler # no printer attached to a TV+com.apps.usbmediaplayer # USB media player demo app (ships Firebase auth leftovers)+com.seraphic.webview # HbbTV engine core+com.seraphic.hbbtv.app # HbbTV app; India has no HbbTV++# Preloaded apps and casting (personal choice: comment out any you use)+com.google.android.marvin.talkback # TalkBack screen reader: keep it if anyone uses it+com.google.android.youtube.tv # see the firmware quirk note above re: the remote's YouTube button+com.google.android.youtube.tvmusic+com.apps.scast # a second casting receiver alongside FastCast (kept above)+# com.google.android.videos # Google Play Movies; not installed on the tested unit+com.netflix.ninja # Netflix+com.netflix.tokenmanager # Netflix helper; disable alongside com.netflix.ninja+com.google.android.play.games # Google Play Games+com.amazon.amazonvideo.livingroom # Prime Video\ No newline at end of filediff --git a/examples/acer-ar3-r3/tv.json b/examples/acer-ar3-r3/tv.jsonnew file mode 100644index 000000000..53c8d42cc--- /dev/null+++ b/examples/acer-ar3-r3/tv.json@@ -0,0 +1,6 @@+{+ "tv": "Acer R3 (SCBC device R3, Realtek rtd2841a), India",+ "os": "Android TV 14",+ "brand": "Acer",+ "notes": "SCBC/Realtek platform family relative of acer-ar55ar2851udpro (rtd2851m there, rtd2841a here); plain Android TV, no setupwraith installed; SCBC consent agent, Android ad services, feedback, auto-install, recommendation rows, demo/signage/cleaner apps, Health Connect, Wi-Fi hotspot, HbbTV off; Netflix, Prime Video, Play Games, YouTube, YouTube Music, SCast, TalkBack off by choice (Google Play Movies not installed on the tested unit); FastCast, Assistant, Chromecast and OTA kept; set-home-activity stuck directly, no redirect needed; key_filter false brings back the volume ramp with HomeKeyService bound (docs/TROUBLESHOOTING.md); tile_menu on for Move/Replace/App info; YouTube's remote button is intercepted below Android's input layer with the target package hardcoded, so it cannot be remapped; reboot-checked"+}\ No newline at end of file