Skip to content

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

examples: the 55C728 note is in the notes index once, not twice

xbsheng123cec02c240
diff --git a/examples/README.md b/examples/README.md
index 68185e524..2c42ee2ca 100644
--- a/examples/README.md
+++ b/examples/README.md
@@ -281,7 +281,6 @@ Notes for models that have no tested list yet live in [`docs/devices/`](../docs/
- [Haier `HaierATVT32DVB`](../docs/devices/haier-haieratvt32dvb.md) (`dupont`, same Haier/CVTE platform as the Durabrand above, Google TV 14 `UKNV.260408.001`): an observed-state note, not a list; the factory stack on Google TV 14, and `com.cvte.tv.fac.menu` named in the don't-launch list.
- [TCL `75c63b`](../docs/devices/tcl-75c63b.md), owner-reported retail model, `Smart TV Pro` / `BeyondTV4`, Android 11, `V8-R51MT05-LF1V652`: launcher-only installation, HOME priorities and component restrictions, correct Live TV player package, restoration and explicit test limits.
- [TCL `55C728`](../docs/devices/tcl-55c728-g05-4k-gb.md), `Smart TV Pro` / `G05` / `G05_4K_GB`, Google TV 11 `TCL/G05_4K_GB/G05:11/AR2101/AR28`: a same-day 23-package set kept as a note, the G05 reboot answer by build (`AR68` puts setupwraith back, the `G05_4K_GB` units do not), the remote keycodes and vendor input URIs, and why this owner kept `com.tcl.suspension` where the US list disables it; a second unit (TCL 65C835, Italy, Wi-Fi) adds the reference launcher on `AR28`, a Wi-Fi network setupwraith did not own, and 17 packages that were already not installed before its cleanup.
-- [TCL `55C728`](../docs/devices/tcl-55c728-g05-4k-gb.md), `Smart TV Pro` / `G05` / `G05_4K_GB`, Google TV 11 `TCL/G05_4K_GB/G05:11/AR2101/AR28`: a same-day 23-package set kept as a note, the G05 reboot answer by build (`AR68` puts setupwraith back, the `G05_4K_GB` units do not), the remote keycodes and vendor input URIs, and why this owner kept `com.tcl.suspension` where the US list disables it.
- [Xiaomi Mi TV 4S 75" (MiTV4-ANSM0)](../docs/devices/xiaomi-mitv4-ansm0.md), China, Android 6.0.1 (API 23), firmware `20.3.6.2057`: `pm disable-user` and `pm hide` are refused, so there is no disable list. The launcher fork hides 应用中心, 电视管家, 定时提醒 and 无线投屏; 米家, 云视听小电视, voice, update and the HDMI player stay. Stock home `com.mitv.tvhome` can return on boot.
- [Xiaomi MiTV-MFTR0 "freeguy"](../docs/devices/xiaomi-mitv-mftr0-freeguy.txt), China, Android 14: inputs, Xiaomi settings intents, app discovery.
- [Philips 65PUG7406/78](../docs/devices/philips-65pug7406-78.md), Brazil, Android TV 11, `TPM215L_R.105.000.097.000`: HOME handover notes and owner-selected Live TV/Assistant disables; no several-day debloat list.
diff --git a/tests/test_device_notes_index.py b/tests/test_device_notes_index.py
index 717e1f58e..5046cf61f 100644
--- a/tests/test_device_notes_index.py
+++ b/tests/test_device_notes_index.py
@@ -124,6 +124,45 @@ def index_notes(root):
return notes
+def index_entries(root):
+ """The device notes under the "no tested list yet" heading, as {note: [page line numbers]}.
+
+ Line numbers, not just names: two entries for one note read as two different TVs, and the older
+ of the two is the one that stops being maintained. A link inside a fenced block in the section is
+ not an entry (it is a command or an example), and neither is a note the table above links.
+ """
+ page = Path(root) / "examples" / "README.md"
+ if not page.is_file():
+ return {}
+ prefix = "../docs/devices/"
+ entries, inside, fenced = {}, False, False
+ for number, line in enumerate(page.read_text(encoding="utf-8", errors="replace").splitlines(), 1):
+ if not inside:
+ inside = NOTE_INDEX_HEADING in line
+ continue
+ if line.startswith("## "):
+ break
+ if line.lstrip().startswith("```"):
+ fenced = not fenced
+ continue
+ if fenced:
+ continue
+ # One line naming the same note twice ("[TCL 55C728](../docs/devices/x.md), 55C728: ...") is
+ # one entry, so a line is counted once whatever the number of links on it.
+ for target in dict.fromkeys(destinations(line)):
+ if target.startswith(EXTERNAL):
+ continue
+ local = unquote(target.split("#")[0])
+ if local.startswith(prefix):
+ entries.setdefault(local[len(prefix):], []).append(number)
+ return entries
+
+
+def notes_listed_twice(entries):
+ """The notes a page lists more than once, with the lines each one is on."""
+ return {note: lines for note, lines in entries.items() if len(lines) > 1}
+
+
def own_list(root, note):
"""The list a note claims for its own model - examples/<the note's file name>/debloat.txt - when it links one.
@@ -352,5 +391,79 @@ class NoteFiledWithItsListTest(unittest.TestCase):
self.assertEqual([], index_notes_with_their_own_list(root))
+class NoteIndexOneEntryTest(unittest.TestCase):
+ """One entry per note under the "no tested list yet" heading.
+
+ A merge that keeps both sides of a conflicting hunk leaves the old entry next to the new one, and
+ the page then offers the same TV twice: the reader picks either, and the copy that is not being
+ updated is the one they can land on. c7af946d repaired two of these by hand; this is the rule
+ behind that repair, so the next union cannot leave another pair.
+ """
+
+ def test_each_note_is_listed_once(self):
+ entries = index_entries(ROOT)
+ self.assertGreaterEqual(len(entries), 20, "the notes index was not read")
+ twice = notes_listed_twice(entries)
+ message = "\n".join(
+ f"docs/devices/{note} is listed on lines {', '.join(str(n) for n in lines)} of "
+ f"examples/README.md: one entry per note, in the newer text"
+ for note, lines in sorted(twice.items()))
+ self.assertEqual({}, twice, message)
+
+ # --- the reader, against pages written here, so the test above cannot pass by reading nothing ---
+
+ @staticmethod
+ def _page(tmp, body):
+ root = Path(tmp)
+ (root / "examples").mkdir(parents=True)
+ (root / "examples" / "README.md").write_text(
+ f"{NOTE_INDEX_HEADING} live in [`docs/devices/`](../docs/devices/):\n\n{body}", encoding="utf-8")
+ return root
+
+ def test_a_note_listed_twice_is_reported_with_both_lines(self):
+ with tempfile.TemporaryDirectory() as tmp:
+ root = self._page(tmp,
+ "- [TCL `55C728`](../docs/devices/tcl-55c728.md): the newer text.\n"
+ "- [TCL `55C728`](../docs/devices/tcl-55c728.md): the older text.\n")
+ twice = notes_listed_twice(index_entries(root))
+ self.assertEqual({"tcl-55c728.md": [3, 4]}, twice)
+
+ def test_a_note_listed_once_is_quiet(self):
+ with tempfile.TemporaryDirectory() as tmp:
+ root = self._page(tmp,
+ "- [TCL `55C728`](../docs/devices/tcl-55c728.md): a note.\n"
+ "- [Sharp 32FI4EA](../docs/devices/sharp-32fi4ea.md): another note.\n")
+ self.assertEqual({}, notes_listed_twice(index_entries(root)))
+
+ def test_two_links_to_one_note_on_one_line_are_one_entry(self):
+ # "[55C728](../docs/devices/tcl-55c728.md) (55C728, G05)" names the note twice on one line.
+ with tempfile.TemporaryDirectory() as tmp:
+ root = self._page(tmp,
+ "- [TCL `55C728`](../docs/devices/tcl-55c728.md), `55C728`, "
+ "[the same note](../docs/devices/tcl-55c728.md): one set of notes.\n")
+ self.assertEqual({"tcl-55c728.md": [3]}, index_entries(root))
+
+ def test_a_path_in_a_fenced_block_is_not_an_entry(self):
+ # The section explains where these notes live; a command in it is not an index entry.
+ with tempfile.TemporaryDirectory() as tmp:
+ root = self._page(tmp,
+ "```\ncat ../docs/devices/tcl-55c728.md\n```\n\n"
+ "- [TCL `55C728`](../docs/devices/tcl-55c728.md): a note.\n")
+ self.assertEqual({"tcl-55c728.md": [7]}, index_entries(root))
+
+ def test_a_row_above_the_heading_is_not_an_entry(self):
+ # A list's row links its own note too; only the entries under the heading are the index.
+ with tempfile.TemporaryDirectory() as tmp:
+ root = Path(tmp)
+ (root / "examples").mkdir(parents=True)
+ (root / "examples" / "README.md").write_text(
+ "| `tcl-g05-google-tv/` | TCL G05 | Google TV 11 | see "
+ "[the 55C728 note](../docs/devices/tcl-55c728.md) |\n"
+ f"{NOTE_INDEX_HEADING} live in [`docs/devices/`](../docs/devices/):\n\n"
+ "- [Sharp 32FI4EA](../docs/devices/sharp-32fi4ea.md): a note.\n",
+ encoding="utf-8")
+ self.assertEqual({"sharp-32fi4ea.md": [4]}, index_entries(root))
+
+
if __name__ == "__main__":
unittest.main()