Skip to content

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

Add CANDY Android TV DVB2K to examples

ahmersdevffdda751e54f
diff --git a/examples/candy-android-tv-dvb2k/README.md b/examples/candy-android-tv-dvb2k/README.md
new file mode 100644
index 000000000..163e8f999
--- /dev/null
+++ b/examples/candy-android-tv-dvb2k/README.md
@@ -0,0 +1,67 @@
+# CANDY Android TV DVB2K (CANDYATVT56, device broadway)
+
+Haier-built, CVTE/MediaTek chassis sold under the Candy brand, 720p, armeabi-v7a, 934 MB RAM.
+Android TV 11 (SDK 30). Stock launcher: `com.google.android.tvlauncher`. Live TV / HDMI app:
+`com.mediatek.wwtv.tvcenter`, inputs via `com.mediatek.tvinput`. Default IME is Gboard
+(`com.google.android.inputmethod.latin`), not the bundled `com.haier.tv.hmagicboard`.
+
+## Factory-menu packages: never launch, never disable
+
+This board ships Haier/CVTE factory-test packages: `com.at.factory.androidtvaidlservice`,
+`com.at.factory.factorymanager`, `com.cvte.tv.at`, `com.cvte.tv.hkcfac`, `com.cvte.tv.fac.menu`,
+`com.cvte.tv.fac.aging`, `mediatek.factorymenu.ui`. Opening any one of them, even once, can flip a
+factory-mode flag and disable Play Services, Netflix and Chromecast on the next boot with no way
+back from the shell. They are left out of `debloat.txt` on purpose. See the launcher fix below:
+enabling `app_library` on this board surfaced these as "Add to Home" entries, which is the reason
+the second code change exists.
+
+## Firmware re-enables these at every boot
+
+`com.haier.launcher.haiermatrix` (Haier TV+, an alternate launcher, not a HOME claimant),
+`com.google.android.tvrecommendations` (drives the stock "Play Next" row),
+`com.google.android.apps.mediashell` (Chromecast receiver) and `com.google.android.katniss` (voice
+search) come back on at every boot regardless of `pm disable-user`. Left out of `debloat.txt` for
+that reason; hidden in the launcher's `hidden_apps` instead.
+
+## Launcher fix 1: Live TV dock tile opened Composite, not HDMI1
+
+The Live TV tile launched `com.mediatek.wwtv.tvcenter` normally, which just reopened whatever input
+it last remembered (Composite, on this unit) instead of going straight to HDMI1.
+`live_tv_input_id` does not help here: in `MainActivity.java` it only matches
+`TvInputInfo.TYPE_TUNER` inputs (broadcast tuners), never `TYPE_HDMI`, so pointing it at the HDMI1
+component ID was a no-op.
+
+Fixed by adding an `input:<id>` prefix to `launch_actions`, the same syntax `app_keys` already uses
+for remote buttons, recognized in `AppAdapter.launch()` via a new `TileListener.onOpenInput()`
+callback that reuses the existing `openInput()` path the Inputs menu's own HDMI rows already use.
+With the switch off (no tile's `launch_actions` value starts with `input:`), behaviour is unchanged.
+This unit's (local, not upstreamed) `config.xml` entry:
+`com.mediatek.wwtv.tvcenter=input:com.mediatek.tvinput/.hdmi.HDMIInputService/HW5` (`HW5` =
+`hdmi_port=1`, from `dumpsys tv_input`). Verified over two reboots that the tile opens `HW5`, not
+`HW2`/Composite, and Home returns cleanly afterward.
+
+## Launcher fix 2: App Library listed the factory-menu packages
+
+With `app_library=true` on, the stock library catalogue lists every `LEANBACK_LAUNCHER` package
+regardless of `hidden_apps`, which on this board meant "Factory Menu" and "HKCFactoryAT" showed up
+as addable "Add to Home" entries despite being hidden from the dock and grid — see the danger note
+above.
+
+Fixed in `AppLibraryDialog`: it now takes the same `hidden_apps` set the dock/grid already use and
+excludes those packages from the catalogue entirely, not just from Home. Verified the catalogue
+dropped from 10 apps to 7, with Factory Menu / HKCFactoryAT / Haier TV+ no longer listed, and that
+this survives a reboot.
+
+## Performance
+
+SoC is `mt5867` (MStar), same family as [tcl-32es570f](../tcl-32es570f/debloat.txt). Dexopt had
+settled at `speed-profile`/`reason=install` after a couple of config-only reinstalls; recompiling
+with `cmd package compile -m speed -f` (the same step `build-and-install.sh` runs after a fresh
+install) fixed it. `dumpsys gfxinfo` in steady state: 0% janky frames, GPU frames 6-17ms. APK 545 KB
+(R8 minify+shrink). No config changes were needed for performance; `cinematic_home`, `fade_rows` and
+blur were already off for this RAM budget.
+
+## Dock and config
+
+This unit's dock order, `hidden_apps` and the `input:` entry above live in this builder's own
+`config.xml`, not in this PR — see [CONTRIBUTING.md](../../CONTRIBUTING.md#2-improve-the-launcher).
diff --git a/examples/candy-android-tv-dvb2k/debloat.txt b/examples/candy-android-tv-dvb2k/debloat.txt
new file mode 100644
index 000000000..8d044fd70
--- /dev/null
+++ b/examples/candy-android-tv-dvb2k/debloat.txt
@@ -0,0 +1,68 @@
+# CANDY Android TV DVB2K, product CANDYATVT56, device "broadway".
+# Android TV 11 (SDK 30), Haier-built board on a CVTE/MediaTek chassis, 720p, armeabi-v7a.
+# Stock launcher: com.google.android.tvlauncher (Google TV UI). Live TV / HDMI: com.mediatek.wwtv.tvcenter,
+# input via com.mediatek.tvinput. Default IME: com.google.android.inputmethod.latin (Gboard), not the
+# bundled com.haier.tv.hmagicboard.
+#
+# Apply: TV_HOST=<tv ip> tools/disable.sh examples/candy-android-tv-dvb2k/debloat.txt
+# Undo: TV_HOST=<tv ip> tools/restore.sh examples/candy-android-tv-dvb2k/debloat.txt
+# Everything is DISABLED, not uninstalled. Comment out any line you want to keep.
+#
+# DANGER on this board (Haier/CVTE): never launch or disable any factory/AT/fac-menu package -
+# com.at.factory.androidtvaidlservice, com.at.factory.factorymanager, com.cvte.tv.at, com.cvte.tv.hkcfac,
+# com.cvte.tv.fac.menu, com.cvte.tv.fac.aging, mediatek.factorymenu.ui. Opening one flips a factory-mode
+# flag on this board family and disables Play Services, Netflix and Chromecast on the next boot with no
+# way back from the shell. Left out of this list on purpose; do not add them.
+#
+# Also left alone (role unclear, low confidence it's pure bloat): com.cvte.haier.tv.appmanager,
+# com.cvte.r_agent_overlay, com.mstar.android.tv.disclaimercustomization.
+#
+# Does not stay disabled: the firmware re-enables these four at every boot regardless of
+# pm disable-user, so they are left out of this list on purpose - hide them in the launcher's
+# hidden_apps instead once it's built:
+# com.haier.launcher.haiermatrix (Haier TV+, alternate launcher, not a HOME claimant)
+# com.google.android.tvrecommendations (drives the "Play Next" row)
+# com.google.android.apps.mediashell (Chromecast receiver)
+# com.google.android.katniss (voice search)
+#
+# DO NOT DISABLE on this TV: com.mediatek.wwtv.tvcenter, com.mediatek.tv.service, com.mediatek.tvinput,
+# com.android.providers.tv, com.android.tv.settings, com.android.systemui, com.android.vending,
+# com.google.android.gms, com.google.android.gsf, com.mediatek.autopair, com.example.bt_pair_tips,
+# com.telink.lt.ota, com.android.bluetooth, com.google.android.inputmethod.latin (active IME).
+#
+# Owner uses: Live TV, YouTube, the Play Store, and the bundled Multi Media (USB) player. Netflix and
+# Prime Video kept installed for future use though not watched today. Nothing else on this TV.
+#
+# Status: disabled in one batch on one TV on 2026-10-27, checked with screenshots and a reboot the same day
+# (same-day only, not yet lived with for several days). Working after disabling and surviving the
+# reboot: Home (launcher/ as default), Live TV via com.mediatek.wwtv.tvcenter switching straight to
+# HDMI1, YouTube, Play Store, Netflix, Prime Video, the Multi Media (USB) player, and HDMI-CEC
+# remote input. Will update this line after a few more days of normal use.
+
+# Haier manufacturer apps (smart-home, content, housekeeper, alternate launcher)
+com.haierubic.usmartdevice # Haier IoT/smart-device discovery, unused on a TV-only setup
+com.haier.yudee.tv # Haier content/catalogue app
+com.haier.sharetv.webview # webview helper for the app above
+com.haier.tvhousekeeper # "TV_Assistant" housekeeper/cleaner
+com.haier.apps # Haier evoSmart companion app
+
+# Ad-tracking, retail demo and promo rows
+tv.anoki.acr.controller # ACR: watches on-screen content to build an ad/viewing profile
+fusion.android.tv.demo # in-store retail demo mode
+com.mediatek.android.leanbacklauncher.partnercustomizer # injects promo rows into the stock launcher
+android.autoinstalls.config.haier.hanyang # partner auto-install config stub
+com.mediatek.androidbox # "HaiCast" screen-mirroring app; owner doesn't cast
+
+# Google extras not used on this TV (per owner: only Live TV, YouTube, Play Store, Multi Media)
+com.google.android.youtube.tvmusic # YouTube Music
+miada.tv.webbrowser # bundled web browser
+com.google.android.play.games
+com.google.android.feedback
+com.google.android.syncadapters.calendar
+com.google.android.partnersetup
+
+# Already disabled when the unit arrived; left as-is.
+# com.google.android.marvin.talkback
+# com.cltv.fast
+# com.haier.apps.evoSmart
+# ru.haier.evo
diff --git a/examples/candy-android-tv-dvb2k/tv.json b/examples/candy-android-tv-dvb2k/tv.json
new file mode 100644
index 000000000..08114fba1
--- /dev/null
+++ b/examples/candy-android-tv-dvb2k/tv.json
@@ -0,0 +1,6 @@
+{
+ "tv": "CANDY Android TV DVB2K (CANDYATVT56, device broadway, Haier/CVTE board)",
+ "os": "Android TV 11 (SDK 30)",
+ "brand": "CANDY",
+ "notes": "Haier-built, CVTE/MediaTek chassis. Has Haier/CVTE factory-menu packages that must never be launched or disabled; the Live TV dock tile needed a launcher fix to reach HDMI1 instead of Composite: [notes](candy-android-tv-dvb2k/README.md)"
+}