Skip to content

Debloat any Android or Google TV over Wi-Fi and get an Apple TV-style home.

examples: Sony BRAVIA VU3 remote app buttons need launcherx, kept with the Home redirect

vishal27shetty00b06b714243
diff --git a/docs/TROUBLESHOOTING.md b/docs/TROUBLESHOOTING.md
index 5501e41ef..1051c1ec7 100644
--- a/docs/TROUBLESHOOTING.md
+++ b/docs/TROUBLESHOOTING.md
@@ -827,6 +827,15 @@ handled go dead, the same trade without a `settings` write. Write back the exact
printed; the empty list also unbinds TalkBack. Bisect, keycodes and limits:
[the G09 note](devices/tcl-55p71b-g09-key-repeat.md).
+Where launcherx is what answers the buttons, keeping it enabled and redirecting its home screen keeps both. On a
+Sony BRAVIA VU3 (`BRAVIA_VU3_4K`, Google TV 14, `UKR1.240726.001`) the Netflix, YouTube, Prime Video and YouTube
+Music buttons are global keys (`BUTTON_4`, `BUTTON_14`, `BUTTON_2`, `BUTTON_15`) routed to
+`com.realtek.advancesetting`, which on a Google TV hands each launch to launcherx's `GlobalButtonLaunch_Receiver`
+and drops it when launcherx is disabled. `InputKeyService` with their scancodes in `app_keys` opened all four but
+cost the ramp, and the volume key never reached the helper, so `consume_volume_keys` could not repeat it.
+launcherx enabled, `stock_home_redirect` set to it, `key_filter` false and `HomeKeyService` bound gave the buttons,
+the ramp and the new Home together ([the VU3 notes](../examples/sony-bravia-vu3/README.md)).
+
A [Sony KD-55X9000H PA-firmware follow-up](devices/sony-kd-55x9000h.md#later-remote-key-follow-up-24-october-2026) on Android 12 reproduced the same filter/repeat conflict with a personal fork. Its simultaneous kernel/callback capture saw held Volume in hardware but neither Volume direction in the helper. A separate saved-layout experiment retained Apps and native Volume without key filtering; it requires that fork's companion and Library entry, reserves an application-launch category, and has not been tested across restart/sleep/reconnect. It is not a stock upstream option.
## The soundbar on ARC/eARC falls asleep and the TV does not wake it
diff --git a/examples/sony-bravia-vu3/README.md b/examples/sony-bravia-vu3/README.md
new file mode 100644
index 000000000..61455aede
--- /dev/null
+++ b/examples/sony-bravia-vu3/README.md
@@ -0,0 +1,67 @@
+# Sony BRAVIA VU3 (Google TV 14, Realtek rtd2885m)
+
+Android product `BRAVIA_VU3` / `BRAVIA_VU3_4K`, build `UKR1.240726.001`. The list in `debloat.txt` came from a
+KD-55X75K. A second unit on the same product and build, on Wi-Fi in India, was set up on 25 October 2026 and is
+what the notes below are about: its remote's app buttons.
+
+| File | What it is |
+|---|---|
+| `debloat.txt` | The tested list; it disables launcherx last, after the new launcher owns Home |
+
+**How much testing is behind it:** one session on the second unit. The list's packages were disabled in three
+batches plus setupwraith, and the new launcher was installed. After one reboot with the final setup, the owner
+checked Home, the four app buttons and the volume ramp on the real remote.
+
+## The remote's app buttons need launcherx
+
+With launcherx disabled as the list does, the Netflix, YouTube, Prime Video and YouTube Music buttons on the
+Bluetooth remote (`SONY TV VRC 001`) do nothing. They are global keys routed to Realtek's settings app:
+
+| Button | Scancode | Keycode | Global key receiver |
+|---|---|---|---|
+| Netflix | 758 | `BUTTON_4` | `com.realtek.advancesetting/.GlobalKeyReceiver` |
+| YouTube | 569 | `BUTTON_14` | same |
+| Prime Video | 652 | `BUTTON_2` | same |
+| YouTube Music | 653 | `BUTTON_15` | same |
+
+`dumpsys window policy | grep -A30 GlobalKey` shows the table. The receiver logs `handlerGlobalkey` and
+`Starting packageName = ...` for each press, then starts nothing. Its `Utils.startApp` checks the
+`com.google.android.feature.AMATI_EXPERIENCE` system feature, which this Google TV has, and then hands the launch
+to launcherx with a `com.google.global_button.ACTION_LAUNCH_APP` broadcast to
+`launcherx/.globalbutton.GlobalButtonLaunch_Receiver`. It sends that broadcast only when the receiver can be
+resolved, so with launcherx disabled the press is dropped and nothing is logged as failing.
+
+Answering the buttons in the new launcher instead needs a key-filtering helper. `app_keys` with scancodes 758, 569,
+652 and 653 and `INPUT_KEY_SERVICE=1` opened all four apps, but held Volume then moved one step per press. On this
+set the volume key never reaches the helper (a log line in `VolumeKeys.handle` saw the Netflix button and not
+Volume), so `consume_volume_keys` cannot repeat it either.
+
+## Install with launcherx kept
+
+Keep launcherx enabled and let `HomeKeyService` send its home screen on to the new launcher, with key filtering
+off. The buttons then go through launcherx as they did before the cleanup, and the volume ramp stays.
+
+1. Apply the list without its last line (launcherx), or re-enable launcherx afterwards:
+ `TV_HOST=<tv-ip> tools/tv.py 'pm enable --user 0 com.google.android.apps.tv.launcherx'`.
+2. Install the launcher without disabling the stock one:
+ `TV_HOST=<tv-ip> STOCK_LAUNCHER=none RESTORE_KEY_SERVICES=1 launcher/build-and-install.sh`.
+ Its Home check then reports launcherx and exits 1, which is expected with launcherx kept.
+3. Before step 2, set these in `launcher/app/src/main/res/values/config.xml`: `stock_home_redirect` to
+ `com.google.android.apps.tv.launcherx`, `key_filter` to false and `restore_key_services` to true.
+4. Enable the helper:
+ `tools/tv.py 'settings put secure enabled_accessibility_services com.gathin.tvhome/.HomeKeyService'` and
+ `tools/tv.py 'settings put secure accessibility_enabled 1'`.
+
+Home from inside an app lands on `com.gathin.tvhome/.MainActivity` (`mFocusedApp`); Google TV's home flashes for a
+moment first. After a reboot the TV started into the new launcher. Do not force-stop the launcher from Settings:
+that unbinds the helper until Home next starts, and `restore_key_services` puts it back then.
+
+## Other notes from the second unit
+
+- Live TV is `com.android.tv`; the inputs are `com.realtek.tv.passthrough`, and the Input button goes to
+ `com.sony.dtv.smartui`, which stays enabled.
+- The display had an override size of 1920x1080 on a 3840x2160 panel before anything changed; leave it.
+- Network debugging was only offered as Wireless debugging. It switched itself off at every reboot, and port
+ 5555 opened only with USB debugging on.
+- setupwraith did not own the Wi-Fi network (`cname=android.uid.system`), so disabling it kept the TV online.
+- Disabling setupwraith costs phone casting after the next reboot, as the list's comment says.
diff --git a/examples/sony-bravia-vu3/debloat.txt b/examples/sony-bravia-vu3/debloat.txt
index ad8536ae2..a0dd89f30 100644
--- a/examples/sony-bravia-vu3/debloat.txt
+++ b/examples/sony-bravia-vu3/debloat.txt
@@ -10,6 +10,10 @@
# HDMI/AV inputs continued to work. This list is for the recorded product/build; verify your own TV.
# Stock launcher: com.google.android.apps.tv.launcherx. The custom launcher was installed and confirmed
# as Home before this package was disabled; restore.sh takes the stock launcher package above.
+# Second unit (same product and build, India, 25 October 2026): with launcherx disabled the remote's Netflix,
+# YouTube, Prime Video and YouTube Music buttons do nothing, because Realtek's GlobalKeyReceiver hands them to
+# launcherx. Keeping launcherx with stock_home_redirect and key_filter false kept both the buttons and the
+# volume ramp; see README.md in this folder.
# Live TV: com.android.tv. Keep the Realtek input/tuner packages com.realtek.dtv, com.realtek.tv.atv,
# com.realtek.tv.passthrough and Sony's com.sony.dtv.smartui (the input menu).
# Kept during the session: streaming apps, Assistant, Chromecast, AirPlay, Play Store/Services, and
diff --git a/examples/sony-bravia-vu3/tv.json b/examples/sony-bravia-vu3/tv.json
index f210bdb29..33bbde048 100644
--- a/examples/sony-bravia-vu3/tv.json
+++ b/examples/sony-bravia-vu3/tv.json
@@ -2,5 +2,5 @@
"tv": "Sony BRAVIA KD-55X75K (BRAVIA_VU3_4K, Realtek rtd2885m)",
"os": "Google TV 14",
"brand": "Sony",
- "notes": "Disables Google setup, feedback, games, calendar sync, print, personalization and Sony demo/help/promotions apps; keeps Live TV, core Google services, streaming apps and inputs."
+ "notes": "Disables Google setup, feedback, games, calendar sync, print, personalization and Sony demo/help/promotions apps; keeps Live TV, core Google services, streaming apps and inputs. A second unit on the same build keeps the stock launcher for the remote's app buttons, with the new launcher's Home redirect (see [its README](sony-bravia-vu3/README.md))."
}