Skip to content

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

examples: add Sony BRAVIA KD-49X8000G (HK), Android TV 9

ivanoung88b56aee5393
diff --git a/README.md b/README.md
index 87642cc64..08fefaf3a 100644
--- a/README.md
+++ b/README.md
@@ -25,7 +25,7 @@
</p>
<p align="center">
- <a href="docs/PRESS.md"><img src="docs/card.jpg" alt="345 TV models · 93 brands · 29 languages · 532 KB launcher. Featured in TechCrunch, TechRadar, Tom's Guide, Mashable, Android Authority, XDA, FlatpanelsHD, It's FOSS, Phandroid, GIGAZINE, Xataka, WinFuture, Frandroid, Macitynet, Techaeris, TechPP and 297 more: 313 articles from 44 countries. Before: stock Google TV home with a sponsored ad. After: the Clean Your TV launcher." width="800"></a>
+ <a href="docs/PRESS.md"><img src="docs/card.jpg" alt="346 TV models · 93 brands · 29 languages · 532 KB launcher. Featured in TechCrunch, TechRadar, Tom's Guide, Mashable, Android Authority, XDA, FlatpanelsHD, It's FOSS, Phandroid, GIGAZINE, Xataka, WinFuture, Frandroid, Macitynet, Techaeris, TechPP and 297 more: 313 articles from 44 countries. Before: stock Google TV home with a sponsored ad. After: the Clean Your TV launcher." width="800"></a>
</p>
**Samsung, LG, Roku or another non-Android TV?** CleanYourTV can't run there, but you can still turn off
@@ -129,7 +129,7 @@ Tested lists from contributors, one folder per model in [`examples/`](examples/)
<!-- tv-brands:start: generated by tools/gen_tables.py from examples/*/tv.json; edit those, not this -->
-**TCL** 76 · **Sony** 40 · **Xiaomi** 32 · **Philips** 18 · **Skyworth** 14 · **Hisense** 11 · **Amazon Fire TV** 7 ·
+**TCL** 76 · **Sony** 41 · **Xiaomi** 32 · **Philips** 18 · **Skyworth** 14 · **Hisense** 11 · **Amazon Fire TV** 7 ·
**Panasonic** 6 · **BenQ** 5 · **SHARP** 5 · **JVC** 4 · **OnePlus** 4 · **Thomson** 4 · **Google** 3 · **Grundig** 3 ·
**Haier** 3 · **Motorola** 3 · **NVIDIA Shield** 3 · **RCA** 3 · **Redmi** 3 · **Toshiba** 3 · **Vu** 3 · **CHiQ** 2 ·
**EKO** 2 · **FFalcon** 2 · **Hitachi** 2 · **Insignia Fire TV** 2 · **Kalley** 2 · **Kogan** 2 · **Nokia** 2 ·
@@ -331,6 +331,7 @@ Alwtniet, Anker Nebula, BYINTEK, Epson, Formovie, Gadnic, HOTACK, HY320, JMGO, M
| Sony BRAVIA BF1 (BRAVIA 2 II class, BRAVIA_BF1_4K_A, MediaTek) | Google TV 12 |
| Sony BRAVIA KD-43X8000G (2019, BRAVIA_ATV3_4K, MediaTek), APAC | Android TV 9 |
| Sony BRAVIA KD-43X80L (2023, BRAVIA_VH22, MediaTek MT5895), EU | Google TV 12 |
+| Sony BRAVIA KD-49X8000G (2019, BRAVIA_ATV3_4K, MediaTek), Hong Kong | Android TV 9 |
| Sony BRAVIA KD-49X8307C (2015, "BRAVIA 4K 2015", SVP-DTV15, MediaTek), EU firmware | Android TV 7.0 |
| Sony BRAVIA KD-55X75K (BRAVIA_VU3_4K, Realtek rtd2885m) | Google TV 14 |
| Sony BRAVIA KD-55X8000C (2015, "BRAVIA 4K 2015", SVP-DTV15, MediaTek), China firmware | Android TV 7.0 |
diff --git a/examples/README.md b/examples/README.md
index d80203a5a..6ce50ba6e 100644
--- a/examples/README.md
+++ b/examples/README.md
@@ -189,6 +189,7 @@ on that firmware, grouped and commented. These are starting points: comment out
| `sony-bravia-bf1/` | Sony BRAVIA BF1 (BRAVIA 2 II class, BRAVIA_BF1_4K_A, MediaTek) | Google TV 12 | Samba TV, Sony promos/Select, demo mode, preloaded apps; Home switch in steps (setupwraith), ambient screensaver, applicationdisabler re-enables IoT |
| `sony-kd-43x8000g/` | Sony BRAVIA KD-43X8000G (2019, BRAVIA_ATV3_4K, MediaTek), APAC | Android TV 9 | Samba TV ACR, Sony promos/Select, B2B services, MediaTek agents; Action Menu (TvDotAction), tuner (TVX), HDMI 1-4, Bravia Sync, USB media kept; reboot-checked |
| `sony-kd-43x80l/` | Sony BRAVIA KD-43X80L (2023, BRAVIA_VH22, MediaTek MT5895), EU | Google TV 12 | Samba TV ACR and Sony telemetry off; tuner (TVX), HDMI 1-4/eARC, Bravia Sync and the remote kept; setupwraith off for the launcher (Wi-Fi owned by tv.settings); tested and lived with |
+| `sony-kd-49x8000g-hk/` | Sony BRAVIA KD-49X8000G (2019, BRAVIA_ATV3_4K, MediaTek), Hong Kong | Android TV 9 | Samba TV ACR, Sony promos/Select, B2B services, MediaTek agents, 3 screen-mirroring apps, Mango TV and a Taiwan anime app; Action Menu (TvDotAction), tuner (TVX), HDMI 1-4, Netflix/YouTube/Disney+/Spotify/Assistant kept; reference launcher installed as Home; reboot-checked |
| `sony-kd-49x8307c/` | Sony BRAVIA KD-49X8307C (2015, "BRAVIA 4K 2015", SVP-DTV15, MediaTek), EU firmware | Android TV 7.0 | MediaTek MT5890 platform: Qterics/Sony device agents, Discover/BIVL recommendation services, Sony shelf, retail demo, help apps, Play Movies; stock launcher is `com.google.android.leanbacklauncher`, not tvlauncher, so pass it to `restore.sh`; `com.sony.dtv.tvx` also plays every HDMI input, keep it; voice and YouView off by choice; 1.5 GB RAM, free RAM increased from ~120 MB to ~500 MB; reboot-checked; list only, the launcher needs Android 8 (minSdk 26, see #146) |
| `sony-bravia-vu3/` | Sony BRAVIA KD-55X75K (BRAVIA_VU3_4K, Realtek rtd2885m) | Google TV 14 | 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)). |
| `sony-kd-55x8000c/` | Sony BRAVIA KD-55X8000C (2015, "BRAVIA 4K 2015", SVP-DTV15, MediaTek), China firmware | Android TV 7.0 | China firmware without Google services (no Play Store, katniss, YouView): Sony's preloaded 应用中心 (`com.sony.dangbeimarket`) is what fills the home's paid-app 推荐 row, disabled here; 华数TV and QQ音乐 off; 屏幕镜像 kept because the Inputs menu carries a fixed entry for it (a dead source otherwise); debloat only out of the box, the launcher needs Android 8 (minSdk 26), but the minSdk 24 build from #608 installs, runs and takes Home here |
diff --git a/examples/sony-kd-49x8000g-hk/README.md b/examples/sony-kd-49x8000g-hk/README.md
new file mode 100644
index 000000000..258b0dbab
--- /dev/null
+++ b/examples/sony-kd-49x8000g-hk/README.md
@@ -0,0 +1,121 @@
+# Sony BRAVIA KD-49X8000G (Hong Kong)
+
+- **Model:** Sony BRAVIA KD-49X8000G (Hong Kong region, `BRAVIA_ATV3_4K_HK`)
+- **Board / SoC:** MediaTek quad-core (MT5891 / MT5893 family), same platform as `examples/sony-kd-43x8000g`
+- **Firmware build:** `BRAVIA_ATV3_4K_HK-user 9 PTT1.190515.001.S54 672201 release-keys`
+- **Android version:** Android TV 9 (API 28, Pie)
+- **Tested on:** the household's own set, debloat and reference launcher both reboot-checked
+
+## Notes
+
+- **Stock launcher:** `com.google.android.tvlauncher`, disabled only after the reference launcher was
+ confirmed as Home.
+- **Region app set:** the HK firmware preloads more than the sibling APAC list
+ (`examples/sony-kd-43x8000g`): Amazon Prime Video, Mango TV, a Taiwan anime app, and three separate
+ screen-mirroring apps, on top of the same Sony/Samba/B2B/MediaTek packages. See
+ `debloat.txt`'s header for exactly what is disabled and what was kept on purpose.
+- **TV inputs and HDMI:** HDMI 1-4, ARC and the tuner are handled by `com.sony.dtv.tvx` and
+ `com.sony.dtv.tvinput.*`, left untouched. The reference launcher's Inputs pill reads this list
+ directly, with Live TV wired to `com.sony.dtv.tvx` in `config.xml`'s `live_tv_package`.
+- **Wi-Fi ownership:** `dumpsys wifi` shows Wi-Fi owned by the Android system, not by the setup wizard,
+ so debloating and disabling the stock launcher did not touch connectivity.
+- **Kept on purpose:** Netflix, YouTube, Chromecast built-in (mediashell), Spotify, Disney+, Google
+ Assistant (`com.google.android.katniss`, for the remote's mic button), Play Store/Services, TalkBack,
+ the on-screen keyboard, and the Sony system update service.
+
+## Re-enabling a disabled app
+
+Everything was disabled with `pm disable-user`, never uninstalled, so any package can come back:
+
+```bash
+# One package:
+TV_HOST=<tv ip> tools/venv/bin/python -I tools/tv.py --batch <<< "pm enable --user 0 <package>"
+
+# The whole list this TV got:
+TV_HOST=<tv ip> tools/restore.sh examples/sony-kd-49x8000g-hk/debloat.txt
+```
+
+`restore.sh` re-enables every package in the file, including any you comment out later, so it is an
+undo for this exact list. To bring back just one or two apps, either comment out their lines in
+`debloat.txt` and re-run `restore.sh` on the whole file, or enable them directly with `pm enable` as
+above and leave the file as a record of what you changed.
+
+## Changing the dock order
+
+The dock is 5 slots: `com.netflix.ninja`, `com.google.android.youtube.tv`, `com.disney.disneyplus` and
+`com.spotify.tv.android` are pinned, and the 5th slot auto-fills from the next app in the grid
+(`fill_dock: true`), currently the Google Play Store.
+
+To change the order or swap an app, edit `~/my-theme/config.json`'s `dock_apps` list (package names, in
+the order you want them) and push it again:
+
+```bash
+TV_HOST=<tv ip> tools/theme.sh ~/my-theme
+```
+
+To pin a 5th app instead of letting it auto-fill, add its package name as the 4th entry in `dock_apps`.
+To hide an app from the grid entirely (as was done here with the stock browser,
+`com.vewd.core.integration.dia`), add its package name to `hidden_apps`.
+
+Package names for anything installed can be listed with:
+
+```bash
+TV_HOST=<tv ip> tools/venv/bin/python -I tools/tv.py --batch <<< "pm list packages -3"
+```
+
+## Changing the wallpaper
+
+The background is a theme overlay, not part of the launcher's build, so it can be changed without
+rebuilding or reinstalling anything:
+
+```bash
+# Replace the picture:
+cp /path/to/your/image.jpg ~/my-theme/wallpaper.jpg
+TV_HOST=<tv ip> tools/theme.sh ~/my-theme
+
+# Back to plain black, no picture:
+TV_HOST=<tv ip> tools/theme.sh --reset
+```
+
+`~/my-theme/config.json` currently sets:
+
+```json
+{
+ "dock_apps": ["com.netflix.ninja", "com.google.android.youtube.tv", "com.disney.disneyplus", "com.spotify.tv.android"],
+ "hidden_apps": ["com.sony.dtv.tvx", "com.sony.dtv.tvxlauncher.programguide", "com.vewd.core.integration.dia"],
+ "columns": 5,
+ "wallpaper": true,
+ "wallpaper_dim": 35
+}
+```
+
+`wallpaper_dim` (0-90) darkens the picture so the clock, pills and dock stay readable; raise or lower it
+to taste. The full list of keys a theme can set, including rotating wallpapers and time-of-day
+backdrops, is in `themes/README.md`.
+
+## Rebuilding the launcher from source
+
+Only needed after a source change, not for config or wallpaper tweaks:
+
+```bash
+cd launcher
+TV_HOST=<tv ip> ./build-and-install.sh
+```
+
+The script checks the TV's Android SDK level against the launcher's `minSdk` first, builds the release
+APK, pushes and installs it, starts it and confirms Home resolves to it before disabling the stock
+launcher, and rolls back automatically if any step fails.
+
+## Closing ADB afterwards
+
+This set only exposes USB debugging with a fixed network ADB port (5555), not Wireless debugging
+(`adb_wifi_enabled` stayed `null` throughout). Once you are done:
+
+```bash
+TV_HOST=<tv ip> tools/venv/bin/python -I tools/tv.py --batch <<< "settings put global adb_enabled 0"
+# power-cycle the TV, then:
+tools/venv/bin/python -I tools/adb-closed.py <tv ip>
+```
+
+Only `adb-closed.py` reporting the port closed counts; USB debugging's toggle looking off on screen is
+not proof by itself.
diff --git a/examples/sony-kd-49x8000g-hk/debloat.txt b/examples/sony-kd-49x8000g-hk/debloat.txt
new file mode 100644
index 000000000..7a537f80b
--- /dev/null
+++ b/examples/sony-kd-49x8000g-hk/debloat.txt
@@ -0,0 +1,102 @@
+# Sony BRAVIA KD-49X8000G (HK region: device BRAVIA_ATV3_4K, product BRAVIA 4K GB ATV3). Android TV 9 (API 28).
+# Firmware BRAVIA_ATV3_4K_HK-user 9 PTT1.190515.001.S54 672201 release-keys
+# Same platform/build as examples/sony-kd-43x8000g (APAC/PA), this is the Hong Kong region variant with a
+# larger app set: Netflix, Disney+, Spotify, Amazon Prime Video, Mango TV, a Taiwan anime app and three
+# separate screen-mirroring apps were preloaded in addition to the APAC list's packages.
+#
+# Apply: TV_HOST=<tv ip> tools/disable.sh examples/sony-kd-49x8000g-hk/debloat.txt
+# Undo: TV_HOST=<tv ip> tools/restore.sh examples/sony-kd-49x8000g-hk/debloat.txt
+# Everything is DISABLED, not uninstalled. Comment out any line you want to keep.
+#
+# Kept on purpose for this household: Netflix, YouTube (+ YouTube Music kept in the 43x8000g list but
+# disabled here, not used), Chromecast built-in, Spotify, Disney+, Google Assistant (katniss, remote mic
+# button), Play Store/Services, TalkBack. Two packages (com.supertws.dubokutv,
+# com.sony.dtv.smarthomesettings) were already disabled on this set before this list was written.
+# com.uei.quicksetsdk.sony and com.sony.dtv.hbbtvlauncher from the sibling 43x8000g list are not
+# installed on this firmware, so they are not repeated here.
+
+# ACR viewing tracker
+tv.samba.ssm # Samba TV fingerprints what's on screen
+
+# Sony and Google content, ads, and promos
+com.sony.dtv.sonyselect # Sony Select app store/promo tile
+com.sony.dtv.sonyselect.overlay
+com.sony.dtv.discovery # Sony Discover content bar
+com.sony.dtv.bivlinfo # BIVL content service list (feeds Discover)
+com.sony.dtv.tvlaunchercustomizer # Sony tweaks to the stock home rows
+com.sony.dtv.tvlaunchercustomizer.overlay.apporder
+com.google.android.tvrecommendations # recommendation rows for the stock launcher
+android.autoinstalls.config.sony.bravia # Play auto-install of partner apps
+
+# Retail demo
+com.sony.dtv.demomode
+com.sony.dtv.demosupport
+com.sony.dtv.multiscreendemo
+
+# Telemetry, remote support, logging and diagnostics
+com.sony.dtv.da.service # Sony device agent / remote support
+com.qterics.da.product # Qterics device agent
+com.sony.dtv.sonybugreportsys
+com.google.android.tv.bugreportsender
+com.google.android.feedback
+com.mediatek.agent # MediaTek diagnostics agent
+com.mediatek.dmagent # MediaTek device management agent
+com.sony.dtv.sonyloglevelsettingsys # system log level daemon
+com.sony.dtv.sonyloglevelsettingvnd # vendor log level daemon
+
+# Commercial and B2B services
+com.sony.dtv.b2b.vendorprotocol # SDDP Control4 broadcast service
+com.sony.dtv.b2b.rs232csupport # RS232 serial control
+com.sony.dtv.b2b.hotelmode
+com.sony.dtv.b2b.noderuntime.normal
+com.sony.dtv.b2b.noderuntime.privilege
+com.sony.dtv.b2b.frameworkextension
+com.sony.dtv.b2b.prosettings
+com.sony.dtv.b2b.importexport
+com.sony.dtv.b2b.webappruntimedrm
+
+# Broadcast and unused extensions
+com.sony.dtv.browser.webappruntimeextension
+com.sony.dtv.tuningconfirmation_dvbt
+com.sony.dtv.serviceinformation
+
+# Preloaded apps
+com.sony.dtv.customersupport # Help tile
+com.sony.dtv.smarthelp
+com.sony.dtv.imanual # i-Manual
+com.google.android.youtube.tvmusic # not used, YouTube (video) is kept
+com.google.android.videos # Google Play Movies, not used
+com.google.android.play.games # Play Games, not used
+com.google.android.backdrop # ambient screensaver
+
+# Streaming and OEM extras not used in this household
+com.amazon.amazonvideo.livingroom # Prime Video, not used
+com.mgtv.tv.intl # Mango TV
+tw.com.gamer.android.animad # Taiwan anime streaming app (Gamer/動畫瘋)
+tunein.player # TuneIn Radio
+
+# OEM apps that don't belong to this Sony line
+com.benq.instaqlive # BenQ InstaQ Live screencast companion
+com.aospstudio.tvsearch # third-party search overlay
+com.tcl.browser # TCL-branded browser; the Sony HbbTV browser stays
+
+# Screen mirroring and DLNA, superseded by Chromecast built-in (kept)
+screnmirroring.com # Screen mirroring (Miracast)
+com.nero.swiftlink.mirror.tv # Nero SwiftLink mirroring
+com.smartdevice.tv.aircast # AirCast mirroring
+com.sony.dtv.networkapp.wifidirect
+com.sony.huey.dlna.module # DLNA renderer
+com.sony.huey.dlna.renderersettings
+com.sonyericsson.dlna
+
+# Left enabled on purpose: features, not bloat. Uncomment any line to disable it too.
+# com.sony.dtv.scrums.action # Action Menu overlay & remote button (TvDotAction.apk)
+# com.google.android.apps.mediashell # Chromecast built-in, kept for iPad casting
+# com.sony.dtv.smartmediaapp # Media Player, plays files from USB
+# com.sony.dtv.osat.music # plays music from USB
+# com.google.android.tv.remote.service # Android TV phone-app remote
+# com.sony.dtv.systemupdate # Sony system firmware updater
+# com.google.android.katniss # Google Assistant, kept for the remote's mic button
+# com.sony.dtv.browser.webappruntime # HbbTV / interactive broadcast red-button browser
+# com.sony.dtv.browser.ceb
+# com.sony.dtv.browser.webappservice
diff --git a/examples/sony-kd-49x8000g-hk/tv.json b/examples/sony-kd-49x8000g-hk/tv.json
new file mode 100644
index 000000000..55843c407
--- /dev/null
+++ b/examples/sony-kd-49x8000g-hk/tv.json
@@ -0,0 +1,6 @@
+{
+ "tv": "Sony BRAVIA KD-49X8000G (2019, BRAVIA_ATV3_4K, MediaTek), Hong Kong",
+ "os": "Android TV 9",
+ "brand": "Sony",
+ "notes": "Samba TV ACR, Sony promos/Select, B2B services, MediaTek agents, 3 screen-mirroring apps, Mango TV and a Taiwan anime app; Action Menu (TvDotAction), tuner (TVX), HDMI 1-4, Netflix/YouTube/Disney+/Spotify/Assistant kept; reference launcher installed as Home; reboot-checked"
+}
diff --git a/tools/readme_stats.py b/tools/readme_stats.py
index 6dcecf9c9..d7e036fe6 100644
--- a/tools/readme_stats.py
+++ b/tools/readme_stats.py
@@ -67,7 +67,7 @@ try:
except ImportError:
sys.exit("readme_stats.py needs Pillow: tools/venv/bin/pip install -r tools/requirements-perf.txt")
-STATS = [("345", "TV MODELS"), ("93", "BRANDS"), ("29", "LANGUAGES"), ("532 KB", "LAUNCHER")]
+STATS = [("346", "TV MODELS"), ("93", "BRANDS"), ("29", "LANGUAGES"), ("532 KB", "LAUNCHER")]
W, H = 1600, 240
img = Image.new("RGB", (W, H), "#15181e"); d = ImageDraw.Draw(img)
def f(size, wt):