Skip to content

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

examples: seven list headers point at docs/TROUBLESHOOTING.md, not a README section that moved

Mazin Kanugacc1eb8a65013
diff --git a/examples/google-chromecast-gtv-4k/debloat.txt b/examples/google-chromecast-gtv-4k/debloat.txt
index 2f6eeb7e6..2bc6b1396 100644
--- a/examples/google-chromecast-gtv-4k/debloat.txt
+++ b/examples/google-chromecast-gtv-4k/debloat.txt
@@ -14,7 +14,8 @@
# - ADB on port 5555 is closed (connection refused) until you pair once through Wireless debugging with
# the stock adb: Developer options > Wireless debugging > Pair device with pairing code, `adb pair
# <ip:pairport> <code>`, `adb connect <ip:connectport>` (`adb mdns services` lists both ports), then
-# `adb tcpip 5555`. After that tools/tv.py works on 5555 (README, Troubleshooting).
+# `adb tcpip 5555`. After that tools/tv.py works on 5555
+# (docs/TROUBLESHOOTING.md, "USB debugging never opens port 5555").
# - `cmd package set-home-activity com.gathin.tvhome` returns Success but launcherx stays the default.
# Disable BOTH com.google.android.apps.tv.launcherx and com.google.android.tungsten.setupwraith
# (setupwraith re-enables launcherx), only after the new launcher is installed.
diff --git a/examples/google-tv-streamer-4k-kirkwood/debloat.txt b/examples/google-tv-streamer-4k-kirkwood/debloat.txt
index 0e58de7bf..8f56cebe3 100644
--- a/examples/google-tv-streamer-4k-kirkwood/debloat.txt
+++ b/examples/google-tv-streamer-4k-kirkwood/debloat.txt
@@ -11,7 +11,8 @@
# - ADB on port 5555 is closed (connection refused) until you pair once through Wireless debugging with
# the stock adb: Developer options > Wireless debugging > Pair device with pairing code, `adb pair
# <ip:pairport> <code>`, `adb connect <ip:connectport>` (`adb mdns services` lists both ports), then
-# `adb tcpip 5555`. After that tools/tv.py works on 5555 (README, Troubleshooting).
+# `adb tcpip 5555`. After that tools/tv.py works on 5555
+# (docs/TROUBLESHOOTING.md, "USB debugging never opens port 5555").
# - The Cast receiver (com.google.android.apps.mediashell) reads its factory device credentials from a
# provider hosted INSIDE the setup wizard package:
# Provider{com.google.android.tungsten.setupwraith/com.google.android.libraries.tv.setupwraith.libs.castinfo.CastInfoProvider}
diff --git a/examples/tcl-55s470g/debloat.txt b/examples/tcl-55s470g/debloat.txt
index 3e969b6d5..9ade06b57 100644
--- a/examples/tcl-55s470g/debloat.txt
+++ b/examples/tcl-55s470g/debloat.txt
@@ -59,5 +59,6 @@ com.google.android.videos # Google TV app (purchases/rentals)
com.tcl.smartalexa # Alexa
com.google.android.tv.remote.service # Google TV phone-app remote (the physical remote is unaffected)
-# Needed for the custom launcher. Disable only AFTER launcher/ is installed (see README Troubleshooting).
+# Needed for the custom launcher. Disable only AFTER launcher/ is installed
+# (see docs/TROUBLESHOOTING.md, "The new launcher still doesn't own Home").
com.google.android.tungsten.setupwraith
diff --git a/examples/tcl-65q550g/debloat.txt b/examples/tcl-65q550g/debloat.txt
index 822a7ea27..66c7cc3d6 100644
--- a/examples/tcl-65q550g/debloat.txt
+++ b/examples/tcl-65q550g/debloat.txt
@@ -4,8 +4,6 @@
# Undo: TV_HOST=<tv ip> tools/restore.sh examples/tcl-65q550g/debloat.txt
# Everything is DISABLED, not uninstalled. Comment out any line you want to keep.
#
-# Known quirk on this firmware: default_input_method points at com.baidu.input, which is not
-# installed, so no keyboard appears in search fields. Set Gboard as the IME (see README gotchas).
# Tested on one unit over Ethernet: setupwraith owned saved Wi-Fi networks and claimed HOME;
# disabling it over Ethernet allowed CleanYourTV to become HOME. Do not disable it over Wi-Fi.
diff --git a/examples/tcl-g05-google-tv/debloat.txt b/examples/tcl-g05-google-tv/debloat.txt
index 6b39a1207..27eab0a05 100644
--- a/examples/tcl-g05-google-tv/debloat.txt
+++ b/examples/tcl-g05-google-tv/debloat.txt
@@ -22,7 +22,7 @@
# black, looping recovery screen. Shell cannot disable that component. Disabling the whole setupwraith
# package worked until a reboot, after which this TV had it back in charge, unlike the MOOR2, QM6K and
# Chromecast reports where the disable survives. launcher/build-and-install.sh refuses and rolls back
-# while Home resolves to setupwraith (README, Troubleshooting).
+# while Home resolves to setupwraith (docs/TROUBLESHOOTING.md, "The new launcher still doesn't own Home").
# Recover with: pm enable com.google.android.apps.tv.launcherx; pm enable com.google.android.tungsten.setupwraith
# - AR71 (US, a TCL 55Q750G, 21 October 2026): the first run of build-and-install.sh on G05 firmware.
# setupwraith stayed disabled across a reboot and Home stayed with the new launcher (mFocusedApp =
diff --git a/examples/tcl-qm6k-google-tv/debloat.txt b/examples/tcl-qm6k-google-tv/debloat.txt
index 81df770e3..6415ed17b 100644
--- a/examples/tcl-qm6k-google-tv/debloat.txt
+++ b/examples/tcl-qm6k-google-tv/debloat.txt
@@ -1,7 +1,7 @@
# TCL QM6K Pro Google TV, 2025, US (device G08, model "Smart TV Pro", MediaTek tcl9618)
# Android 14 (Google TV), firmware UTT2.250416.001 AU16
# Also seen on the same G08 board with AU14 firmware, a "Smart TV Pro" sold outside the US (prasta1, PR #23);
-# that set needed Wireless-debugging pairing (README, Troubleshooting).
+# that set needed Wireless-debugging pairing (docs/TROUBLESHOOTING.md, "USB debugging never opens port 5555").
#
# Apply: TV_HOST=<tv ip> tools/disable.sh examples/tcl-qm6k-google-tv/debloat.txt
# Undo: TV_HOST=<tv ip> tools/restore.sh examples/tcl-qm6k-google-tv/debloat.txt com.google.android.apps.tv.launcherx
diff --git a/examples/xiaomi-mi-tv-4a/debloat.txt b/examples/xiaomi-mi-tv-4a/debloat.txt
index cfb071e0d..60c7b169b 100644
--- a/examples/xiaomi-mi-tv-4a/debloat.txt
+++ b/examples/xiaomi-mi-tv-4a/debloat.txt
@@ -6,7 +6,8 @@
# Everything is DISABLED, not uninstalled. Comment out any line you want to keep.
#
# Known quirk on this firmware: default_input_method points at com.baidu.input, which is not
-# installed, so no keyboard appears in search fields. Set Gboard as the IME (see README gotchas).
+# installed, so no keyboard appears in search fields. Set Gboard as the IME
+# (docs/TROUBLESHOOTING.md, "No on-screen keyboard").
# Xiaomi telemetry
com.miui.tv.analytics
diff --git a/examples/xiaomi-mitv-moor2/debloat.txt b/examples/xiaomi-mitv-moor2/debloat.txt
index cbfb60470..59eef53f4 100644
--- a/examples/xiaomi-mitv-moor2/debloat.txt
+++ b/examples/xiaomi-mitv-moor2/debloat.txt
@@ -118,7 +118,8 @@ com.google.android.play.games # Play Games
# Android ignores android:priority on HOME filters for non-system apps and `cmd package
# set-home-activity` reports Success without taking effect (not even across a reboot). Disabling
# the setupwraith PACKAGE is what frees the slot; `pm disable-user` on its individual components is
-# refused with a SecurityException. See the README troubleshooting section.
+# refused with a SecurityException. See docs/TROUBLESHOOTING.md,
+# "The new launcher still doesn't own Home".
#
# Trade-off: setupwraith is the first-run setup wizard. Everyday use is unaffected, but re-enable it
# before a factory reset - tools/restore.sh does that for you while this line is in the list.
diff --git a/tests/test_list_troubleshooting_pointers.py b/tests/test_list_troubleshooting_pointers.py
new file mode 100644
index 000000000..d183a5628
--- /dev/null
+++ b/tests/test_list_troubleshooting_pointers.py
@@ -0,0 +1,107 @@
+"""A list header that sends the reader to a fix names the page the fix is on.
+
+The README's "Gotchas we hit", later its "Troubleshooting" section, moved to docs/TROUBLESHOOTING.md on
+19 October 2026 (c49561eb). Seven list headers still said "(README, Troubleshooting)", "(see README
+gotchas)" or "See the README troubleshooting section", among them examples/xiaomi-mi-tv-4a, the list
+CONTRIBUTING.md and docs/workflows/tv-list.md tell contributors to copy. The README has no such heading
+any more, so the reader searches the front page and finds "When something goes wrong" with three
+bullets. The pairing recipe and the keyboard fix are not among them, and the setupwraith bullet is a
+summary that sends the reader on to docs/TROUBLESHOOTING.md.
+
+The sweep reads every page and list under examples/, with a list's `#` comment wraps joined, and lets a
+README section through only when the README still has a heading of that name. The table names the
+bullet each of those seven headers points at now, and the bullet has to start that way in the doc.
+
+Run from the repository root: python3 -m unittest discover -s tests -v
+"""
+import os
+import re
+import unittest
+from pathlib import Path
+
+
+ROOT = Path(__file__).resolve().parents[1]
+EXAMPLES = ROOT / "examples"
+README = (ROOT / "README.md").read_text(encoding="utf-8")
+DOC = (ROOT / "docs" / "TROUBLESHOOTING.md").read_text(encoding="utf-8")
+
+# "README, Troubleshooting", "README Troubleshooting", "the README troubleshooting section",
+# "README's Troubleshooting", "README gotchas".
+README_SECTION = re.compile(r"\bREADME(?:'s)?,?\s+(troubleshooting|gotchas)\b", re.I)
+# A list wraps its header at about 105 columns, and a pointer can be cut anywhere in it.
+COMMENT_WRAP = re.compile(r"\s*\n#\s*")
+FENCE = re.compile(r"```.*?```", re.S)
+
+# Folder -> the bullet in docs/TROUBLESHOOTING.md its header names, as `docs/TROUBLESHOOTING.md, "..."`.
+POINTERS = {
+ "google-tv-streamer-4k-kirkwood": "USB debugging never opens port 5555",
+ "google-chromecast-gtv-4k": "USB debugging never opens port 5555",
+ "tcl-qm6k-google-tv": "USB debugging never opens port 5555",
+ "tcl-g05-google-tv": "The new launcher still doesn't own Home",
+ "tcl-55s470g": "The new launcher still doesn't own Home",
+ "xiaomi-mitv-moor2": "The new launcher still doesn't own Home",
+ "xiaomi-mi-tv-4a": "No on-screen keyboard",
+}
+
+
+def joined(text):
+ """A list's text with its `#` comment wraps joined into one line, as a reader reads it."""
+ return COMMENT_WRAP.sub(" ", text)
+
+
+def readme_headings():
+ return [h.lower() for h in re.findall(r"^#+\s+(.+)$", FENCE.sub("", README), re.M)]
+
+
+def pages(root):
+ """(relative path, text) for every list and page under root, in a stable order."""
+ for directory, subdirectories, files in os.walk(root):
+ subdirectories.sort()
+ for name in sorted(files):
+ if name.endswith((".txt", ".md")):
+ path = Path(directory) / name
+ yield path.relative_to(ROOT), path.read_text(encoding="utf-8", errors="replace")
+
+
+def missing_sections(root, headings):
+ """(file, pointer) for every README section named under root that headings do not have."""
+ found = []
+ for path, text in pages(root):
+ for match in README_SECTION.finditer(joined(text)):
+ if not any(match.group(1).lower() in heading for heading in headings):
+ found.append((str(path), match.group(0)))
+ return found
+
+
+class ListTroubleshootingPointersTest(unittest.TestCase):
+ def test_the_pattern_reads_every_spelling_the_lists_used(self):
+ for text in ("works on 5555 (README, Troubleshooting).", "installed (see README Troubleshooting).",
+ "See the README troubleshooting section.", "Set Gboard as the IME (see README gotchas).",
+ "the README's Troubleshooting has it"):
+ with self.subTest(text=text):
+ self.assertRegex(text, README_SECTION)
+ for text in ('(docs/TROUBLESHOOTING.md, "No on-screen keyboard")', "Steps in the README FAQ.",
+ "see launcher Troubleshooting #3"):
+ with self.subTest(text=text):
+ self.assertNotRegex(text, README_SECTION)
+
+ def test_a_pointer_cut_by_a_comment_wrap_is_still_read(self):
+ text = "# installed, so no keyboard appears. Set Gboard as the IME (see README\n# gotchas).\n"
+ self.assertRegex(joined(text), README_SECTION)
+
+ def test_no_page_in_examples_names_a_readme_section_the_readme_does_not_have(self):
+ self.assertEqual(missing_sections(EXAMPLES, readme_headings()), [],
+ "the section moved to docs/TROUBLESHOOTING.md: name the bullet there")
+
+ def test_each_header_names_the_bullet_the_fix_is_in(self):
+ for folder, lead in POINTERS.items():
+ with self.subTest(folder=folder):
+ self.assertTrue(re.search(r"^- \*\*" + re.escape(lead), DOC, re.M),
+ f"no bullet in docs/TROUBLESHOOTING.md starts with {lead!r}")
+ pointer = f'docs/TROUBLESHOOTING.md, "{lead}"'
+ header = joined((EXAMPLES / folder / "debloat.txt").read_text(encoding="utf-8"))
+ self.assertTrue(pointer in header, f"the header does not name {pointer}")
+
+
+if __name__ == "__main__":
+ unittest.main()