Skip to content

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

examples: add Philips 55POS9002 OLED (TPM171E, MediaTek MT5891), Android TV 8.0

KorppuJauho0c049b1f1d89
diff --git a/examples/philips-55pos9002/README.md b/examples/philips-55pos9002/README.md
new file mode 100644
index 000000000..7eabc681e
--- /dev/null
+++ b/examples/philips-55pos9002/README.md
@@ -0,0 +1,44 @@
+# Philips 55POS9002/12 (TPM171E, Android TV 8.0)
+
+Notes from one set, on firmware `TPM171E_R.107.001.143.000` (build 4718). The list and its header are in
+[`debloat.txt`](debloat.txt).
+
+## Connecting
+
+USB debugging alone opens ADB on TCP 5555. The "Allow USB debugging?" prompt did not appear at first:
+`tools/tv.py` reached the RSA public-key step of the handshake, but nothing showed on screen. Revoking USB
+debugging authorisations, switching debugging off and on, and pressing Home were not enough. A power cycle at
+the mains (not standby) made the prompt appear, and `tools/tv.py` then connected. This is the same step as on the
+[65PUS8102](../philips-65pus8102/debloat.txt).
+
+## Netflix button
+
+The Netflix button sends scancode 632 (`key 632 NETFLIX` in `/system/usr/keylayout/TPV_MutilRC.kl`), which
+`org.droidtv.GlobalKey` turns into a `NETFLIX_KEY` broadcast. With Netflix disabled the button does nothing.
+`HomeKeyService` does see the key, so an `app_keys` entry by scancode sends it to another app, from Home and from
+inside other apps:
+
+```json
+"app_keys": ["scan:632:org.jellyfin.androidtv"]
+```
+
+Install with `HOME_KEY_SERVICE=1` (`-HomeKeyService` on Windows). `InputKeyService` isn't needed; on this set it
+would also take the Source button away from the Philips source menu, which works on its own. With the helper
+bound, holding volume up still ramped.
+
+## The remote's QWERTY keyboard
+
+The remote has a keyboard on its back. When it is turned over, the TV logs `KEYBOARD SIDE` and scancodes
+246/245 over infrared, and the remote connects as a Bluetooth HID keyboard named `PHLRC`, which uses
+`/system/usr/keylayout/TPV_SMTRC.kl` with a full letter layout. On this set the letter keys sent no events at
+all on that device (`getevent` on its node stayed silent while typing), so nothing typed. That points at the
+remote's pairing, not at the keymaps or the input method. Re-pairing the remote is under Settings > Wireless and
+networks > Remote control. This was not caused by the list: it had stopped working after an earlier firmware
+update.
+
+## A stale accessibility entry
+
+`enabled_accessibility_services` already named
+`org.droidtv.nettvadvert/...AdvertisementImpressionAccessibilityService` before anything was changed, but no
+`org.droidtv.nettvadvert` package is installed on this firmware. The entry does nothing. A launcher key helper
+is added after it in the same setting.
diff --git a/examples/philips-55pos9002/config.json b/examples/philips-55pos9002/config.json
new file mode 100644
index 000000000..8b81bff47
--- /dev/null
+++ b/examples/philips-55pos9002/config.json
@@ -0,0 +1,4 @@
+{
+ "live_tv_package": "org.droidtv.playtv",
+ "hidden_apps": ["org.droidtv.playtv", "org.droidtv.eum"]
+}
diff --git a/examples/philips-55pos9002/debloat.txt b/examples/philips-55pos9002/debloat.txt
new file mode 100644
index 000000000..e020450cf
--- /dev/null
+++ b/examples/philips-55pos9002/debloat.txt
@@ -0,0 +1,71 @@
+# Philips 55POS9002/12 (55" OLED, TP Vision TPM171E, device PH7M_EU_5596), Europe, 2017 model
+# Android TV 8.0.0 (API 26), firmware TPM171E_R.107.001.143.000, security patch 2021-01-05.
+# MediaTek MT5891, armeabi-v7a, 1.9 GB RAM, 1080p UI.
+# Fingerprint: Philips/PH7M_EU_5596/PH7M_EU_5596:8.0.0/OC/4718:user/release-keys
+#
+# Same platform, device and firmware build as examples/philips-65pus8102 and examples/philips-55pus7503;
+# this is the OLED sales model. Packages that are not installed on this set were left out of the list
+# (no nettvapp* web apps, no Gameloft or TED preloads).
+#
+# Apply: TV_HOST=<tv ip> TVINPUT_ALLOW=1 tools/disable.sh examples/philips-55pos9002/debloat.txt
+# Undo: TV_HOST=<tv ip> tools/restore.sh examples/philips-55pos9002/debloat.txt com.google.android.tvlauncher
+# Everything is DISABLED, not uninstalled. Comment out any line you want to keep.
+#
+# TVINPUT_ALLOW=1: without it disable.sh skips org.droidtv.demome and org.droidtv.usagelogger (both ask for
+# TV_INPUT_HARDWARE) and com.google.android.leanbacklauncher.recommendations (its dumpsys has no permission
+# block). None of the three serves an input: `cmd package query-services -a android.media.tv.TvInputService`
+# lists only com.mediatek.tvinput (HDMI, component, tuner, S-video, DVI), com.mediatek.agent and app preview
+# inputs. They were disabled last, after a reboot and a Live TV + HDMI ARC check, and Live TV was checked again.
+# To be careful, apply the list without TVINPUT_ALLOW=1 first, reboot, check your inputs, then run it again
+# with it.
+#
+# Stock launcher: com.google.android.tvlauncher (not in this list; build-and-install.sh disables it
+# after the new Home is running)
+# Live TV app: org.droidtv.playtv
+# Launcher config: config.json in this folder (live_tv_package, hidden_apps).
+#
+# Kept on purpose, do NOT disable: org.droidtv.nettvbrowser (HbbTV red button), org.droidtv.eum (user
+# manual, hidden instead), org.droidtv.playtv, org.droidtv.xtv, org.droidtv.GlobalKey (remote buttons and
+# remote pairing), org.droidtv.settings, org.droidtv.tvsystemui, com.mediatek.tvinput,
+# com.mediatek.tunerservice, com.google.android.katniss (Google Assistant; YouTube's voice search uses it),
+# Chromecast (com.google.android.apps.mediashell), firmware updates (org.droidtv.oad), Ambilight/Hue,
+# Play Store and Play Services, com.google.android.tv.remote.service (phone remote).
+#
+# Verified on the real TV: replacement Home, Live TV from the Inputs menu and back to Home, HDMI ARC sound to a
+# soundbar, the Source, Home, mic and Guide buttons on the real remote. Every package below (and the four
+# commented out at the end) stayed disabled across at least two reboots; none came back by itself.
+# Not checked: HDMI inputs with a source attached, YPbPr.
+
+# Google feedback, tutorials and recommendation rows (same as philips-55pus7503)
+com.google.android.feedback # Market Feedback Agent
+com.google.android.tvtutorials # Android TV first-run tutorials
+com.google.android.tvrecommendations # Android TV recommendations/content rows
+com.google.android.leanbacklauncher.recommendations # needs TVINPUT_ALLOW=1, see header
+
+# Philips promotion and telemetry
+org.droidtv.demome # Retail/store demonstration app; needs TVINPUT_ALLOW=1
+org.droidtv.nettvrecommender # Philips NetTV / Top Picks recommendation row
+org.droidtv.usagelogger # Boot stats, remote keypress counts, panel telemetry; needs TVINPUT_ALLOW=1
+org.droidtv.candeebug # "DAC" analytics uploader
+org.droidtv.gel # "GEL" metrics collector, runs inside the candeebug process
+org.droidtv.tv.frameworklogger # Reboot reasons and firmware-install records to the Philips logger
+tv.inscape.tvclient.inscapeacr # "Inscape" ACR client: identifies what is on screen, HDMI included
+org.droidtv.sticker # Feature promo stickers and banners (StickerActivity, BannerActivity)
+org.droidtv.twittershare # Twitter share sheet (SocialResolverActivity)
+
+# Philips NetTV app store (pre-Android web app platform; Play Store replaces it)
+org.droidtv.nettv.market # NetTV app gallery
+org.droidtv.nettvapps # "NetTvApps" manager
+org.droidtv.nettv_launcherapp # NetTV app launcher entry
+org.droidtv.nettvregistration # Philips account registration for NetTV
+com.opera.sdk.example # Opera TV SDK sample app (leanback entry, no use)
+
+# Preinstalled Google apps whose service is gone or that nobody needs on a TV
+com.google.android.music # Google Play Music (service discontinued)
+com.google.android.play.games # Google Play Games
+
+# Off by choice on this set; uncomment the ones you don't use
+# com.netflix.ninja # Netflix (its remote button can open another app: README.md)
+# com.amazon.amazonvideo.livingroom # Prime Video
+# com.google.android.videos # Google Play Movies & TV
+# org.droidtv.amazonalexa # Alexa
diff --git a/examples/philips-55pos9002/tv.json b/examples/philips-55pos9002/tv.json
new file mode 100644
index 000000000..c3908081e
--- /dev/null
+++ b/examples/philips-55pos9002/tv.json
@@ -0,0 +1,6 @@
+{
+ "tv": "Philips 55POS9002/12 OLED (TP Vision TPM171E, PH7M_EU_5596, MediaTek MT5891), Europe",
+ "os": "Android TV 8.0",
+ "brand": "Philips",
+ "notes": "Same firmware as the 65PUS8102: DAC/GEL analytics, Inscape ACR, NetTV store, promo stickers; three packages need `TVINPUT_ALLOW=1`; Netflix button remapped by scancode 632; RSA prompt needed revoke + mains power cycle"
+}