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
examples: the Dcolor GD2 and BYINTEK T5 Max tv.json rows match their lists
Mazin Kanuga8a722688ec98
diff --git a/examples/byintek-t5-max/debloat.txt b/examples/byintek-t5-max/debloat.txtindex a0920777f..89b5653b8 100644--- a/examples/byintek-t5-max/debloat.txt+++ b/examples/byintek-t5-max/debloat.txt@@ -10,7 +10,7 @@# Deliberately NOT in this list (measured on this device, 2026-10-20):# - com.google.android.tungsten.setupwraith: `dumpsys wifi` shows cname=com.google.android.tungsten.setupwraith,# so disabling it would delete the saved Wi-Fi network and drop the projector off the network-# (the Wanbo failure). It stays enabled; rejoin Wi-Fi from Settings first if that ever changes.+# (the Wanbo failure). The list leaves it enabled; rejoin Wi-Fi from Settings first if that ever changes.# - com.google.android.apps.tv.launcherx and setupwraith were disabled separately, later, only# after the owner forgot and rejoined the Wi-Fi network in Settings (cname then read# android.uid.system:1000): `pm disable-user --user 0` for both, thendiff --git a/examples/byintek-t5-max/tv.json b/examples/byintek-t5-max/tv.jsonindex 31c6f95a4..c04411620 100644--- a/examples/byintek-t5-max/tv.json+++ b/examples/byintek-t5-max/tv.json@@ -2,5 +2,5 @@"tv": "BYINTEK T5 Max projector (built-in Google TV stick: SkyworthDigital YYT, Amlogic), Brazil","os": "Google TV 14","brand": "BYINTEK",- "notes": "Same stick/firmware as Wanbo X5 Pro; telemetry, Privacy Sandbox, xCPE, Skyworth device-info and factory test apps off; setupwraith kept (it owns the saved Wi-Fi here) and launcherx kept enabled as recovery while the fork is HOME; voice, Chromecast, OTA kept; autofocus/keystone/HDMI run by the projector mainboard, not Android"+ "notes": "Same stick/firmware as Wanbo X5 Pro; telemetry, Privacy Sandbox, xCPE, Skyworth device-info and factory test apps off; setupwraith and launcherx left out of the list, then disabled by hand after a Wi-Fi forget/rejoin (undo in the header); voice, Chromecast receiver, OTA kept (casting not checked with setupwraith off; the Gadnic PROJ100W list, same stick, says it breaks); autofocus/keystone/HDMI run by the projector mainboard, not Android"}diff --git a/examples/dcolor-gd2/tv.json b/examples/dcolor-gd2/tv.jsonindex 87065a22b..d14e846ff 100644--- a/examples/dcolor-gd2/tv.json+++ b/examples/dcolor-gd2/tv.json@@ -1,6 +1,6 @@{"tv": "Dcolor GD2 (YHT)",- "os": "Android TV 14 (SDK 34)",+ "os": "Google TV 14 (SDK 34)","brand": "Dcolor","notes": "Manufacturer: SDMC; Google Play services present; came with Google TV; build: Dcolor/GD2/YHT:14/URO4.260304.027/15200246:user/release-keys; information read from the TV on 2026-10-24"}diff --git a/tests/test_tv_json_google_tv_os.py b/tests/test_tv_json_google_tv_os.pynew file mode 100644index 000000000..d17dbf334--- /dev/null+++ b/tests/test_tv_json_google_tv_os.py@@ -0,0 +1,68 @@+"""A list whose header says Google TV has a tv.json "os" that says so too.++tools/gen_tables.py writes the OS cell of both TV tables from tv.json, not from the list, so a row can drift+from the header it stands for. The first line of examples/dcolor-gd2/debloat.txt names "Google TV 14 (SDK 34)"+and its tv.json notes say it "came with Google TV", while its "os" read "Android TV 14 (SDK 34)": both tables+told a reader looking for a Google TV list that this box was Android TV.++Only the plain case is checked: the header's first three lines name "Google TV <version>", so "os" (and+"readme_os" when there is one) must name Google TV. A header that only mentions the Google TV launcher, a+"Google TV stick" or a product called "Google TV 4K" is not read as the OS.++Run from the repository root: python3 -m unittest discover -s tests -v+"""+import json+import re+from pathlib import Path+import unittest++ROOT = Path(__file__).resolve().parents[1]+EXAMPLES = ROOT / "examples"+HEADER_LINES = 3+GOOGLE_TV_OS = re.compile(r"\bGoogle TV \d+\b")+++def mismatches(header, data):+ """The tv.json keys whose OS cell drops Google TV although the header names Google TV <version>."""+ if not GOOGLE_TV_OS.search("\n".join(header.split("\n")[:HEADER_LINES])):+ return []+ return [key for key in ("os", "readme_os") if key in data and "Google TV" not in data[key]]+++class GoogleTvOsTest(unittest.TestCase):+ def test_every_google_tv_header_has_a_google_tv_row(self):+ wrong = []+ for folder in sorted(p for p in EXAMPLES.iterdir() if p.is_dir()):+ listing, row = folder / "debloat.txt", folder / "tv.json"+ if not (listing.is_file() and row.is_file()):+ continue # test_examples.py refuses a folder without them+ data = json.loads(row.read_text(encoding="utf-8"))+ header = listing.read_text(encoding="utf-8", errors="replace")+ wrong += [f"examples/{folder.name}/tv.json \"{key}\": {data[key]!r}"+ for key in mismatches(header, data)]+ self.assertEqual(wrong, [], "the list header says Google TV <version>; say Google TV in the row too")++ def test_the_dcolor_case_is_caught(self):+ header = "# Dcolor GD2 (SDMC, device YHT, Amlogic), Google TV 14 (SDK 34)\n# Build: x\n"+ self.assertEqual(mismatches(header, {"os": "Android TV 14 (SDK 34)"}), ["os"])+ self.assertEqual(mismatches(header, {"os": "Google TV 14 (SDK 34)"}), [])++ def test_readme_os_is_checked_too(self):+ header = "# Some box, Google TV 12\n"+ data = {"os": "Google TV 12", "readme_os": "Android TV 12"}+ self.assertEqual(mismatches(header, data), ["readme_os"])++ def test_a_launcher_or_stick_name_is_not_the_os(self):+ header = ("# Projector, built-in Google TV stick: ro.product.model=\"4K Google TV Stick\"\n"+ "# Android TV 14 (Google TV), firmware x\n# Home it shipped with: Google TV (launcherx)\n")+ self.assertEqual(mismatches(header, {"os": "Android TV 14"}), [])+ header = "# ACME Google TV 4K\n# Android TV 11 with the Google TV home\n"+ self.assertEqual(mismatches(header, {"os": "Android TV 11"}), [])++ def test_only_the_first_lines_are_read(self):+ header = "# Some set, Android TV 11\n#\n#\n# Compare with the Google TV 12 list in another folder\n"+ self.assertEqual(mismatches(header, {"os": "Android TV 11"}), [])+++if __name__ == "__main__":+ unittest.main()