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 X9000H note belongs to its row, not to the no-list index
xbsheng300d75421abb
diff --git a/examples/README.md b/examples/README.mdindex e772cd3d1..ba82c544d 100644--- a/examples/README.md+++ b/examples/README.md@@ -44,7 +44,7 @@ on that firmware, grouped and commented. These are starting points: comment out| `grundig-kunyang/` | Grundig Android UHD TV (Arçelik, GxGrNM, kunyang, MediaTek), Turkey | Android TV 14 | First Arçelik list: Grundig Channel (Hoppr ad tiles), HotelService, TV Care Hub, partner auto-installs, Privacy Sandbox, Google feedback; Assistant, AirScreen/AirCast, Kids, Play Movies/Games off by choice, Chromecast kept; `fusion.android.tv.demo` handles the Input key, keep it; setupwraith claims no HOME; launcher works, every remote button works with no key service; AdGuard DNS validates; 1.8 GB, +290 MB available; reboot-checked || `haier-android-tv-dvb2k/` | Haier Android TV DVB2K (broadway, HaierATVT56DVB) | Android TV 11 | Anoki ACR, retail demo, Haier content apps and auto-install; 1 GB, 720p; setupwraith left enabled || `haier-h32s80efx/` | Haier H32S80EFX (MatrixTV CE, HRT56EU, deto, MediaTek), Thailand | Google TV 14 | Haier hOn IoT and smart-device services, Haier tab and Kinopoisk promo, retail demo, cleaner; YouTube Music and Google TV app off by choice; setupwraith must go (RecoveryActivity component refused); Live TV must target the digital tuner, TrueID also claims channel intents |-| `hisense-65d62qh/` | Hisense 65D62QH (VIDAA_TV, MediaTek MT9653), China | Android TV 11 | China JuUI 9.0.10.845, same build as `vidda-mt9653/`: ad SDK/service, home operator rows and weather feed, telemetry, push channel, retail/hotel/demo and preloaded content, the 拍信创意 screensaver, and the AOSP leftovers this build leaves enabled; debloat only, stock Home `com.jamdeo.tv.vod` and Live TV kept, OTA kept; 26 packages; a USB HID freeze seen once with a second accessibility service enabled, fine after a rebuild — see `docs/devices/hisense-65d62qh.md` |+| `hisense-65d62qh/` | Hisense 65D62QH (VIDAA_TV, MediaTek MT9653), China | Android TV 11 | China JuUI 9.0.10.845, same build as `vidda-mt9653/`: ad SDK/service, home operator rows and weather feed, telemetry, push channel, retail/hotel/demo and preloaded content, the 拍信创意 screensaver, and the AOSP leftovers this build leaves enabled; debloat only, stock Home `com.jamdeo.tv.vod` and Live TV kept, OTA kept; 26 packages; a USB HID freeze seen once with a second accessibility service enabled, fine after a rebuild — see [the device notes](../docs/devices/hisense-65d62qh.md) || `hisense-e5q-pro/` | Hisense E5Q Pro (VIDAA_TV, MediaTek MT9653), China | Android TV 11 | China VIDAA firmware, the conservative subset of `vidda-mt9653/` (same build): ad SDK/service, push, telemetry, store/hotel/demo and preloaded content; stock launcher `com.jamdeo.tv.vod` and Live TV `com.jamdeo.tv.livetv` kept, OTA kept; 18 packages || `hisense-fire-tv-aftcibfbd1/` | Hisense Fire TV (AFTCIBFBD1, coyote, MediaTek), US | Fire OS 8.0 / Android 11 | First Fire OS 8 TV: Amazon ACR, ad/recommendation feeders, advertising ID, Shopping, demo, tutorials, telemetry; Alexa, AirPlay, Miracast and preloads (Tubi, Music/Photos, miniTV, Naatyam, games, Ambient) off by choice; Alexa voice (vizzini) is re-enabled at every boot and nothing adb can do sticks; two protected packages noted; HDMI input switching is Amazon-only (TUNE_INPUT is signature-level); AdGuard Private DNS works; Kids, OTA, Live TV, Silk kept; debloat only, see the 2023 stick list for more packages || `hisense-hg9/` | Hisense HG9 (HiSmart 4K A4FFM) | Android TV 9 | ACR collector, Smartsense, log reporter, store mode, B2B; FLauncher used instead of stock |@@ -143,7 +143,7 @@ on that firmware, grouped and commented. These are starting points: comment out| `sony-kd-65x9300d/` | Sony BRAVIA KD-65X9300D (2016, SVP-DTV15, MediaTek), Asia-Pacific | Android TV 8.0 | No Samba TV; Sony Select/Discover/BIVL, launcher customizer, Sony/Qterics device agents, SDDP vendorprotocol, tutorials, dead Play Music/Movies; DLNA, USB media, Vewd, Japanese keyboard off by choice; Chromecast, voice, Prime Video, HbbTV kept; 32-bit, 1.5 GB; Inputs lists HDMI 1-4 with CEC names; reboot-checked || `sony-bravia-tl2/` | Sony BRAVIA TL2 (OD0M_EA_T32, TPV-built, MediaTek), Europe | Android TV 11 | TPV org.droidtv platform like the Philips 50PUS8517, not the usual Sony one: no Samba TV or Sony agents; retail demo, TPV partner auto-installs, Google feedback/Play Games; Prime Video, Disney+, Red Bull TV and preloaded games off by choice; stock tvlauncher off for the launcher; org.droidtv untouched, e-manual only hidden; Assistant, Chromecast, phone remote, updates kept; USB debugging alone opens 5555; ~1.7 GB; reboot-checked || `sony-bravia-vu31/` | Sony BRAVIA VU31 4K (BRAVIA_VU31_4K, Realtek), India | Google TV 14 | First Realtek Sony list: no Samba/Qterics/IDD agents on this firmware; Sony promos/Select/tab, demo, help; Google feedback/Play Games/partner setup; ambient screensaver (basic dream set first); unused preloads off by choice; Alexa, Chromecast, AirPlay, Assistant kept; USB debugging alone opens 5555; 2 GB; launcher on a second set: setupwraith before launcherx, Live TV/HDMI in com.android.tv, Input key needs no service, applicationdisabler re-enables Eco Dashboard |-| `sony-x9000h-cn/` | Sony BRAVIA X9000H (2020, BRAVIA_VH1_CN, MediaTek MT5895), China | Android TV 12 | China firmware with no Samba TV, no Google feedback and no Sony promos/Select/tab, so there is no Sony ACR to remove; Qterics/IDD/da.service, demo/help, no-camera packages, JD SmartService, 13 b2b hotel-mode packages and the kids profile off; Dangbei `ChinaHome` replaced by the reference launcher but kept enabled as fallback; Dangbei app store (应用中心) and HappyCast kept; b2b.hotelmode is persistent and its process still starts at boot; idle `iddd` remains; reboot-checked |+| `sony-x9000h-cn/` | Sony BRAVIA X9000H (2020, BRAVIA_VH1_CN, MediaTek MT5895), China | Android TV 12 | China firmware with no Samba TV, no Google feedback and no Sony promos/Select/tab, so there is no Sony ACR to remove; Qterics/IDD/da.service, demo/help, no-camera packages, JD SmartService, 13 b2b hotel-mode packages and the kids profile off; Dangbei `ChinaHome` replaced by the reference launcher but kept enabled as fallback; Dangbei app store (应用中心) and HappyCast kept; b2b.hotelmode is persistent and its process still starts at boot; idle `iddd` remains; reboot-checked; [handover and firmware notes](../docs/devices/sony-x9000h-cn.md) || `sony-xbr-55x850d/` | Sony BRAVIA XBR-55X850D (Android model "BRAVIA 4K 2015"), firmware 6.827 | Android TV 8.0.0 | 19 reversible disables, Roku-primary; TVX/HDMI, CEC, casting and updates preserved; new Home survives reboot; owner-reported 26-second start after >24-hour standby, separate 48-second unplug/replug start; [test notes](sony-xbr-55x850d/README.md) || `sony-xbr-x900e/` | Sony BRAVIA XBR-65X900E (2017, BRAVIA_ATV2) | Android TV 9 | Samba TV ACR, Sony Select, My BRAVIA promos, Discover, device agents; Chromecast, DLNA, mirroring off by choice || `sony-xbr-55x850c/` | Sony BRAVIA XBR-55X850C (2015, "BRAVIA 4K 2015", SVP-DTV15, MediaTek), US firmware | Android TV 8.0 | Same build as the KD-65X9300D; Samba TV, Sony Select/Discover/BIVL, launcher customizer, Sony/Qterics device agents, SDDP vendorprotocol, tutorials, dead Play Music/Movies; voice and unused streaming apps off by choice; Chromecast, mirroring, updates kept; 1.5 GB; Inputs lists HDMI 1-4 with CEC names; reboot-checked |@@ -266,7 +266,6 @@ Notes for models that have no tested list yet live in [`docs/devices/`](../docs/- [Haier `HRA962X2_2G_ALI6G_A`](../docs/devices/haier-hra962x2-ali6g-cn.md), China, API 28 / Android 9, `9.0.0-RS-20230315.0915`: ordinary installer UI, provision HOME handover, physical versus injected Home, a once-per-boot adaptation, the settings overlay service (RootActivity opens the source menu), static wallpaper and exact-state recovery. One-day observations with a locally adapted launcher; no several-day debloat list.- [Sony XR-75X91K (China firmware)](../docs/devices/sony-xr-75x91k-cn.md), owner-reported retail model, `BRAVIA 4K VH21` / `BRAVIA_VH21`, Android 12: ChinaHome launcher component, preferred-Home handover with stock Home enabled, Sony TV/input routing and explicit validation limits; no tested debloat list.- [Sony KD-55X9000H (PA firmware)](../docs/devices/sony-kd-55x9000h.md), `BRAVIA VH1` / `BRAVIA_VH1`, Android 12 `STT2.230505.001.S137` (build `626241`): one-day report with a locally customized launcher, Google stock Home handover and reboot checks, Sony input routing and owner-reported remote/app checks; no several-day debloat list.-- [Sony X9000H (China firmware)](../docs/devices/sony-x9000h-cn.md), `BRAVIA 4K VH1` / `BRAVIA_VH1`, Android 12 `STT2.230505.001.S89`, MediaTek MT5895: Dangbei `ChinaHome` as stock Home, `set-home-activity` handover with stock Home left enabled, a 33-package reboot-checked list, the persistent `b2b.hotelmode` process, native `iddd` still running, and the absence of Samba/Google feedback/promos on this China build.- [Sony K-85XR70](../docs/devices/sony-k85xr70-ae2.md), `BRAVIA 4K AE2`, Android 14, China, `114.602.170.1`: the UI runs at 1080p on a 4K panel by firmware, and a boot can bring the override density back as 640 (UI doubled and clipped) until `display_density_forced` is written as well as `wm density`; no debloat list.- [FPD CG50-C3](../docs/devices/fpd-cg50-c3.md), KTC-built `EcoTV Pro A` / `FPD_4KHA0`, MediaTek, Google TV 11 `RTM9.241015.016`, Canada: a one-day list, kept as a note for that reason; setupwraith owned a saved network that was not the one in use, so `FORCE_SETUPWRAITH=1` was safe; the RC-36 remote's gear and notifications buttons arrive as scancodes 240/362 with `KEY_UNKNOWN`/`KEY_PROGRAM`, so they need `settings_key_scancodes` rather than a keycode.- [Durabrand DB Android TV 4K `DURAT32ISDB`](../docs/devices/durabrand-durat32isdb.md) (`dupont`, m7332 Haier/CVTE board, Android TV 11 `RTM6.230109.232`): one-day owner report, ten packages, the two the firmware turns back on at every boot, the Input panel belonging to the MediaTek TV app instead of `tvlauncher`, and the hidden production menu that leaves Play services and Chromecast disabled until it is exited by hand.diff --git a/tests/test_device_notes_index.py b/tests/test_device_notes_index.pyindex 72d69fa8c..717e1f58e 100644--- a/tests/test_device_notes_index.py+++ b/tests/test_device_notes_index.py@@ -88,6 +88,112 @@ def unlinked_notes(root):return out+# The heading that opens examples/README.md's list of device reports that have no list of their own.+NOTE_INDEX_HEADING = "Notes for models that have no tested list yet"+# A table row of examples/README.md, by the folder its first cell names.+FOLDER_ROW = re.compile(r"^\|\s*`([A-Za-z0-9_.-]+)/`\s*\|")+++def section(text, heading):+ """The lines below the line that contains `heading`, up to the next '## ' heading."""+ out, inside = [], False+ for line in text.splitlines():+ if not inside:+ inside = heading in line+ continue+ if line.startswith("## "):+ break+ out.append(line)+ return "\n".join(out)+++def index_notes(root):+ """The device notes listed under the "no tested list yet" heading, by file name."""+ page = Path(root) / "examples" / "README.md"+ if not page.is_file():+ return []+ prefix = "../docs/devices/"+ notes = []+ for target in destinations(section(page.read_text(encoding="utf-8", errors="replace"),+ NOTE_INDEX_HEADING)):+ if target.startswith(EXTERNAL):+ continue+ local = unquote(target.split("#")[0])+ if local.startswith(prefix):+ notes.append(local[len(prefix):])+ return notes+++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.++ Read from the note rather than from a list kept here: a note that says "a tested package list for+ this unit lives in examples/<folder>/debloat.txt" has a list, whatever the index above says.+ """+ root = Path(root)+ path = root / NOTES / note+ if not path.is_file():+ return None+ stem = Path(note).stem+ for target in destinations(path.read_text(encoding="utf-8", errors="replace")):+ if target.startswith(EXTERNAL):+ continue+ resolved = (path.parent / unquote(target.split("#")[0])).resolve()+ try:+ rel = os.path.relpath(resolved, root.resolve()).replace(os.sep, "/")+ except ValueError:+ continue+ if rel == f"examples/{stem}/debloat.txt" and resolved.is_file():+ return rel+ return None+++def index_notes_with_their_own_list(root):+ """Notes filed under "no tested list yet" that link a list for their own model anyway."""+ out = []+ for note in index_notes(root):+ own = own_list(root, note)+ if own:+ out.append(f"{NOTES}/{note} is filed under \"{NOTE_INDEX_HEADING}\" but links {own}: "+ f"that folder's row is where it belongs")+ return out+++def table_rows(root):+ """examples/README.md's folder rows, as {folder: the row's text}."""+ page = Path(root) / "examples" / "README.md"+ if not page.is_file():+ return {}+ rows = {}+ for line in page.read_text(encoding="utf-8", errors="replace").splitlines():+ match = FOLDER_ROW.match(line)+ if match:+ rows[match.group(1)] = line+ return rows+++def rows_not_linking_their_note(root):+ """Folders whose own device note exists but whose row in examples/README.md does not link it."""+ root = Path(root)+ rows = table_rows(root)+ out = []+ if not (root / "examples").is_dir():+ return out+ for folder in sorted(os.listdir(root / "examples")):+ directory = root / "examples" / folder+ if not directory.is_dir() or not (directory / "debloat.txt").is_file():+ continue+ for suffix in (".md", ".txt"):+ note = f"{folder}{suffix}"+ if not (root / NOTES / note).is_file():+ continue+ link = f"../docs/devices/{note}"+ if link not in rows.get(folder, ""):+ out.append(f"examples/{folder}/ has {NOTES}/{note} but its row does not link it "+ f"({link})")+ return out++class DeviceNotesLinkedTest(unittest.TestCase):def test_every_device_note_is_linked(self):unlinked = unlinked_notes(ROOT)@@ -148,5 +254,103 @@ class DeviceNotesLinkedTest(unittest.TestCase):self.assertEqual([f"{NOTES}/note.md"], unlinked_notes(root))+class NoteFiledWithItsListTest(unittest.TestCase):+ """A note whose model has a list belongs to that list's row, not to the "no tested list yet" index.++ The index's own heading is the rule: a report filed there says its model has no list. When the+ list later lands, the report belongs to the row (the way tcl-50dp660, tcl-beyondtv2-v660 and+ xiaomi-mitv-mosr4 are filed), otherwise the page tells a reader the opposite of what it ships.+ """++ def test_a_note_with_its_own_list_is_not_in_the_no_list_index(self):+ self.assertGreaterEqual(len(index_notes(ROOT)), 20, "the notes index was not read")+ offenders = index_notes_with_their_own_list(ROOT)+ self.assertEqual([], offenders, "\n".join(offenders))++ def test_every_row_links_the_note_of_its_own_folder(self):+ self.assertGreaterEqual(len(table_rows(ROOT)), 200, "the examples table was not read")+ offenders = rows_not_linking_their_note(ROOT)+ self.assertEqual([], offenders, "\n".join(offenders))++ # --- the two checkers, against pages written here, so neither can pass by reading nothing ---++ @staticmethod+ def _tree(tmp):+ root = Path(tmp)+ (root / NOTES).mkdir(parents=True)+ folder = root / "examples" / "sony-x9000h-cn"+ folder.mkdir(parents=True)+ (folder / "debloat.txt").write_text("# a list\n", encoding="utf-8")+ return root++ def test_a_row_that_links_its_note_is_quiet(self):+ with tempfile.TemporaryDirectory() as tmp:+ root = self._tree(tmp)+ (root / NOTES / "sony-x9000h-cn.md").write_text("# Note\n", encoding="utf-8")+ (root / "examples" / "README.md").write_text(+ "| `sony-x9000h-cn/` | Sony BRAVIA X9000H | Android TV 12 | reboot-checked; "+ "[handover notes](../docs/devices/sony-x9000h-cn.md) |\n", encoding="utf-8")+ self.assertEqual([], rows_not_linking_their_note(root))++ def test_a_row_that_does_not_link_its_note_is_reported(self):+ with tempfile.TemporaryDirectory() as tmp:+ root = self._tree(tmp)+ (root / NOTES / "sony-x9000h-cn.md").write_text("# Note\n", encoding="utf-8")+ (root / "examples" / "README.md").write_text(+ "| `sony-x9000h-cn/` | Sony BRAVIA X9000H | Android TV 12 | reboot-checked |\n",+ encoding="utf-8")+ offenders = rows_not_linking_their_note(root)+ self.assertEqual(1, len(offenders))+ self.assertIn("docs/devices/sony-x9000h-cn.md", offenders[0])++ def test_a_note_in_the_index_that_links_its_own_list_is_reported(self):+ with tempfile.TemporaryDirectory() as tmp:+ root = self._tree(tmp)+ (root / NOTES / "sony-x9000h-cn.md").write_text(+ "# Note\n\nA tested package list for this unit lives in "+ "[`examples/sony-x9000h-cn/debloat.txt`](../../examples/sony-x9000h-cn/debloat.txt).\n",+ encoding="utf-8")+ (root / "examples" / "README.md").write_text(+ f"{NOTE_INDEX_HEADING} live in [`docs/devices/`](../docs/devices/):\n\n"+ "- [Sony X9000H](../docs/devices/sony-x9000h-cn.md): a 33-package reboot-checked list.\n",+ encoding="utf-8")+ offenders = index_notes_with_their_own_list(root)+ self.assertEqual(1, len(offenders))+ self.assertIn("examples/sony-x9000h-cn/debloat.txt", offenders[0])++ def test_a_note_that_links_a_siblings_list_is_quiet(self):+ # The usual shape of an index entry: a report with no list of its own that compares itself+ # with another model's list. Only the note's own folder counts.+ with tempfile.TemporaryDirectory() as tmp:+ root = self._tree(tmp)+ (root / NOTES / "strong-leap-s3.md").write_text(+ "# Note\n\nSame firmware family as "+ "[the Wanbo list](../../examples/sony-x9000h-cn/debloat.txt).\n", encoding="utf-8")+ (root / "examples" / "README.md").write_text(+ f"{NOTE_INDEX_HEADING} live in [`docs/devices/`](../docs/devices/):\n\n"+ "- [Strong LEAP-S3](../docs/devices/strong-leap-s3.md): a one-day list kept as a note.\n",+ encoding="utf-8")+ self.assertEqual([], index_notes_with_their_own_list(root))++ def test_a_note_linked_outside_the_index_section_is_not_an_index_entry(self):+ # "Promote this to examples/<folder>/" in prose is not a link either, so a report waiting for+ # its list does not read as one that has it.+ with tempfile.TemporaryDirectory() as tmp:+ root = self._tree(tmp)+ note = root / NOTES / "sony-x9000h-cn.md"+ note.write_text(+ "# Note\n\nPromote this to `examples/sony-x9000h-cn/` once someone has lived with it.\n",+ encoding="utf-8")+ (root / NOTES / "fpd-cg50-c3.md").write_text("# Note\n", encoding="utf-8")+ (root / "examples" / "README.md").write_text(+ f"{NOTE_INDEX_HEADING} live in [`docs/devices/`](../docs/devices/):\n\n"+ "- [FPD CG50-C3](../docs/devices/fpd-cg50-c3.md): a one-day list.\n\n"+ "## Add yours\n\n"+ "- [Sony X9000H](../docs/devices/sony-x9000h-cn.md): a 33-package list.\n",+ encoding="utf-8")+ self.assertEqual(["fpd-cg50-c3.md"], index_notes(root))+ self.assertEqual([], index_notes_with_their_own_list(root))++if __name__ == "__main__":unittest.main()