# Sony BRAVIA 4K VH21 (KD-65X85K, 2022, device BRAVIA_VH21, MediaTek MT5895), Australia, India & New Zealand
# Android 12 (Google TV, API 31), build BRAVIA_VH21_M_PA-user 12 STT2.230505.001.S136 682241, 3 GB RAM
#
# Apply:   TV_HOST=<tv ip> tools/disable.sh examples/sony-bravia-4k-vh21/debloat.txt
# Undo:    TV_HOST=<tv ip> tools/restore.sh examples/sony-bravia-4k-vh21/debloat.txt com.google.android.apps.tv.launcherx
# Everything is DISABLED, not uninstalled. Comment out any line you want to keep.
#
# Stock launcher: com.google.android.apps.tv.launcherx (Google TV). Pass it to restore.sh as above.
# Live TV / tuner app: com.sony.dtv.tvx (set it as live_tv_package in the launcher's config.xml and hide it).
# Keep the com.sony.dtv.tvinput.* services, com.sony.dtv.braviasync*, tvapi, sonysystemservice, imeproxy,
# settingsprovider, systemupdate/update, the Sony settings apps and all com.mediatek.*: they drive HDMI,
# the tuner, Bravia Sync, updates and the remote.
# Kept by owner's choice: Chromecast built-in (mediashell), AirPlay/HomeKit (airplayapp, homekit),
# firmware updates, HbbTV / Freeview Plus (interactivetvutil), DLNA, Sony IP control (webapi.core).
# Already disabled at the factory: com.sonypicturescore, com.sony.dtv.b2b.vendorprotocol,
# com.sony.dtv.b2b.softap, com.sony.dtv.kenhchonloc. Not in this list, so restore.sh leaves them alone.
#
# First unit (Australia, Ethernet, disabled-launcher route):
# The launcher must target SDK 30+ or Play Protect blocks the install on this firmware as "built for an older
# version of Android". Inputs lists the PS5 on HDMI 1 twice (the port and its CEC device input). Memory was
# the bottleneck (~480 MB available); window/transition/animator scales at 0.5 and pm trim-caches helped.
# On Ethernet, setupwraith owned no saved Wi-Fi network and was disabled along with launcherx.
# Unit 1 route: uncomment com.google.android.tungsten.setupwraith at the end (Ethernet only, costs casting).
#
# Second unit (India, Wi-Fi & Ethernet, redirect route):
# Same model KD-65X85K and MediaTek MT5895 board, Asia-Pacific build
# BRAVIA_VH21_M_PA-user 12 STT2.230505.001.S136 682241 release-keys.
# Tested with the reference launcher via the REDIRECT route (see config.json):
#  - launcherx and setupwraith stay ENABLED: on Wi-Fi, dumpsys wifi confirms setupwraith owns the saved Wi-Fi
#    credentials (cname=com.google.android.tungsten.setupwraith). Disabling it disconnects Wi-Fi and ADB.
#    Keeping launcherx on prevents setupwraith's RecoveryActivity (HOME priority 1) from taking Home and
#    preserves remote app hotkeys.
#  - Home redirection: config.json sets stock_home_redirect to com.google.android.apps.tv.launcherx, handled
#    by HomeKeyService (Settings > Accessibility). Home pressed anywhere bounces straight back to CleanYourTV.
#  - Remote keys: Settings button sends scancode 646 ("scan:646:settings" in app_keys). Remote app keys:
#    scan:485 (YouTube) and scan:490 (Prime Video) in app_keys.
#  - Additional bloat discovered and disabled: BRAVIA CAM services (camerafwupdate, settings, distancealert,
#    livingfit), Sony seeds IoT auth and remotestart, Sony help and eco dashboard.
#  - screensaver: dreamx is commented out below because disabling it requires setting screensaver_components
#    first (e.g. com.gathin.tvhome/.ClockDream or com.android.dreams.basic/.Colors).
#
# Third unit (New Zealand, Wi-Fi, redirect route):
# Same model line and the same PA build. Applied in three batches with a screenshot between, then the
# reference launcher via the redirect route, as the second unit: launcherx and setupwraith stay enabled
# (setupwraith owns the saved Wi-Fi network here too), config.json's stock_home_redirect, and only
# HomeKeyService bound. Differences from the second unit:
#  - key_filter left on (true) and no app_keys: launcherx answers the remote's YouTube, Settings and Input
#    buttons itself, and with the helper filtering keys a Home press opens the launcher even while Google
#    home is already on screen. Checked on the real remote: a held Volume Up still ramps on this build.
#  - Cold boot: 3 of 5 restarts landed on the new Home by themselves; on 2 the launcher's ProbeActivity ran
#    but no window event for launcherx followed, and Google home stayed up until one Home press (the #1116
#    race). A standby wake is not a cold boot, so it only shows after a restart or a firmware update.
#  - com.qterics.da.product was back on (enabled state "default") after the first reboot; disabled again by
#    hand it stayed off through five more restarts.
#  - The screensaver shipped pointing at com.sony.dtv.livingfit (BRAVIA CAM Living Fit), which this list
#    disables: screensaver_components was moved to com.gathin.tvhome/.ClockDream, then dreamx disabled.
#  - Off by choice on this unit: Netflix, Prime Video, Spotify, HbbTV, the Sony bug report service and the
#    customer support tile. The remote's Netflix and Prime Video buttons then open the app's Play Store
#    page, which has an Enable button. Kept: QuickSet, Chromecast, AirPlay/HomeKit, DLNA, updates;
#    seeds.iot was already off at the factory on this unit.
#
# Applied 19-20 Oct 2026 (Unit 1), 26 Oct 2026 (Unit 2) and 29 Oct 2026 (Unit 3); reboot-checked.

# ACR viewing tracker
tv.samba.ssm                      # Samba TV fingerprints what's on screen
tv.samba.ssm.ui

# telemetry and remote support
com.sonyericsson.idd.agent        # Sony IDD usage-data agent
com.sony.dtv.usercontext          # user context providers, boot receiver only
com.qterics.da.product            # Qterics device agent
com.sony.dtv.da.service           # remote-support session service
com.sony.dtv.sonybugreportsys     # Sony bug report service (third unit)
com.google.android.feedback

# Sony ads, promos, help and recommendation rows
com.sony.dtv.promos
com.sony.dtv.sonyselect           # Sony Select app recommendations
com.sony.dtv.sonytab              # Sony content tab / partner rows
com.sony.dtv.smarthelp            # Sony help tile (second unit)
com.sony.dtv.helpguidecontents    # help guide contents (second unit)
com.sony.dtv.ecodashboard         # Eco dashboard tile (second unit)
com.sony.dtv.customersupport      # customer support tile (third unit)

# demo / shop mode
com.sony.dtv.demosupport
com.sony.dtv.demosystemsupport
com.sony.dtv.multiscreendemo

# voice assistant (off by choice; the remote's mic button stops working)
com.google.android.katniss
com.sony.dtv.voicesearch
com.sony.dtv.assistantadapter

# screensaver: set basic screensaver first, or the launcher's clock (com.gathin.tvhome/.ClockDream). The third
# unit did that (settings put secure screensaver_components com.gathin.tvhome/.ClockDream) and then disabled it.
# com.google.android.apps.tv.dreamx # Ambient screensaver and background sync jobs

# streaming apps (off on the third unit by choice; other owners can uncomment them; the remote's Netflix and Prime Video buttons then open the
# app's Play Store page, which has an Enable button)
# com.netflix.ninja                 # Netflix
# com.amazon.amazonvideo.livingroom # Prime Video
# com.spotify.tv.android            # Spotify

# features not used (off on the third unit by choice; other owners can uncomment)
# com.sony.dtv.hbbtvplayer          # HbbTV / red button on live TV

# preloaded apps (off by choice)
au.com.ninenow.ctv                # 9Now
au.net.abc.iview                  # ABC iview
com.swm.live                      # 7plus
com.apple.atve.sony.appletv       # Apple TV app
com.google.android.videos         # Google TV movies (loses access to purchases in it)
com.google.android.play.games
com.vewd.core.integration.dia     # Vewd
com.vewd.core.service

# always-running services, off by choice to free memory (~120 MB together)
com.uei.quicksetsdk.sony          # UEI QuickSet: IR control of cable boxes/soundbars; HDMI-CEC unaffected
com.google.android.tts            # Google text-to-speech: TalkBack and read-aloud stop working
com.sony.dtv.seeds.iot            # Sony smart-home / phone-app link (BRAVIA Connect, remote start)
com.sony.dtv.seeds.auth           # Sony seeds authentication service (second unit)
com.sony.dtv.seeds.iot.remotestart # remote start receiver for seeds IoT (second unit)
com.sony.dtv.gestureapp           # BRAVIA CAM gestures (no camera on this set)
com.sony.dtv.sensingcamera.fwupdate # BRAVIA CAM firmware update checker; no camera on this set, the TV's own updater (systemupdate) stays on (second unit)
com.sony.dtv.sensingcamera.settings # BRAVIA CAM settings provider (second unit)
com.sony.dtv.distancealert        # BRAVIA CAM proximity/distance alert (second unit)
com.sony.dtv.livingfit            # BRAVIA CAM Living Fit feature (second unit)

# Google TV setup wizard: with launcherx disabled (Unit 1, Ethernet), RecoveryActivity claims Home
# so setupwraith had to go. For the redirect route (Unit 2, config.json) and on Wi-Fi, KEEP IT ENABLED:
# setupwraith owns the saved Wi-Fi network (dumpsys wifi), so disabling it breaks Wi-Fi and ADB.
# With launcherx kept enabled, RecoveryActivity never triggers.
# com.google.android.tungsten.setupwraith
