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 EU 75T8C header counts eight packages off here, not nine
xbshengacb5a81a3fcc
diff --git a/examples/tcl-65c7k-google-tv/debloat-75t8c-eu.txt b/examples/tcl-65c7k-google-tv/debloat-75t8c-eu.txtindex 3c34088d6..f373b305b 100644--- a/examples/tcl-65c7k-google-tv/debloat-75t8c-eu.txt+++ b/examples/tcl-65c7k-google-tv/debloat-75t8c-eu.txt@@ -7,7 +7,7 @@# Same board and build as the Brazilian 65C7K in examples/tcl-65c7k-google-tv, and this file is a# second unit for that folder, not a replacement: debloat.txt there is the Brazilian list, this one# is what the EU set needed. Read against each other — five active lines of the Brazilian list were-# reproduced broken here (marked DO NOT DISABLE below) and nine more are off here than there.+# reproduced broken here (marked DO NOT DISABLE below), and eight more packages are off here than there.## Tested 2026-10-22 to 2026-11-01: every package below disabled, five days and one reboot with no# drift (tools/check.py), Home on Free My TV, the remote's Netflix/YouTube/Prime buttons mapped,diff --git a/tests/test_list_header_counts.py b/tests/test_list_header_counts.pyindex a0f5f6e60..769622b9a 100644--- a/tests/test_list_header_counts.py+++ b/tests/test_list_header_counts.py@@ -23,6 +23,18 @@ packages disabled - the 27 below plus com.tcl.t_solo", and t_solo is commented osweep that read nothing fails rather than passing: the rule is only worth having while lists statetheir size this way.+A second list also counts itself against the folder's other list: `examples/tcl-65c7k-google-tv/+debloat-75t8c-eu.txt` is the EU 75T8C unit beside the Brazilian 65C7K's debloat.txt, and its header+says "eight more packages are off here than there". That sentence is the only way a reader learns how+the two lists differ without diffing the two files by hand, and nothing read it either: it said "nine"+from 3cc882ea (1 Nov, the commit that was itself matching the header to the file) until this check,+while the two files differ by eight (the EU list sends dreamx, launcherx, play.games, the calendar sync+adapter, Play Movies, YouTube Music, backgrounddetection and the MediaTek webview, and the Brazilian+one sends none of them). So the phrase is read too, as a claim about the pair: N is how many packages+this list sends that the sibling `debloat*.txt` in the same folder does not. "off here than there"+can only mean that - a package is off here only if this list sends it - and a folder with one list+states no such comparison, so the walk reads only the folders that ship two.+Run from the repository root: python3 -m unittest discover -s tests -v"""import re@@ -36,6 +48,13 @@ TRAILING_COMMENT = re.compile(r"\s+#.*$")# `the 13 below plus com.google.android.partnersetup` - the package is named in words or in# backticks, and it is an addition to the lines below the sentence.EXTRA = re.compile(r"the\s+(\d+)\s+below\s+plus\s+`?([A-Za-z][\w.]*\.[\w.]+)`?", re.IGNORECASE)+# `eight more packages are off here than there` - a second list counting what it sends on top of the+# folder's other list. The number is written in words or in digits.+MORE = re.compile(r"\b([A-Za-z0-9]+)\s+more\s+(?:packages?\s+)?(?:are\s+)?off\s+here\s+than\s+there\b",+ re.IGNORECASE)+WORDS = {word: number for number, word in enumerate(+ "one two three four five six seven eight nine ten eleven twelve thirteen fourteen fifteen sixteen "+ "seventeen eighteen nineteen twenty".split(), 1)}def extras(text):@@ -63,6 +82,24 @@ def lists():)+def more_off_here(text):+ """Every "N more ... are off here than there" a file states, as N. A word the map has not got is+ left out: the sentence is read as a number, not guessed at."""+ found = []+ for match in MORE.finditer(text):+ token = match.group(1).lower()+ if token.isdigit():+ found.append(int(token))+ elif token in WORDS:+ found.append(WORDS[token])+ return found+++def siblings(path):+ """The other debloat list(s) the same folder ships."""+ return sorted(p for p in path.parent.glob("debloat*.txt") if p.is_file() and p != path)++class HeaderCountTest(unittest.TestCase):def test_a_package_named_as_an_extra_is_not_one_of_the_lines_below(self):read = 0@@ -111,5 +148,44 @@ class ReaderTest(unittest.TestCase):self.assertEqual(extras(text), [])+class SecondListDifferenceTest(unittest.TestCase):+ def test_the_number_the_header_states_is_the_difference_between_the_two_lists(self):+ read = 0+ for path in lists():+ for count in more_off_here(path.read_text(encoding="utf-8")):+ read += 1+ with self.subTest(list=path.parent.name, file=path.name):+ others = siblings(path)+ self.assertEqual(+ 1, len(others),+ f"examples/{path.parent.name}/{path.name} counts itself against \"there\", "+ f"and the folder ships {len(others)} other lists: {[o.name for o in others]}")+ here, there = set(packages(path)), set(packages(others[0]))+ self.assertEqual(+ count, len(here - there),+ f"examples/{path.parent.name}/{path.name} says {count} more packages are off "+ f"here than in {others[0].name}, and it sends {len(here - there)} that "+ f"{others[0].name} does not: {sorted(here - there)}")+ self.assertGreaterEqual(+ read, 1,+ "no debloat list states a difference against the folder's other list any more")+++class SecondListReaderTest(unittest.TestCase):+ """The reader above, against sentences written here."""++ def test_a_number_in_digits_is_read(self):+ self.assertEqual(more_off_here("# and 8 more are off here than there.\n"), [8])++ def test_a_number_in_words_is_read(self):+ self.assertEqual(more_off_here("# ... and eight more packages are off here than there.\n"), [8])++ def test_a_header_with_no_comparison_is_not_read(self):+ self.assertEqual(more_off_here("# nine more are off here than in the C755 list.\n"), [])++ def test_a_word_the_map_has_not_got_is_not_guessed_at(self):+ self.assertEqual(more_off_here("# many more are off here than there.\n"), [])++if __name__ == "__main__":unittest.main()