Skip to content

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

examples: trim the OPPO K9 note so the list stands alone

Cursor Agent323945886c88
diff --git a/docs/devices/oppo-k9-55-oppocnm632.md b/docs/devices/oppo-k9-55-oppocnm632.md
index d5fdb87d8..66f4c12e5 100644
--- a/docs/devices/oppo-k9-55-oppocnm632.md
+++ b/docs/devices/oppo-k9-55-oppocnm632.md
@@ -7,9 +7,10 @@ The package lists for this unit live in
and
[`examples/oppo-k9-55-oppocnm632/debloat-extra.txt`](../../examples/oppo-k9-55-oppocnm632/debloat-extra.txt).
-The allowlist and the boot category were first written up for a K9 65 (`OPPOCNM652`, ColorOS TV
-2.4) in [aerial-tv's device note](https://github.com/pengchujin/aerial-tv/blob/master/docs/devices/oppo-coloros-tv.md).
-The checks below are this 55" set, with this launcher.
+The allowlist was first written up for a K9 65 (`OPPOCNM652`, ColorOS TV 2.4) in
+[aerial-tv's device note](https://github.com/pengchujin/aerial-tv/blob/master/docs/devices/oppo-coloros-tv.md).
+The checks below are this 55" set. How to build a launcher that ColorOS will boot is in the
+launcher follow-up and in `docs/TROUBLESHOOTING.md` once that change lands.
## The three allowlisted package ids
@@ -21,63 +22,29 @@ ColorOS accepts a HOME install only for three package names:
| `com.oneplus.tv.launcher2` | The identity that installed and became Home here |
| `com.oppo.tv.launcher2` | Also allowlisted. Not the identity used on this set |
-`pm path com.heytap.tv.launcher` already answers: that name is the system launcher. A build with
-`-PlauncherApplicationId=com.heytap.tv.launcher` would be an attempt to replace it. Stop if
-`pm path com.oneplus.tv.launcher2` (or `com.oppo.tv.launcher2`, if you have to use that one)
-already names some other application.
+`pm path com.heytap.tv.launcher` already answers: that name is the system launcher. Do not build
+over it. Stop if `pm path com.oneplus.tv.launcher2` (or `com.oppo.tv.launcher2`, if you have to use
+that one) already names some other application.
The default `com.gathin.tvhome` build was blocked as a HOME install on this set. The same refusal
is quoted on the K9 65 note as
`INSTALL_FAILED_DUPLICATE_PERMISSION: App installation is banned, because of launcher categories`.
-## Build with the opt-in identity
-
-`MainActivity`'s HOME filter declares `com.heytap.tv.launcher.category.MODERN_HOME`. ColorOS boot
-only promotes a HOME that carries that category; the K9 65 note sat on the brand animation until
-it was added. The Java namespace stays `com.gathin.tvhome`.
-
Do not run `launcher/build-and-install.sh` here. It always builds and installs `com.gathin.tvhome`,
-then points Home at `com.gathin.tvhome/.MainActivity`. `com.heytap.tv.launcher` is deliberately
-absent from that script's `KNOWN_STOCK_LAUNCHERS`: naming it as `STOCK_LAUNCHER` would disable the
-stock home. Install by hand, and leave the stock package enabled.
-
-From the repository root:
-
-```bash
-export TV_HOST=192.168.1.50
-PY=tools/venv/bin/python
-"$PY" -I tools/tv.py 'pm path com.oneplus.tv.launcher2'
-"$PY" -I tools/tv.py 'pm path com.heytap.tv.launcher'
-"$PY" -I tools/tv.py 'cmd package resolve-activity --brief -a android.intent.action.MAIN -c android.intent.category.HOME'
-(cd launcher && ./gradlew assembleRelease -PlauncherApplicationId=com.oneplus.tv.launcher2)
-"$PY" -I tools/b64push.py launcher/app/build/outputs/apk/release/app-release.apk /data/local/tmp/tvhome-allowlist.apk
-"$PY" -I tools/tv.py 'pm install -r /data/local/tmp/tvhome-allowlist.apk; rm -f /data/local/tmp/tvhome-allowlist.apk'
-"$PY" -I tools/tv.py 'am start -W -n com.oneplus.tv.launcher2/com.gathin.tvhome.MainActivity'
-```
-
-After the new screen is up, select it as Home and read the resolution back:
-
-```bash
-"$PY" -I tools/tv.py 'cmd package set-home-activity --user 0 com.oneplus.tv.launcher2/com.gathin.tvhome.MainActivity'
-"$PY" -I tools/tv.py 'cmd package resolve-activity --brief -a android.intent.action.MAIN -c android.intent.category.HOME'
-```
-
-The component is `com.oneplus.tv.launcher2/com.gathin.tvhome.MainActivity`.
-`com.oneplus.tv.launcher2/.MainActivity` is the wrong class. `tools/theme.sh` still writes to
-`com.gathin.tvhome`; a theme file for this build belongs in
-`/sdcard/Android/data/com.oneplus.tv.launcher2/files/config.json`.
+then points Home at `com.gathin.tvhome/.MainActivity`. Naming `com.heytap.tv.launcher` as
+`STOCK_LAUNCHER` would disable the stock home. Leave that package enabled.
## What this set confirmed
Install reported Success for versionName 3.0 / versionCode 9, signed with the debug keystore.
-`cmd package set-home-activity` was set to
-`com.oneplus.tv.launcher2/com.gathin.tvhome.MainActivity`. `com.heytap.tv.launcher` stayed
-enabled. The owner confirmed the home screen. Android 9 is API 28, above the launcher's minSdk 26.
-
-The K9 65 note disabled its stock desktop after declaring the same category and still booted.
-That was a different size, a different product code and a different launcher. This set did not
-disable `com.heytap.tv.launcher`, and this list does not either. Several-day use, a cold boot
-with the stock home disabled, and OTA persistence were not part of the check.
+Home was set to `com.oneplus.tv.launcher2/com.gathin.tvhome.MainActivity`. `com.heytap.tv.launcher`
+stayed enabled. The owner confirmed the home screen. Android 9 is API 28, above the launcher's
+minSdk 26.
+
+The K9 65 note disabled its stock desktop and still booted. That was a different size, a different
+product code and a different launcher. This set did not disable `com.heytap.tv.launcher`, and this
+list does not either. Several-day use, a cold boot with the stock home disabled, and OTA
+persistence were not part of the check.
## Undo
diff --git a/examples/README.md b/examples/README.md
index c86915a39..fd48e920d 100644
--- a/examples/README.md
+++ b/examples/README.md
@@ -342,6 +342,8 @@ on that firmware, grouped and commented. These are starting points: comment out
<!-- tv-table:end -->
+[OPPO K9 55 (OPPOCNM632)](../docs/devices/oppo-k9-55-oppocnm632.md): ColorOS Home allowlist; stock home stays enabled.
+
Notes for models that have no tested list yet live in [`docs/devices/`](../docs/devices/):
- [Homatics Box R 4K Plus](../docs/devices/homatics-box-r-4k-plus.md), `SEI804HM` / `YYJ`, Android TV 14 build `8963`: paired encrypted ADB from a wired computer, standard Home handover, theme and physical-remote checks, package state retained after cold boot, and closing both debugging modes; single-session observations, no several-day debloat list.
diff --git a/examples/oppo-k9-55-oppocnm632/debloat.txt b/examples/oppo-k9-55-oppocnm632/debloat.txt
index 69b56e7d3..e65aebf60 100644
--- a/examples/oppo-k9-55-oppocnm632/debloat.txt
+++ b/examples/oppo-k9-55-oppocnm632/debloat.txt
@@ -9,9 +9,7 @@
#
# Keep com.heytap.tv.launcher enabled. It is the stock home. Do not build the launcher over
# that package name, and do not pass it as STOCK_LAUNCHER: build-and-install.sh would disable
-# it, and the default com.gathin.tvhome id is refused as a HOME install. The working build is
-# -PlauncherApplicationId=com.oneplus.tv.launcher2, installed by hand (device note).
-# Keep com.android.tv.settings enabled.
+# it. Keep com.android.tv.settings enabled.
#
# On this unit the alternate-id launcher installed, set-home-activity succeeded, the stock
# home stayed enabled and the owner confirmed the screen. The packages below are the debloat
diff --git a/examples/oppo-k9-55-oppocnm632/tv.json b/examples/oppo-k9-55-oppocnm632/tv.json
index 1ec20ab98..2ec15b794 100644
--- a/examples/oppo-k9-55-oppocnm632/tv.json
+++ b/examples/oppo-k9-55-oppocnm632/tv.json
@@ -2,5 +2,5 @@
"tv": "OPPO K9 55 (OPPOCNM632)",
"os": "Android 9 (ColorOS TV)",
"brand": "OPPO",
- "notes": "HeyTap cast and paid screen-share, ads, pictorial, push, telemetry, crash upload and factory menus; optional extra list turns off gallery, weather, voice, karaoke and similar by choice; stock home `com.heytap.tv.launcher` stays enabled; build with `-PlauncherApplicationId=com.oneplus.tv.launcher2` ([device note](../docs/devices/oppo-k9-55-oppocnm632.md))"
+ "notes": "HeyTap cast and paid screen-share, ads, pictorial, push, telemetry, crash upload and factory menus; optional extra list turns off gallery, weather, voice, karaoke and similar by choice; stock home `com.heytap.tv.launcher` stays enabled ([device note](../docs/devices/oppo-k9-55-oppocnm632.md))"
}
diff --git a/tests/test_oppo_k9_coloros.py b/tests/test_oppo_k9_coloros.py
new file mode 100644
index 000000000..f1a733a8f
--- /dev/null
+++ b/tests/test_oppo_k9_coloros.py
@@ -0,0 +1,55 @@
+"""OPPO K9 55 (OPPOCNM632) list and device note.
+
+ColorOS accepts a HOME install only for three package names. This list leaves the stock home
+`com.heytap.tv.launcher` enabled. The device note names that allowlist and warns not to run
+`launcher/build-and-install.sh`. Launcher manifest and troubleshooting checks live with the
+launcher change.
+
+Run from the repository root: python3 -m unittest tests.test_oppo_k9_coloros -v
+"""
+import json
+import unittest
+from pathlib import Path
+
+
+ROOT = Path(__file__).resolve().parents[1]
+NOTE = ROOT / "docs" / "devices" / "oppo-k9-55-oppocnm632.md"
+LIST = ROOT / "examples" / "oppo-k9-55-oppocnm632" / "debloat.txt"
+EXTRA = ROOT / "examples" / "oppo-k9-55-oppocnm632" / "debloat-extra.txt"
+TV_JSON = ROOT / "examples" / "oppo-k9-55-oppocnm632" / "tv.json"
+INDEX = ROOT / "examples" / "README.md"
+
+STOCK = "com.heytap.tv.launcher"
+ALLOWLIST = (STOCK, "com.oneplus.tv.launcher2", "com.oppo.tv.launcher2")
+NOTE_LINK = "../docs/devices/oppo-k9-55-oppocnm632.md"
+
+
+def active_packages(path):
+ packages = []
+ for line in path.read_text(encoding="utf-8").splitlines():
+ body = line.split("#", 1)[0].strip()
+ if body:
+ packages.append(body)
+ return packages
+
+
+class OppoK9ColorOsTest(unittest.TestCase):
+ def test_the_note_names_the_allowlist(self):
+ text = NOTE.read_text(encoding="utf-8")
+ for package in ALLOWLIST:
+ self.assertIn(package, text)
+ self.assertIn("examples/oppo-k9-55-oppocnm632/debloat.txt", text)
+ self.assertIn("do not build over it", text.lower())
+ self.assertIn("do not run `launcher/build-and-install.sh`", text.lower())
+
+ def test_the_stock_home_is_not_disabled(self):
+ self.assertNotIn(STOCK, active_packages(LIST))
+ self.assertNotIn(STOCK, active_packages(EXTRA))
+
+ def test_the_row_links_the_note(self):
+ notes = json.loads(TV_JSON.read_text(encoding="utf-8"))["notes"]
+ self.assertIn(NOTE_LINK, notes)
+
+ def test_the_examples_index_links_the_note(self):
+ # tv.json is not a markdown page. test_docs_pages_reachable only counts a markdown link.
+ self.assertIn(f"]({NOTE_LINK})", INDEX.read_text(encoding="utf-8"))