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
tcl-65c7l-google-tv: use the shared tools, drop folder scripts and DNS setup
imsopovf2da60c14117
diff --git a/examples/tcl-65c7l-google-tv/README.md b/examples/tcl-65c7l-google-tv/README.mdindex ac2031305..0dd1e4098 100644--- a/examples/tcl-65c7l-google-tv/README.md+++ b/examples/tcl-65c7l-google-tv/README.md@@ -11,31 +11,56 @@ What changed:- **Google TV home replaced** by the clean launcher from `launcher/`: a dock of Plex, Netflix,YouTube and Prime Video, the other apps in a grid below, and pills for Inputs, Wi-Fi and Settings.Its clock screensaver replaces Google's promo screensaver.-- **Ad-blocking DNS**: Private DNS is set to `dns.adguard-dns.com`. It blocks ads and trackers in many- apps, but **not YouTube ads**.Checked on the TV afterwards: all four HDMI inputs are still registered, Live TV starts, the Input button's-source panel opens, every remote button works (gear, app buttons, Input, mic), YouTube loads over the-ad-blocking DNS, Play Store updates install, and Chromecast is still advertised on the network. AirPlay,-Miracast and the game bar were kept enabled but not tested. Nothing came back on after a reboot.+source panel opens, every remote button works (gear, app buttons, Input, mic), YouTube loads, Play Store+updates install, and Chromecast is still advertised on the network. AirPlay, Miracast and the game bar+were kept enabled but not tested. Nothing came back on after a reboot.Take a full backup before any change (package lists, settings, getprop) into the gitignored`backup/` folder; on this unit nothing was disabled beforehand.## Connecting to the TV-Every script below needs network debugging on the TV:+Every command below needs network debugging on the TV:**Settings > System > Developer options > Wireless debugging** on. If the TV shows-"Allow USB debugging?", tick "Always allow" and accept it.+"Allow USB debugging?", tick "Always allow" and accept it. Turn it off again when you're done, as in+[When you're done](#when-youre-done).-Turn it off again when you're done, as in [When you're done](#when-youre-done).+The commands run from the repo folder. Each `tools/*.sh` script has a PowerShell twin in the same folder+(`tools\disable.ps1`, `tools\restore.ps1`, `tools\theme.ps1`, `launcher\build-and-install.ps1`) that takes+`-TvHost 192.168.1.50` instead of `TV_HOST=`.-The commands below run from the repo folder in PowerShell. In each one, `tools\venv\Scripts\python.exe -I tools\tv.py`-sends one command to the TV:+## Apply the list and install the launcher-```powershell-$env:TV_HOST = '192.168.1.50'-```+1. Apply the list. It disables everything except the stock home (launcherx), which still owns Home, and+ skips the setup wizard while it owns the Wi-Fi network:++ ```sh+ TV_HOST=192.168.1.50 tools/disable.sh examples/tcl-65c7l-google-tv/debloat.txt+ ```++2. If it says the Wi-Fi network belongs to setupwraith, forget the network and join it again in+ Settings, then run step 1 again.+3. Build the launcher and make it Home; this also disables launcherx. It needs JDK 17 and Android SDK 34+ (see the main README). No key helper is needed on this set, because every remote button still worked+ with launcherx disabled:++ ```sh+ TV_HOST=192.168.1.50 launcher/build-and-install.sh+ ```++4. Push this folder's [config.json](config.json) (dock order, columns, Live TV app):++ ```sh+ TV_HOST=192.168.1.50 tools/theme.sh examples/tcl-65c7l-google-tv+ ```++5. Switch the screensaver to the launcher's clock, since Google's promo screensaver (dreamx) is in the list:++ ```sh+ TV_HOST=192.168.1.50 tools/venv/bin/python -I tools/tv.py 'settings put secure screensaver_components com.gathin.tvhome/.ClockDream'+ ```## Re-enable one app@@ -43,14 +68,14 @@ On the TV: **Settings > Apps > See all apps > Show system apps**, pick the app aOr from the PC, for example to bring back Stan:-```powershell-tools\venv\Scripts\python.exe -I tools\tv.py 'pm enable au.com.stan.and'+```sh+TV_HOST=192.168.1.50 tools/venv/bin/python -I tools/tv.py 'pm enable au.com.stan.and'```Then put a `#` in front of its line in `debloat.txt`, so it stays on if the list is applied again.Leave `com.google.android.tungsten.setupwraith` and `com.google.android.apps.tv.launcherx` alone while the new-launcher is Home. Either one can take Home back. Use the full restore below instead.+launcher is Home. Either one can take Home back. Use the full undo below instead.## Change the dock order@@ -63,13 +88,9 @@ left to right, and `columns` (4 to 7) sets how many fit:"dock_apps": ["com.plexapp.android", "com.netflix.ninja", "com.google.android.youtube.tv", "com.amazon.amazonvideo.livingroom"],```-Then push it to the TV. No rebuild is needed:--```powershell-tools\theme.ps1 -TvHost 192.168.1.50 examples\tcl-65c7l-google-tv-```+Then push it with the `tools/theme.sh` command from step 4. No rebuild is needed.-Package names of the installed apps:+Package names of the apps on this unit:| App | Package ||---|---|@@ -91,54 +112,31 @@ Package names of the installed apps:1. Put a picture named `wallpaper.jpg` in this folder. Use 1920×1080, because the TV draws its interface at 1080p.2. Add `"wallpaper": true,` to [config.json](config.json). Optionally add `"wallpaper_dim": 30` to darken it so tile names stay readable.-3. Push it with the same `tools\theme.ps1` command as above.+3. Push it with the same `tools/theme.sh` command.-For a rotating set, look at `themes/scenes`, or try a ready-made look with `tools\theme.ps1 -TvHost 192.168.1.50 themes\aurora`.-Run `tools\theme.ps1 -TvHost 192.168.1.50 -Reset` to go back to plain black. Every key is described in `themes/README.md`.--## Rebuild or reinstall the launcher--```powershell-examples\tcl-65c7l-google-tv\install.ps1 -TvHost 192.168.1.50-```--This builds the launcher, installs it, makes it Home, pushes `config.json` and sets the clock screensaver.-It's safe to run again at any time. The build needs JDK 17 (`JAVA_HOME`, or a `jdk-17` folder in-`%USERPROFILE%\.jdks`) and Android SDK 34 in `%LOCALAPPDATA%\Android\Sdk`.--After a factory reset, run the steps in this order:--1. Run `tools\disable.ps1 -TvHost 192.168.1.50 examples\tcl-65c7l-google-tv\debloat.txt`. It holds back the- stock home and the setup wizard until it's safe to disable them.-2. If it says the Wi-Fi network belongs to setupwraith, forget the network and join it again in Settings.-3. Run `install.ps1`.-4. Run `disable.ps1` again.+For a rotating set, look at `themes/scenes`, or try a ready-made look with `TV_HOST=192.168.1.50 tools/theme.sh themes/aurora`.+`TV_HOST=192.168.1.50 tools/theme.sh --reset` goes back to plain black. Every key is described in `themes/README.md`.## After a firmware updateTCL updates can turn apps back on or give Home back to Google TV. To see what changed:-```powershell-tools\venv\Scripts\python.exe -I tools\check.py examples\tcl-65c7l-google-tv\debloat.txt com.gathin.tvhome+```sh+TV_HOST=192.168.1.50 tools/venv/bin/python -I tools/check.py examples/tcl-65c7l-google-tv/debloat.txt com.gathin.tvhome```Add `--fix` after `check.py` to re-disable whatever came back and put the launcher back on Home.## Undo everything-```powershell-examples\tcl-65c7l-google-tv\restore.ps1 -TvHost 192.168.1.50+```sh+TV_HOST=192.168.1.50 tools/restore.sh examples/tcl-65c7l-google-tv/debloat.txt com.google.android.apps.tv.launcherx+TV_HOST=192.168.1.50 tools/venv/bin/python -I tools/tv.py 'settings delete secure screensaver_components'```-This turns every disabled app back on, makes the Google TV home Home again, and restores Google's-screensaver and automatic DNS. Add `-UninstallLauncher` to also remove the new launcher.--To undo only the ad-blocking DNS, either switch **Settings > Network & Internet > Private DNS** to-Automatic, or run:--```powershell-tools\venv\Scripts\python.exe -I tools\tv.py 'settings put global private_dns_mode opportunistic'-```+The first line turns every disabled app back on and makes the Google TV home Home again. The second+puts Google's screensaver back. To remove the new launcher as well, run+`tools/tv.py 'pm uninstall com.gathin.tvhome'` the same way.## When you're done@@ -150,6 +148,6 @@ is unencrypted. Close it when you're done:2. Restart the TV.3. Check that the port is closed. "Connection refused" means it worked:-```powershell-tools\venv\Scripts\python.exe -I tools\adb-closed.py 192.168.1.50+```sh+tools/venv/bin/python -I tools/adb-closed.py 192.168.1.50```diff --git a/examples/tcl-65c7l-google-tv/install.ps1 b/examples/tcl-65c7l-google-tv/install.ps1deleted file mode 100644index ee879e3d8..000000000--- a/examples/tcl-65c7l-google-tv/install.ps1+++ /dev/null@@ -1,30 +0,0 @@-# Build the launcher, install it on this TCL 65" C7L as Home, and push this folder's config.json-# (dock order, columns, Live TV app). Run it again after editing config.json or pulling a new-# launcher version; it is safe to repeat.-#-# Usage: examples\tcl-65c7l-google-tv\install.ps1 -TvHost 192.168.1.50-# Needs JDK 17 (JAVA_HOME, or a jdk-17* folder in %USERPROFILE%\.jdks) and Android SDK 34-# (%LOCALAPPDATA%\Android\Sdk), network ADB on the TV and tools\venv.-#-# On a TV that was reset or restored, apply the list first (it holds back setupwraith and-# launcherx until it is safe), then this script, then the list once more:-# tools\disable.ps1 -TvHost <ip> examples\tcl-65c7l-google-tv\debloat.txt-param([string]$TvHost = $env:TV_HOST)-$ErrorActionPreference = 'Stop'-$OutputEncoding = New-Object System.Text.UTF8Encoding $false-if (-not $TvHost) { throw 'pass -TvHost <tv ip> or set $env:TV_HOST' }-$env:TV_HOST = $TvHost-$repo = Resolve-Path (Join-Path $PSScriptRoot '..\..')-if (-not $env:JAVA_HOME) {- $jdk = Get-ChildItem "$env:USERPROFILE\.jdks" -Directory -Filter 'jdk-17*' -ErrorAction SilentlyContinue | Select-Object -First 1- if ($jdk) { $env:JAVA_HOME = $jdk.FullName }-}--# No -InputKeyService / -HomeKeyService: every remote button still worked with launcherx disabled-# (checked 2026-10-22), and leaving the key helpers off keeps volume hold-to-repeat untouched.-& (Join-Path $repo 'launcher\build-and-install.ps1') -TvHost $TvHost-& (Join-Path $repo 'tools\theme.ps1') -TvHost $TvHost $PSScriptRoot--# The launcher's drifting clock instead of Google's promo screensaver (dreamx is in the list).-$py = Join-Path $repo 'tools\venv\Scripts\python.exe'-& $py -I (Join-Path $repo 'tools\tv.py') 'settings put secure screensaver_components com.gathin.tvhome/.ClockDream'diff --git a/examples/tcl-65c7l-google-tv/restore.ps1 b/examples/tcl-65c7l-google-tv/restore.ps1deleted file mode 100644index c6ccd45ba..000000000--- a/examples/tcl-65c7l-google-tv/restore.ps1+++ /dev/null@@ -1,37 +0,0 @@-# Put this TCL 65" C7L back the way it was before the cleanup on 2026-10-22: every package in-# debloat.txt enabled again, the Google TV home (launcherx) back as Home, the promo screensaver and-# automatic DNS back. Nothing was disabled before the cleanup (pm list packages -d was empty), so-# enabling the whole list is the exact undo.-#-# Usage: examples\tcl-65c7l-google-tv\restore.ps1 -TvHost 192.168.1.50 [-UninstallLauncher]-# -UninstallLauncher also removes the new launcher (com.gathin.tvhome) from the TV.-# Needs network ADB on the TV (Developer options > Wireless debugging) and tools\venv.-param(- [string]$TvHost = $env:TV_HOST,- [switch]$UninstallLauncher-)-$ErrorActionPreference = 'Stop'-$OutputEncoding = New-Object System.Text.UTF8Encoding $false-if (-not $TvHost) { throw 'pass -TvHost <tv ip> or set $env:TV_HOST' }-$env:TV_HOST = $TvHost-$repo = Resolve-Path (Join-Path $PSScriptRoot '..\..')-$py = Join-Path $repo 'tools\venv\Scripts\python.exe'-$tv = Join-Path $repo 'tools\tv.py'--# Packages and Home. setupwraith comes back with the list; the Wi-Fi network now belongs to-# Settings, so re-enabling it does not touch the connection.-& (Join-Path $repo 'tools\restore.ps1') -TvHost $TvHost (Join-Path $PSScriptRoot 'debloat.txt') -Stock com.google.android.apps.tv.launcherx--# Settings changed outside the list. Before the cleanup screensaver_components was unset (the-# Google ambient screensaver) and Private DNS was on its default, automatic.-@(- 'settings delete secure screensaver_components',- 'settings put global private_dns_mode opportunistic',- 'settings delete global private_dns_specifier'-) | & $py -I $tv --batch--if ($UninstallLauncher) {- & $py -I $tv 'pm uninstall com.gathin.tvhome'-}-& $py -I $tv 'input keyevent HOME'-Write-Host 'Restored. Press Home on the remote: the Google TV home should come up.'