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
Merge PR #366: examples: Freebox Player POP (fbx8am, Android TV 10)
Gathin234b5f3c1f06e0
diff --cc README.mdindex c8a60496f,b720026a7..984509528--- a/README.md+++ b/README.md@@@ -159,7 -138,7 +159,8 @@@ SANYO · Thomson · Toshiba Fire TV ·| CHiQ AI PONT (Changhong GTVU65, dangni, MediaTek mt5867) | Google TV 14 || CHiQ AI PONT (DVB93CQ) | Android TV 11 || Chromecast with Google TV 4K (sabrina) | Google TV 14 |+| FFalcon (雷鸟) 鹤6 PRO 65S585C Pro (China, tcl_mt5879_cn, MediaTek MT9653) | Android TV 11 |+ | Freebox Player POP (Free, fbx8am, Amlogic), IPTV/DVB-T box | Android TV 10 || Haier Android TV DVB2K (broadway, HaierATVT56DVB) | Android TV 11 || Haier H32S80EFX (MatrixTV CE, HRT56EU, deto, MediaTek), Thailand | Google TV 14 || Hisense HG9 (HiSmart 4K A4FFM) | Android TV 9 |diff --cc examples/README.mdindex ef12b8eff,c73300da5..820b2bdc9--- a/examples/README.md+++ b/examples/README.md@@@ -13,7 -11,7 +13,8 @@@ on that firmware, grouped and commented| `benq-e55-750/` | BenQ E55-750 (Changhong AI PONT, DVB96BQ) | Google TV (Android 11) | Homwee store/help, Google TV recommendations and ambient mode; no ACR on this firmware; setupwraith, screensaver handover || `chiq-gtvu65/` | CHiQ AI PONT (Changhong GTVU65, dangni, MediaTek mt5867) | Google TV 14 | Google ad services and auto-installs, Homwee store/help; 1 GB; setupwraith must go (RecoveryActivity component cannot be disabled alone); MediaTek partnercustomizer safe to disable (reboot-checked) || `chiq-ai-pont/` | CHiQ AI PONT (DVB93CQ) | Android TV 11 | Anoki ACR, FAST channels, AI PONT, Homwee services |+| `ffalcon-65s585c-pro/` | FFalcon (雷鸟) 鹤6 PRO 65S585C Pro (China, tcl_mt5879_cn, MediaTek MT9653) | Android TV 11 | Same platform and firmware build as tcl-q10g-pro; TCL boot ad, analytics, push, home recommendation cards and silent-install channels stay disabled across a reboot; OTA, account, voice, weather, album, WeChat and video call off by choice; debloat only, no third-party launcher or sideloading; reboot-checked |+ | `freebox-player-pop/` | Freebox Player POP (Free, fbx8am, Amlogic), IPTV/DVB-T box | Android TV 10 | Free stats, Google feedback and recommendations, partner auto-installs, NES/CTC factory tests; French catch-up, kids and Free apps off by choice, Arte/Spotify/Stremio kept; OQEE is the stock home (HOME priority 3); Chromecast must stay for Spotify Connect; AdGuard DNS blocks pixel.spotify.com and breaks Spotify; 2 GB || `google-chromecast-gtv-4k/` | Chromecast with Google TV 4K (sabrina) | Google TV 14 | Google telemetry and ad services, ambient mode, launcherx + setupwraith; wireless-debugging pairing, YouTube button remap || `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 |diff --cc examples/freebox-player-pop/README.mdindex 000000000,5d33749b9..62b87754cmode 000000,100644..100644--- a/examples/freebox-player-pop/README.md+++ b/examples/freebox-player-pop/README.md@@@ -1,0 -1,89 +1,88 @@@+ # Freebox Player POP++ Free's Android TV 10 box (`fbx8am`, Amlogic, 2 GB RAM, build `QTT8.201201.002.v10.5.66`), debloated and+ running this repo's launcher in place of OQEE. Everything is disabled, nothing is uninstalled.+ `debloat.txt` lists each package and why it went.++ All commands run from the repo root, with the Player's IP in `TV_HOST` (Paramètres > Réseau et+ Internet shows it). ADB has to be on for any of them: Developer options >+ USB debugging, then accept the prompt on the TV.++ ## Install, from scratch or again++ ```bash+ TV_HOST=<player-ip> tools/disable.sh examples/freebox-player-pop/debloat.txt+ TV_HOST=<player-ip> STOCK_LAUNCHER=net.oqee.launcher launcher/build-and-install.sh+ ```++ `build-and-install.sh` builds the launcher, starts it, and only then disables OQEE and makes it the+ Home screen. It needs JDK 17 and the Android SDK (`brew install openjdk@17` and+ `brew install --cask android-commandlinetools`). On macOS, make the venv with a uv-managed Python: the+ Command Line Tools Python is blocked by Local Network privacy ("No route to host"). See the header of+ `debloat.txt`.++ ## Undo everything++ ```bash-TV_HOST=<player-ip> examples/freebox-player-pop/restore.sh++TV_HOST=<player-ip> tools/restore.sh examples/freebox-player-pop/debloat.txt net.oqee.launcher+ ```+-It re-enables every package from the list, gives Home back to OQEE, and puts Private DNS back to-automatic. It replays the state recorded before the first change (`~/.cleanyourtv/recovery-*.json`, so++It re-enables the packages from the list and gives Home back to OQEE. It replays the state recorded before the first change (`~/.cleanyourtv/recovery-*.json`, so+ keep that file).++ ## Re-enable one app++ ```bash+ TV_HOST=<player-ip> tools/venv/bin/python -I tools/tv.py 'pm enable com.google.android.youtube.tv'+ ```++ Then comment its line out in `debloat.txt`, so a later run of the list doesn't disable it again. To+ disable another app: `pm disable-user --user 0 <package>`. Without a computer: Paramètres > Applications >+ Afficher toutes les applications > the app > Activer.++ ## Change the dock or its order++ Edit `dock_apps` in `launcher/app/src/main/res/values/config.xml` and run+ `launcher/build-and-install.sh` again. OQEE, the Live TV app, is `net.oqee.androidtv`; set it as+ `live_tv_package` too. No rebuild is needed if you use a theme instead: put+ `"dock_apps": [...]` in a theme's `config.json` and push it with `tools/theme.sh`. You can also reorder+ from the TV: hold OK on the Paramètres pill.++ ## Change the wallpaper++ Copy a theme, drop a dark 1920×1080 `wallpaper.jpg` into it, and push it:++ ```bash+ cp -r themes/aurora themes/mine # then replace themes/mine/wallpaper.jpg+ TV_HOST=<player-ip> tools/theme.sh themes/mine+ TV_HOST=<player-ip> tools/theme.sh --reset # back to plain black+ ```++ `themes/README.md` lists every key a theme can set.++ ## Ad-blocking DNS (off, on purpose)++ AdGuard's public DNS blocks `pixel.spotify.com`, which the Spotify TV app needs to start, and that broke+ the Spotify login. Android's Private DNS takes one server for the whole box, with no per-app exceptions.+ For ad blocking with Spotify, create a free personal profile at NextDNS or AdGuard DNS, allowlist+ `pixel.spotify.com`, then:++ ```bash+ TV_HOST=<player-ip> tools/venv/bin/python -I tools/tv.py 'settings put global private_dns_specifier <your-id>.dns.nextdns.io'+ TV_HOST=<player-ip> tools/venv/bin/python -I tools/tv.py 'settings put global private_dns_mode hostname'+ ```++ To undo: `settings put global private_dns_mode opportunistic`. It doesn't block YouTube ads. If Spotify+ then shows "Vérifiez votre connexion réseau", switch DNS back and log in to Spotify again.++ ## When you're done: close ADB++ Port 5555 is plaintext. On the TV: Developer options > Revoke USB debugging authorisations, then+ turn USB debugging off. Check from the Mac that this fails:++ ```bash+ nc -vz <player-ip> 5555+ ```++ Also: a Freebox system update that re-enables packages means running `tools/disable.sh` on the list+ again.diff --cc examples/freebox-player-pop/debloat.txtindex 000000000,fad141544..977f9f7demode 000000,100644..100644--- a/examples/freebox-player-pop/debloat.txt+++ b/examples/freebox-player-pop/debloat.txt@@@ -1,0 -1,94 +1,95 @@@+ # Freebox Player POP (Free, France; codename fbx8am, Amlogic, 2 GB RAM), Android TV 10 (API 29)+ # Tested on build QTT8.201201.002.v10.5.66.+ #+ # Apply: TV_HOST=<player ip> tools/disable.sh examples/freebox-player-pop/debloat.txt+ # Undo: TV_HOST=<player ip> tools/restore.sh examples/freebox-player-pop/debloat.txt net.oqee.launcher+ # Everything is DISABLED, not uninstalled. Comment out any line you want to keep.+ #+ # Connecting: Settings > Device Preferences > About > Build x7, then Developer options > USB debugging.+ # Port 5555 opens with that alone (no separate Network debugging switch). ro.adb.secure=1, so each+ # computer still has to be accepted on screen. macOS: the Command Line Tools Python is blocked by Local+ # Network privacy ("No route to host" while nc reaches the port); a uv-managed Python works:+ # uv venv --python 3.12 --managed-python tools/venv && uv pip install --python tools/venv/bin/python -r tools/requirements.txt+ #+ # Sideloading works. A test reinstall of a Play-installed app answered INSTALL_FAILED_VERIFICATION_FAILURE,+ # but logcat showed Play Protect blocking it for "missing splits" (base.apk pushed without its splits),+ # not a firmware gate; a normal single APK installs fine.+ #+ # Launcher: the stock home is OQEE (net.oqee.launcher, HOME priority 3). com.stremio.tv.boot also claims+ # HOME (priority 0) when Stremio is installed. Run launcher/build-and-install.sh with-# STOCK_LAUNCHER=net.oqee.launcher, or disable the last line here after the new launcher is set.++# STOCK_LAUNCHER=net.oqee.launcher; it disables OQEE after the swap.+ # setupwraith is not a HOME candidate here, but it owns a Wi-Fi network saved during first setup:+ # leave it enabled.+ # The Player has no HDMI input. Its TV inputs are the DVB-T tuner (org.dtvkit.inputsource, HW19,+ # fronted by fr.freebox.fbxdtvkit) and IPTV through OQEE (net.oqee.androidtv), which is the Live TV app.+ # The tuner reports itself as a hardware passthrough input, so the launcher's Inputs menu lists it next+ # to Live TV, and picking it sends a channel URI nothing answers ("not available"). Use the Live TV row+ # (live_tv_package net.oqee.androidtv), or put OQEE in the dock.+ # Location is off on the tested unit (location_mode=0), so the network pill reads "Wi-Fi", not the SSID.+ #+ # Spotify: keep Chromecast built-in (com.google.android.apps.mediashell). Spotify Connect from a phone+ # starts the TV app through it, even when Spotify is not on screen.+ # Ad-blocking DNS breaks Spotify here. dns.adguard-dns.com answers 0.0.0.0 for pixel.spotify.com, and+ # the TV app then stops at "Vérifiez votre connexion réseau". Worse, a session refreshed while it was+ # blocked stayed broken after the DNS went back: the app logged "invalid access token" until+ # `pm clear com.spotify.tv.android` and a new login. With Spotify, use a personal NextDNS / AdGuard+ # DNS profile that allowlists pixel.spotify.com, or no ad-blocking DNS at all.+ # Standby is not a reboot (uptime keeps counting), and ADB stays reachable through it.+ #+ # Leave alone: net.oqee.androidtv (TV), org.dtvkit.inputsource, fr.freebox.fbxdtvkit,+ # com.nes.dtvkitdatabackup (channel database), com.nes.blerc (Bluetooth remote),+ # fr.freebox.bleirlearner (remote's IR learning for the TV's power/volume), com.nes.tvglobalkeyhandler+ # (remote keys), com.nes.freeboxburnkey (key provisioning), fr.freebox.fbx8am.externalauth,+ # fr.freebox.fbxservices and fr.freebox.fbx8lc.canalsubscriptionservice (Free billing for partner apps),+ # fr.freebox.fbx8lc.fbxcustomization, fr.freebox.fbxshortcutsettings, com.droidlogic.* system services,+ # com.google.android.tungsten.setupwraith, Play Store / Services, the keyboard.++ # Telemetry and log collection+ fr.freebox.fbxstats # Free usage statistics (system uid, boot receiver)+ com.google.android.feedback # Google feedback reports+ com.google.android.tv.bugreportsender # bug report uploader+ com.droidlogic.readlog # Amlogic log dumper to USB storage++ # Ads, recommendations and partner auto-installs+ com.google.android.tvrecommendations # recommendation rows+ android.autoinstalls.config.sei # auto-installs partner apps++ # Factory and test leftovers+ com.nes.dvb.playtest # DVB playback factory test+ com.ctc # "MediaProcessorDemoActivity"+ com.utsmta.app # factory test triggered by USB+ com.android.camera2 # no camera on the Player+ com.android.printspooler # printing++ # Voice and casting (owner's choice; re-enable if you use them)+ com.google.android.katniss # Google Assistant / voice search+ # com.google.android.apps.mediashell # Chromecast built-in: KEEP. Spotify Connect from a phone wakes Spotify through it++ # Streaming apps the owner does not use (comment out the ones you watch)+ fr.tf1.mytf1.free # TF1++ fr.m6.m6replay.free # M6++ fr.francetv.pluzz # france.tv+ com.google.android.youtube.tv # YouTube+ com.google.android.youtube.tvmusic # YouTube Music+ com.canal.android.canal # Canal++ com.disney.disneyplus # Disney++ fr.freebox.disneypluslauncher # Free's Disney+ shortcut+ com.nextinteractive.rmcbfmplay.tv.free # RMC BFM Play+ org.videolan.vlc # VLC+ # Already disabled on the unit this list came from: com.netflix.ninja,+ # com.amazon.amazonvideo.livingroom, com.apple.atve.androidtv.appletv+ # Kept by choice: tv.arte.plus7, com.spotify.tv.android, com.stremio.one, com.stremio.tv.boot,+ # fr.freebox.fbx8lc.fbxdiags (Free's diagnostics app), firmware updates+ # (fr.freebox.fbx8lc.fbxupdater) and remote firmware updates (com.nes.remoteota.one/three).++ # Preloaded extras (owner's choice)+ fr.free.aktu # Free Aktu news+ fr.francetv.zouzous # Okoo (france.tv kids)+ fr.tfou.max # TFOU Max (TF1 kids)+ com.google.android.videos # Google TV / Play Movies+ com.google.android.play.games # Play Games+ com.tcl.browser # TCL Browser (preinstalled as a user app)+-# Stock launcher: disable LAST, after the new launcher is installed and set as Home-net.oqee.launcher # OQEE home screen++# Stock launcher: left enabled here. Disabling it before the new launcher is Home leaves the box with++# none; STOCK_LAUNCHER=net.oqee.launcher makes build-and-install.sh disable it after the swap.++# net.oqee.launcher # OQEE home screen