Skip to content

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

docs: a CVTE board where set-home-activity reports Success and Home stays with Google TV (#1035)

xbsheng252a11bd56f7
diff --git a/docs/TROUBLESHOOTING.md b/docs/TROUBLESHOOTING.md
index 2474d0231..e3a6541c8 100644
--- a/docs/TROUBLESHOOTING.md
+++ b/docs/TROUBLESHOOTING.md
@@ -294,7 +294,13 @@ Things that bit us or contributors, so they don't bite you. Commands use `tools/
tools/tv.py 'dumpsys package <new.launcher.package> | grep -o "[A-Z_]*DIRECT_BOOT_AWARE"'
```
No `FallbackHome` in the first and nothing from the second: keep the stock launcher enabled and set
- Home with `cmd package set-home-activity` only.
+ Home with `cmd package set-home-activity` only. That line is not proof the handover happened: on a set
+ whose stock launcher declares a HOME priority it can print `Success` and change nothing, with the Home
+ role already naming the new launcher while Home still opens the stock one, so read the resolver instead
+ (`tools/tv.py 'cmd package resolve-activity --brief -a android.intent.action.MAIN -c android.intent.category.HOME'`).
+ When it keeps naming the stock launcher, the set is debloat-only until someone runs these two checks on
+ that exact board (Thomson 40FG2S14W, Expressluck `nagata`, Android TV 14 `UKNV.260317.001`,
+ [notes](devices/thomson-40fg2s14w.md)).
- **Stuck on the boot animation after the launcher change, ADB gone** (JVC LT-43N7115, CVTE
`TP.SK706S.PC822`, Android 11, [#741](https://github.com/Gathin23/cleanyourtv/discussions/741)): the stock
launcher `com.cvte.tv.launcher.space` was disabled and a remote-key helper enabled before one reboot.
diff --git a/docs/devices/thomson-40fg2s14w.md b/docs/devices/thomson-40fg2s14w.md
new file mode 100644
index 000000000..fd4110851
--- /dev/null
+++ b/docs/devices/thomson-40fg2s14w.md
@@ -0,0 +1,62 @@
+# Thomson 40FG2S14W (Expressluck `nagata`, CVTE board, Android TV 14): the launcher runs, Home stays with Google TV
+
+One owner-reported ADB session on one unit ([#1035](https://github.com/Gathin23/cleanyourtv/issues/1035)). The
+replacement launcher installed and opened, and its five-app dock and D-pad navigation worked. What did not work
+is Home: on this board Home stays with Google TV for as long as the stock launcher is enabled, which is the
+state the CVTE rule asks for. This is **not a tested debloat list** - six privacy and feedback packages were
+disabled and read back after a reboot, and no several days of use followed - and it is not a tested Home
+profile either.
+
+| Field | Observed value |
+|---|---|
+| Retail model | Thomson `40FG2S14W`, Android's model string `Thomson TV` |
+| Maker / ODM | Expressluck (CVTE board), device `nagata` |
+| System | Android TV 14 (SDK 34) |
+| Firmware | build `UKNV.260317.001` |
+| Stock Home | `com.google.android.apps.tv.launcherx` |
+| CVTE components | `com.cvte.tv.at` present, so the board counts as CVTE for the [rule in PROMPT.md](../../PROMPT.md) even though its stock launcher is Google's |
+
+## Home
+
+- `cmd package set-home-activity --user 0 com.gathin.tvhome/.MainActivity` printed `Success`, and the Home
+ resolver still selected `com.google.android.apps.tv.launcherx`: pressing Home opened Google TV.
+- Disabling `com.google.android.tungsten.setupwraith` on its own did not change that; the resolver still picked
+ `launcherx`. (Before disabling that package on any Google TV set, read
+ `dumpsys wifi | grep -o 'cname=[^ ]*'`: a network saved during first setup belongs to it and goes with it.)
+- The system Home role reported `com.gathin.tvhome` while Home still opened Google TV, so the role holder is not
+ the resolver. What Home does is `cmd package resolve-activity --brief -a android.intent.action.MAIN -c
+ android.intent.category.HOME`, which is also what `tools/disable.sh`'s Home guard reads.
+- The handover itself is not broken on this firmware: `launcher/build-and-install.sh`, which starts the new
+ launcher and disables the stock one, did leave the launcher as the resolved Home. On a CVTE board with no
+ tested profile that stock launcher stays enabled ([the JVC set that hung on its boot animation with ADB
+ gone, #741](../TROUBLESHOOTING.md)), so `setupwraith` and the stock launcher were both re-enabled and Home
+ went back to Google TV.
+- Not tried, and what the next session on this board would need: the `FallbackHome` and direct-boot-aware checks
+ in [TROUBLESHOOTING.md](../TROUBLESHOOTING.md) that decide whether the stock launcher can be disabled without
+ a boot that never finishes, and whether Home survives a reboot afterwards. Until someone runs them on this
+ exact board, treat the set as debloat-only.
+
+## Disabled, and read back after a reboot
+
+`pm disable-user --user 0`, read back after a reboot, nothing uninstalled:
+
+- `tv.anoki.acr.anokiacroptin` - Anoki's automatic content recognition.
+- `com.android.adservices.api`, `com.android.ondevicepersonalization.services`,
+ `com.android.federatedcompute.services` - the Android 14 Privacy Sandbox ad and on-device ML services.
+- `com.google.android.feedback`, `com.android.tv.feedbackconsent` - the bug-report uploader and the TV's consent
+ dialog for it.
+
+## Left enabled on purpose
+
+The owner's streaming apps, the voice assistant, Chromecast, Miracast and the firmware updater. The six packages
+above are the whole change; this note carries no list beyond them.
+
+## What this note does not establish
+
+- One unit, one firmware, one session: no cold boot, no second reboot after the Home attempts, no screenshot,
+ and no HDMI, Live TV, casting, voice or physical-remote check.
+- The Home result belongs to `UKNV.260317.001` on `nagata`. A board whose stock launcher is
+ `com.cvte.tv.launcher.*`, or a later build, can hand Home over differently - and an owner-report on such a set
+ is worth a section here rather than a copy of this paragraph.
+- There is no `examples/` folder for this model: a list needs several days of use first (CONTRIBUTING).
+- ADB was switched off after the session.
diff --git a/examples/README.md b/examples/README.md
index 1d090a8e2..8b43b1b2f 100644
--- a/examples/README.md
+++ b/examples/README.md
@@ -260,6 +260,7 @@ Notes for models that have no tested list yet live in [`docs/devices/`](../docs/
- [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.
- [Master-G 2K Smart TV](../docs/devices/master-g-2k-smart-tv.md) (KTC `jagalchi`, Chile, Google TV 14 `UKN4.250714.046`): a same-day session, not a several-day list; `set-home-activity` prints `Success` but `launcherx` keeps Home, `setupwraith`'s RecoveryActivity takes it next and owns the saved Wi-Fi until the network is re-joined; Android 14 ad/ML services and owner-chosen apps disabled, reboot-checked.
+- [Thomson 40FG2S14W](../docs/devices/thomson-40fg2s14w.md) (Expressluck `nagata`, Android TV 14 `UKNV.260317.001`): six packages, reboot-checked; `com.cvte.tv.at` makes it a CVTE board, so its stock `launcherx` stays enabled and Home never leaves Google TV there - `set-home-activity` prints `Success`, the Home role names the new launcher, and `resolve-activity` still answers `launcherx` - and the note records the check that would have to pass first; debloat only, no tested list.
- [JMGO G9S](../docs/devices/jmgo-g9s.md) (China, `m7642_JmGO_H7A0`, MediaTek m7642, Android TV 9 `1.1.52`): one-session seven-package set, the stock launcher `com.jmgo.launcher` deliberately left out because `com.jmgo.tv` (the HDMI input app) also answers HOME, and the `ro.adb.secure=0` / 5555 shutdown notes; no several-day list yet.
- [Toshiba 55Z500QF (China, Hisense firmware)](../docs/devices/toshiba-55z500qf-cn.md) (`T963D4`, Amlogic `t5m`, Android 11 `RD2A.211001.002`, `07.02.70`, no GMS): no Developer options entry (owner opened it from a sideloaded helper APK), stock JuUI Home at `priority=50` handed over only when disabled as a package, `com.meetingroom` came back after both recorded reboots, the boot-source setting stopped Live TV taking the front; owner-reported removal history only, no tested list.
diff --git a/tests/test_thomson_40fg2s14w_note.py b/tests/test_thomson_40fg2s14w_note.py
new file mode 100644
index 000000000..6539d6bf9
--- /dev/null
+++ b/tests/test_thomson_40fg2s14w_note.py
@@ -0,0 +1,188 @@
+"""The Thomson 40FG2S14W note (#1035) and the CVTE advice it corrects.
+
+The note is documentation only, so the tests pin what makes it useful - the board, the build, the six
+packages, and the fact that the stock launcher stayed enabled - plus the one claim in
+docs/TROUBLESHOOTING.md's CVTE bullet that this session falsifies: `set-home-activity` answering
+`Success` is not proof that Home moved.
+
+They assert identifiers and commands, not sentences, so rewording the prose does not fail them.
+
+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" / "thomson-40fg2s14w.md"
+TROUBLE = ROOT / "docs" / "TROUBLESHOOTING.md"
+EXAMPLES_README = ROOT / "examples" / "README.md"
+DISABLE_SH = ROOT / "tools" / "disable.sh"
+
+LAUNCHER = "com.gathin.tvhome"
+STOCK = "com.google.android.apps.tv.launcherx"
+HOME_QUERY = "cmd package resolve-activity --brief -a android.intent.action.MAIN -c android.intent.category.HOME"
+SET_HOME = f"cmd package set-home-activity --user 0 {LAUNCHER}/.MainActivity"
+
+DISABLED = [
+ "tv.anoki.acr.anokiacroptin",
+ "com.android.adservices.api",
+ "com.android.ondevicepersonalization.services",
+ "com.android.federatedcompute.services",
+ "com.google.android.feedback",
+ "com.android.tv.feedbackconsent",
+]
+
+LINK = re.compile(r"\]\(([^)\s]+)\)")
+
+
+def bullet(text, start):
+ """The markdown bullet that begins with `start`, up to the next top-level bullet or heading."""
+ 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):
+ broken = []
+ for target in LINK.findall(path.read_text(encoding="utf-8")):
+ if target.startswith(("http://", "https://", "mailto:", "#")):
+ continue
+ local = target.split("#", 1)[0]
+ if local and not (path.parent / local).exists():
+ broken.append(target)
+ return broken
+
+
+def note_text():
+ return NOTE.read_text(encoding="utf-8")
+
+
+class ThomsonNoteTest(unittest.TestCase):
+ def test_note_exists_and_names_the_board(self):
+ self.assertTrue(NOTE.is_file(), "docs/devices note missing")
+ text = note_text()
+ for token in ("40FG2S14W", "nagata", "Expressluck", "UKNV.260317.001", "Android TV 14",
+ "34", "com.cvte.tv.at", STOCK, "issues/1035"):
+ with self.subTest(token=token):
+ self.assertIn(token, text)
+
+ def test_every_disabled_package_is_recorded(self):
+ text = note_text()
+ for package in DISABLED:
+ with self.subTest(package=package):
+ self.assertIn(package, text)
+
+ def test_note_keeps_the_stock_launcher_enabled(self):
+ # The whole point: the handover is not kept, because a CVTE board without a tested profile
+ # keeps its stock launcher (the #741 boot hang). A note that told readers to disable it would
+ # be the opposite advice.
+ text = note_text()
+ self.assertIn(SET_HOME, text)
+ self.assertIn("Success", text)
+ self.assertIn("741", text)
+ self.assertIsNone(re.search(r"pm disable-user[^\n]*" + re.escape(STOCK), text),
+ "the note must not disable the stock launcher")
+
+ def test_note_reads_the_resolver(self):
+ # The check, not the sentence around it: the note has to send a reader to resolve-activity,
+ # because that is the query the Home guard reads and the one that disagreed on this board.
+ self.assertIn("resolve-activity", note_text())
+
+ def test_note_is_not_an_examples_list(self):
+ # A one-session report stays a device note; an examples/ folder needs several days of use.
+ self.assertFalse(list((ROOT / "examples").glob("thomson-40fg2s14w")),
+ "a one-session report does not belong in examples/")
+ self.assertTrue(NOTE.is_file())
+
+ def test_note_links_resolve(self):
+ self.assertEqual(broken_links(NOTE), [])
+
+
+class TroubleshootingCvteBulletTest(unittest.TestCase):
+ def setUp(self):
+ self.text = TROUBLE.read_text(encoding="utf-8")
+ self.cvte = bullet(self.text, "- **Black screen at every boot after the launcher change")
+
+ def test_the_fallback_home_check_is_still_there(self):
+ # The caveat is added under an existing recipe; the recipe itself must not be dropped.
+ self.assertIn("FallbackHome", self.cvte)
+ self.assertIn("DIRECT_BOOT_AWARE", self.cvte)
+ self.assertIn("set-home-activity", self.cvte)
+
+ def test_success_is_no_longer_presented_as_proof(self):
+ for token in ("Success", "resolve-activity", "40FG2S14W"):
+ with self.subTest(token=token):
+ self.assertIn(token, self.cvte)
+
+ def test_the_resolver_command_matches_the_tools(self):
+ # Read the query out of disable.sh instead of trusting a copy: the guard and the docs have to
+ # ask the same question to get the same answer.
+ src = DISABLE_SH.read_text(encoding="utf-8")
+ match = re.search(r"HOME_QUERY='([^']+)'", src)
+ self.assertIsNotNone(match, "tools/disable.sh no longer defines HOME_QUERY")
+ query = match.group(1).strip()
+ self.assertEqual(query, HOME_QUERY, "disable.sh's Home query changed")
+ self.assertIn(query, self.cvte)
+
+ def test_the_bullet_points_at_the_note(self):
+ self.assertIn("devices/thomson-40fg2s14w.md", self.cvte)
+ self.assertEqual(broken_links(TROUBLE), [])
+
+
+class IndexTest(unittest.TestCase):
+ def test_examples_readme_indexes_the_note(self):
+ text = EXAMPLES_README.read_text(encoding="utf-8")
+ section = text.split("Notes for models that have no tested list yet", 1)[1]
+ self.assertIn("docs/devices/thomson-40fg2s14w.md", section)
+ self.assertIn("40FG2S14W", section)
+
+ def test_examples_readme_links_resolve(self):
+ self.assertEqual(broken_links(EXAMPLES_README), [])
+
+
+class CheckerTest(unittest.TestCase):
+ """The readers above must report a real problem, not pass by reading nothing."""
+
+ PAGE = ("- **One** first bullet\n"
+ " continued here\n"
+ " and here\n"
+ "- **Two** second bullet\n"
+ "## Section\n"
+ "- **Three** third bullet\n")
+
+ def test_bullet_keeps_its_continuation_lines(self):
+ self.assertEqual(bullet(self.PAGE, "- **One**"),
+ "- **One** first bullet\n continued here\n and here")
+
+ def test_bullet_stops_at_a_heading(self):
+ self.assertNotIn("Three", bullet(self.PAGE, "- **Two**"))
+
+ def test_bullet_raises_on_a_missing_bullet(self):
+ with self.assertRaises(StopIteration):
+ bullet(self.PAGE, "- **Missing**")
+
+ def test_broken_links_reports_a_missing_target(self):
+ page = ROOT / "tests" / "_link_probe.md"
+ page.write_text("[gone](no-such-file.md)\n", encoding="utf-8")
+ try:
+ self.assertEqual(broken_links(page), ["no-such-file.md"])
+ finally:
+ page.unlink()
+
+ def test_broken_links_ignores_external_and_anchors(self):
+ page = ROOT / "tests" / "_link_probe.md"
+ page.write_text("[a](https://example.com/x.md)\n[b](#some-heading)\n", encoding="utf-8")
+ try:
+ self.assertEqual(broken_links(page), [])
+ finally:
+ page.unlink()
+
+
+if __name__ == "__main__":
+ unittest.main()