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
docs: some firmware refuses every pm route, and the TVision Hub has a list
xbsheng5dafe620198b
diff --git a/PROMPT.md b/PROMPT.mdindex a3766df22..1bf3a2134 100644--- a/PROMPT.md+++ b/PROMPT.md@@ -58,6 +58,12 @@ Debloat- Before touching streaming apps, voice assistant, Chromecast, Miracast or the update service, ask mewhich ones I use with a checklist question and disable only what I don't tick.- Run `pm` commands one per shell call, chained commands may silently stop after the first.+- If `pm disable-user` is refused for every package, stop and tell me: some firmware (Fire OS 5 on a+ Fire TV Box, for one) refuses `pm disable-user` with a `SecurityException`, `pm uninstall --user 0`+ with `DELETE_FAILED_INTERNAL_ERROR`, and `pm hide` reports success while changing nothing. Check+ with `pm list packages -d` instead of the exit code, and don't burn the session retrying - there is+ nothing to debloat on such a set, so we fall back to its own privacy toggles and DNS blocking+ (`docs/TROUBLESHOOTING.md`).- Don't launch a package whose name says factory, production, AT or fac menu (`com.cvte.tv.hkcfac`,`com.at.factory.*`, `mediatek.factorymenu.ui` and the like) to see what it does, even read-only:on Haier/CVTE boards opening one flips a factory-mode flag that kills the Input key and CEC, anddiff --git a/README.md b/README.mdindex c9aafb767..4e861edbd 100644--- a/README.md+++ b/README.md@@ -82,7 +82,9 @@ Anything running **Android TV** or **Google TV**. Samsung (Tizen) and LG (webOS)systems; see [SHOWCASE.md](SHOWCASE.md) for a webOS port, and[docs/devices/samsung-tizen.md](docs/devices/samsung-tizen.md) for what a 2021 Samsung set answersover Wi-Fi (no ADB, so no `pm disable-user`) if you are weighing a Tizen port. **Fire TV** takes the-debloat half only, since Fire OS will not hand Home to a third-party launcher. A few China-market TCL+debloat half only, since Fire OS will not hand Home to a third-party launcher - and on the 2015 Fire+TV Box (Fire OS 5) even that half fails: every `pm` route is refused, so nothing can be disabled+there at all. A few China-market TCLsets refuse to install any launcher at all; their lists say so in the header.Tested lists from contributors, one folder per model in [`examples/`](examples/):diff --git a/docs/TROUBLESHOOTING.md b/docs/TROUBLESHOOTING.mdindex b23592a85..d6cf92a5d 100644--- a/docs/TROUBLESHOOTING.md+++ b/docs/TROUBLESHOOTING.md@@ -53,6 +53,18 @@ Things that bit us or contributors, so they don't bite you. Commands use `tools/- **Chained `pm` commands** (`pm disable a; pm disable b`) may silently stop after the first. Runone per shell call; `--batch` does exactly that.- **Large pushes hang** through the Python client. Use `tools/b64push.py` for APKs.+- **Every way of disabling a package is refused**, not just one. On a Fire TV Box 2015 (`sloane`,+ Fire OS 5 / Android 5.1) `pm disable-user --user 0` returns `SecurityException`,+ `pm uninstall --user 0` returns `DELETE_FAILED_INTERNAL_ERROR`, and `pm hide` reports success+ while `pm list packages -d` stays empty ([#577](https://github.com/Gathin23/cleanyourtv/issues/577)).+ Read `pm list packages -d` after each attempt instead of the exit code - `pm hide` is the one that+ lies. When all three refuse, this firmware does not take a debloat list at all: there is no shell+ route around it, sponsored rows stay on the home screen, and the only useful work left is the+ TV's own privacy toggles plus DNS blocking (Pi-hole with a smart-TV ad list; the report used+ Perflyst's `AmazonFireTV` list). Fire OS 6 is the opposite case: `pm disable-user` works and about+ ten Amazon packages are protected, which+ [`examples/amazon-fire-tv-stick-4k-2018/debloat.txt`](../examples/amazon-fire-tv-stick-4k-2018/debloat.txt)+ lists, with the same DNS fallback for their endpoints.- **The Input key and CEC die after the hidden factory menu is opened**, seen on a Haier/CVTE set(Durabrand `DURAT32ISDB`, `dupont`, Android TV 11 build `RTM6.230109.232`,[#470](https://github.com/Gathin23/cleanyourtv/issues/470)). `com.cvte.tv.hkcfac` is thediff --git a/docs/devices/tvision-hub.md b/docs/devices/tvision-hub.mdnew file mode 100644index 000000000..d177c9ddf--- /dev/null+++ b/docs/devices/tvision-hub.md@@ -0,0 +1,66 @@+# TVision Hub (SEI Robotics, S905X2): a one-session report with a working list++Report from [#577](https://github.com/Gathin23/cleanyourtv/issues/577): one session, same-day+results only. That is why the seven packages are recorded here instead of `examples/` -+CONTRIBUTING asks for a few days of living with a list, and nobody has rebooted, stood by or+restored this one yet.++## Identify the device++| Field | Reported value |+|---|---|+| Retail name | TVision Hub (T-Mobile's Google TV dongle) |+| Maker | SEI Robotics |+| SoC | Amlogic S905X2 |+| Android | Google TV, with a T-Mobile operator layer |+| Build fingerprint | not recorded in the report |++The identity line is thin on purpose: the report does not carry `ro.build.fingerprint`,+`ro.product.device` or the Android patch level, so match the packages below against+`dumpsys package` output before applying anything here to another TVision unit, and do not assume+an OTA left them in the same place.++## What the owner disabled++Seven packages, `pm disable-user --user 0`, in the same session:++| Package | What it is |+|---|---|+| `com.nes.tvbugtracker` | bug tracker |+| `com.nes.tv.bugreportsender` | bug-report sender |+| `com.google.android.tvrecommendations` | recommendation rows |+| `com.sei.hitv.explore` | SEI's content browse app |+| `com.google.android.videos` | Play Movies |+| `com.android.camera2` | camera app (the dongle has none) |+| `com.google.android.play.games` | Play Games |++Nothing is uninstalled, so `tools/restore.sh` can put all seven back. The report does not name the+stock Home package: read it before undoing a handover, because `restore.sh` needs it as its+launcher argument on a set whose stock launcher is not `com.google.android.tvlauncher`:++```sh+TV_HOST=<hub ip> tools/venv/bin/python -I tools/tv.py \+ 'cmd package resolve-activity -c android.intent.category.HOME'+```++## Home++The launcher was built, installed and confirmed as Home on this hub, with a clean home screen+afterwards - so the operator layer on this dongle does not block a third-party Home the way some+carrier builds do. The report does not say whether `com.google.android.tungsten.setupwraith` had to+go first (on the onn 4K Pro in the same report it did, and the installer rolled the handover back+until it was disabled), so check the Home owner with `dumpsys activity activities | grep+mFocusedApp` after the takeover instead of trusting the installer's success line.++## Two connection quirks++- **ADB did not connect until the hub was restarted.** Nothing on the host side changed; the same+ `adb connect` worked after the reboot.+- **The first build run hung at the TV-connect step of `launcher/build-and-install.sh`.** An+ `adb disconnect` followed by a re-run finished normally. If the build script stalls on an Amlogic+ dongle, disconnect and reconnect before reading it as a build failure.++## Limits++One session, no reboot or standby cycle, no restore run, no screenshots. Treat the list as a+starting point that has been seen to work once.diff --git a/examples/README.md b/examples/README.mdindex efc67da78..9b53f9b30 100644--- a/examples/README.md+++ b/examples/README.md@@ -162,6 +162,7 @@ Notes for models that have no tested list yet live in [`docs/devices/`](../docs/- [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.- [TCL `75QM751G`](../docs/devices/tcl-75qm751g-qm7.md) (QM7, 2024, `G08`, Android 14 `UTT2.250416.001 AU14`): the QM6K list applies with seven extra packages, setupwraith owns the saved Wi-Fi even on an Ethernet set, and the Cast receiver can be up while it has stopped advertising.+- [TVision Hub](../docs/devices/tvision-hub.md) (SEI Robotics, Amlogic S905X2, T-Mobile's Google TV dongle): one-session report with seven disabled packages and the launcher confirmed as Home; ADB only connected after a restart; no several-day list.To add your TV, see [CONTRIBUTING.md](../CONTRIBUTING.md). The quickest way to get a list is torun the prompt in [PROMPT.md](../PROMPT.md) and copy the packages your assistant disabled.diff --git a/tests/test_issue577_report.py b/tests/test_issue577_report.pynew file mode 100644index 000000000..80d32fe85--- /dev/null+++ b/tests/test_issue577_report.py@@ -0,0 +1,178 @@+"""Where the #577 field report went: the Fire OS limits bullet and the TVision Hub note.++The report covers six devices in one session, and most of it was already documented (the onn 4K Pro+setupwraith handover, Fire OS 6's protected packages). Two things were not: that some firmware+refuses every route to disabling a package, and the one device with a working list and no note.+These tests pin both, plus the pointers that make them findable, and that the note is not a tested+list it has no evidence to be.++Run from the repository root: python3 -m unittest discover -s tests -v+"""+import re+from pathlib import Path+import unittest++ROOT = Path(__file__).resolve().parents[1]+NOTE = ROOT / "docs" / "devices" / "tvision-hub.md"+TROUBLE = ROOT / "docs" / "TROUBLESHOOTING.md"+README = ROOT / "README.md"+EXAMPLES_README = ROOT / "examples" / "README.md"+PROMPT = ROOT / "PROMPT.md"+FIRE_STICK = ROOT / "examples" / "amazon-fire-tv-stick-4k-2018" / "debloat.txt"+ISSUE = "https://github.com/Gathin23/cleanyourtv/issues/577"++PACKAGES = [+ "com.nes.tvbugtracker",+ "com.nes.tv.bugreportsender",+ "com.google.android.tvrecommendations",+ "com.sei.hitv.explore",+ "com.google.android.videos",+ "com.android.camera2",+ "com.google.android.play.games",+]++LINK = re.compile(r"\]\(([^)\s]+)\)")+++def flat(text):+ """Prose wrapped across lines, so match on a single line of it."""+ return re.sub(r"[ \t]*\n[ \t]*", " ", text)+++def section(text, heading):+ """The body of the top-level markdown section `## heading`, up to the next `## `."""+ lines = text.split("\n")+ start = next(i for i, line in enumerate(lines) if line.strip() == "## " + heading)+ out = []+ for line in lines[start + 1:]:+ if line.startswith("## "):+ break+ out.append(line)+ return "\n".join(out)+++def bullet(text, start):+ """The markdown bullet that begins with `start`, up to the next top-level bullet."""+ lines = text.split("\n")+ first = next(i for i, line in enumerate(lines) if line.startswith(start))+ out = [lines[first]]+ for line in lines[first + 1:]:+ if line.startswith("- **") or line.startswith("## "):+ break+ out.append(line)+ return "\n".join(out)+++def broken_links(path):+ return [+ target for target in LINK.findall(path.read_text(encoding="utf-8"))+ if not target.startswith(("http://", "https://", "mailto:", "#"))+ and target.split("#", 1)[0]+ and not (path.parent / target.split("#", 1)[0]).exists()+ ]+++class TvisionHubNoteTest(unittest.TestCase):+ def test_note_exists_and_identifies_the_device(self):+ text = NOTE.read_text(encoding="utf-8")+ self.assertIn("SEI Robotics", text)+ self.assertIn("S905X2", text)+ self.assertIn("T-Mobile", text)+ self.assertIn("Google TV", text)++ def test_note_does_not_invent_a_fingerprint(self):+ """The report carried no build fingerprint, so the note must not pretend to have one."""+ text = NOTE.read_text(encoding="utf-8")+ self.assertIn("not recorded", text)+ self.assertNotRegex(text, r"ro\.build\.fingerprint\s*\|")++ def test_every_disabled_package_is_recorded(self):+ text = NOTE.read_text(encoding="utf-8")+ for package in PACKAGES:+ self.assertIn("`%s`" % package, text)++ def test_note_says_it_is_not_a_tested_list(self):+ text = NOTE.read_text(encoding="utf-8")+ self.assertIn("CONTRIBUTING", text)+ self.assertIn("one session", text.lower())+ self.assertFalse(+ (ROOT / "examples" / "tvision-hub").exists(),+ "an examples/ list would claim several days of use the report does not have",+ )++ def test_home_was_confirmed_and_the_stock_package_was_not_recorded(self):+ text = NOTE.read_text(encoding="utf-8")+ body = section(text, "Home")+ self.assertIn("confirmed as Home", body)+ self.assertIn("mFocusedApp", body)+ self.assertIn("does not name the stock Home package", flat(text))++ def test_both_connection_quirks_are_kept(self):+ text = NOTE.read_text(encoding="utf-8")+ body = section(text, "Two connection quirks")+ self.assertIn("until the hub was restarted", body)+ self.assertIn("adb disconnect", body)++ def test_note_links_resolve(self):+ self.assertEqual(broken_links(NOTE), [])++ def test_note_links_the_issue_it_transcribes(self):+ self.assertIn(ISSUE, NOTE.read_text(encoding="utf-8"))+++class FireOsLimitTest(unittest.TestCase):+ def setUp(self):+ self.text = TROUBLE.read_text(encoding="utf-8")++ def test_bullet_lives_under_working_on_the_tv(self):+ body = section(self.text, "Working on the TV")+ self.assertIn("Every way of disabling a package is refused", body)++ def test_bullet_names_all_three_refusals(self):+ body = bullet(self.text, "- **Every way of disabling a package is refused**")+ self.assertIn("SecurityException", body)+ self.assertIn("DELETE_FAILED_INTERNAL_ERROR", body)+ self.assertIn("`pm hide`", body)+ self.assertIn("pm list packages -d", body)++ def test_bullet_says_pm_hide_is_the_one_that_lies(self):+ body = bullet(self.text, "- **Every way of disabling a package is refused**")+ self.assertIn("lies", body)++ def test_bullet_contrasts_fire_os_6_and_links_its_list(self):+ body = bullet(self.text, "- **Every way of disabling a package is refused**")+ self.assertIn("Fire OS 6", body)+ self.assertIn("examples/amazon-fire-tv-stick-4k-2018/debloat.txt", body)+ self.assertTrue(FIRE_STICK.is_file())++ def test_bullet_gives_the_dns_fallback_and_the_issue(self):+ body = bullet(self.text, "- **Every way of disabling a package is refused**")+ self.assertIn("DNS", body)+ self.assertIn(ISSUE, body)++ def test_bullet_does_not_promise_a_workaround(self):+ body = bullet(self.text, "- **Every way of disabling a package is refused**")+ self.assertNotIn("root the", body)+ self.assertIn("does not take a debloat list at all", body)+++class PointersTest(unittest.TestCase):+ def test_readme_no_longer_promises_a_fire_tv_debloat(self):+ text = flat(README.read_text(encoding="utf-8"))+ self.assertIn("on the 2015 Fire TV Box (Fire OS 5) even that half fails", text)+ self.assertIn("every `pm` route is refused", text)++ def test_examples_readme_lists_the_note(self):+ text = EXAMPLES_README.read_text(encoding="utf-8")+ self.assertIn("docs/devices/tvision-hub.md", text)+ self.assertIn("one-session", text)++ def test_prompt_tells_the_assistant_to_stop_retrying(self):+ text = PROMPT.read_text(encoding="utf-8")+ self.assertIn("refused for every package", text)+ self.assertIn("pm list packages -d", text)+ self.assertIn("docs/TROUBLESHOOTING.md", text)+++if __name__ == "__main__":+ unittest.main()