Skip to content
wingedpantherPublic

About

Desktop companion and MORE for TV: debloat an Android TV, install the clean launcher and customise it.

Topics

Resources

Stars

127 stars

Watchers

0 watching

Forks

Repository files navigation

CleanMyTV

A Mac and Windows app for cleanyourtv by @gathint. It debloats an Android TV with the cleanyourtv lists, installs its own launcher, CleanMyTV Home, and lets you set it up from your computer. You don't need Python, Java, Android Studio or adb.

New to this? The user guide walks every step at TV-owner pace, including rollback and troubleshooting, and the known-devices table shows what the bundled lists cover per model. This README is the technical overview.

Questions, help and home-screen setups: join the CleanMyTV Discord. Bugs and feature requests go to GitHub issues.

This is an independent project, not part of cleanyourtv. The per-TV debloat lists come from upstream unchanged. The launcher is CleanMyTV Home, built from home/ in this repository. Earlier versions installed the CleanYourTV launcher (com.gathin.tvhome); 0.2.0 no longer does. Tested on a Xiaomi Mi Box S from Windows.

Download and install

Get the latest version from Releases:

Computer File
Mac with Apple silicon (M1 and later) CleanMyTV-<version>-arm64.dmg
Mac with Intel CleanMyTV-<version>.dmg
Windows 10 or 11 CleanMyTV-Setup-<version>.exe

The installers are not signed with a paid developer certificate, so your computer warns you the first time:

  • Mac: open the dmg and drag CleanMyTV to Applications, then open it. When macOS says it can't verify the developer, choose Done, go to System Settings → Privacy & Security and press Open Anyway next to CleanMyTV (on macOS 14 and earlier, right-click the app and choose Open instead). macOS asks whether CleanMyTV may find devices on your local network: choose Allow, or it cannot reach the TV.

    If macOS says CleanMyTV is damaged and can't be opened, you have v0.1.0, whose Mac build was not signed correctly. Run this in Terminal, then open the app again:

    xattr -cr /Applications/CleanMyTV.app
    codesign --force --deep --sign - /Applications/CleanMyTV.app
  • Windows: when SmartScreen says it protected your PC, choose More info, then Run anyway.

Before you start: on the TV

  1. Settings → Device Preferences → About (on some Google TVs: Settings → System → About).
  2. Press OK on Build (or Android TV OS build) seven times, until the TV says you are a developer.
  3. Back one screen → Developer options → turn on USB debugging. If you also see Network debugging or ADB debugging, turn that on too.
  4. Keep the TV on and on the same Wi-Fi as your computer.

Open CleanMyTV, find the TV and choose Allow when the TV asks. Tick Always allow from this computer to skip the question next time.

What it does

Step What happens
Clean & launch The guided path: applies the list that best matches your TV, then installs CleanMyTV Home.
Setup Checks the network, finds TVs with port 5555 open, connects, and waits while you press Allow on the TV. Google TVs that only offer Wireless debugging get a pairing form. With more than one known TV, it shows them with snapshot thumbnails to pick from.
Clean up Picks the upstream list that matches your TV's model. Every package shows its live state on the TV, and you choose what to disable. If your TV isn't listed, it offers the packages other TVs disable.
Home screen Installs or updates CleanMyTV Home and hands Home over. If Home doesn't land on it, it rolls back. Tabs for layout, apps, rows and folders, look and wallpaper, and music bars. See below.
TV extras Ad-blocking Private DNS, animation speed, an on-screen remote, reboot.
Finish Walks through switching debugging off, then checks that port 5555 is closed.
Setup, connected to a TV Clean up: the list that matches the TV, with each package's state

Nothing is uninstalled. Packages are switched off for your user, and Restore puts every package back the way it was before the first cleanup.

CleanMyTV Home

The Home screen step has six tabs. Every change shows on the TV straight away. The Layout and Apps tabs have a live preview of the TV screen at the top.

Tab What you set
Overview Install or update Home, and how to use it. Give Home back to the stock launcher. Remove the old CleanYourTV launcher in one click if it's still on the TV. Take a snapshot of the TV screen.
Layout Three layouts: Shelf (the default), Split and Rail. Space above the apps. The dock, rows, folders and all apps sections, in any order, each one can be hidden. Quick-settings icons: Inputs, Wi-Fi, Bluetooth, Picture & sound, Apps, Screensaver, Search, Music bars and Settings. Icons the TV can't open are marked "not on this TV". Dock and row tile sizes, apps per row, app names, clock and greeting.
Apps, rows & folders Dock size, drag to reorder, hide apps, named rows and folders.
Look & wallpaper Accent colour, focus style (glow, outline or none), your own picture or Bing's picture of the day, darken, background colour.
Music bars On or off; bars, mirrored or wave; accent, rainbow or white; peak dots, number of bars, height, opacity and sensitivity.
Remote buttons Find what a remote button sends, then give it a job in every app: open Settings, Inputs, an app, Home, Back, and more. Off until you turn it on. Only the buttons you map are touched. Power, volume and the mic button are usually handled before Android sees them.

Home keeps its settings and wallpaper in its own private storage. The app sends them over ADB through a ContentProvider (content call) that only the shell user and root may call. This fixes the "Permission denied" on Android/data (#20, #27, #28) and the theme reset after a reboot (#21).

The music bars read the TV's sound output. The app grants RECORD_AUDIO over ADB at install. The bars only move while music or video plays. The Music bars icon on the home screen turns them on or off.

CleanMyTV Home needs Android 9 (API 28) or newer.

Coming back to customise

Turn USB debugging on again and open the app. With one known TV, it reconnects to it. When CleanMyTV Home is already Home it opens the Home screen step, loaded with what is on the TV now. Switch debugging off again when you're done. If you didn't revoke the authorisations, there's no Allow prompt.

The app remembers each TV it has connected to. With more than one, it doesn't connect by itself: Setup shows the TVs with snapshot thumbnails, and you pick one. The sidebar shows the connected TV's thumbnail.

If the router gave the TV a new address, or another device now answers at the old one, the app says so and scans the network. You pick the TV from the list; the app does not log in to devices it found by itself.

Security and privacy

  • What it talks to. Only the TV address you choose, over ADB on port 5555 of your local network. The only optional download is Google's platform-tools, for Wireless debugging pairing. It comes from dl.google.com over HTTPS, and only when you click it. Bing's picture of the day comes from www.bing.com, only when you choose it as the wallpaper. No analytics, no accounts, no server of its own.
  • Your keys. The app makes its own ADB key in its data folder and signs only with that. It never uses ~/.android/adbkey, which your phones may also trust, and it only logs in to an address you picked. Network ADB is plaintext by design, so use it on a network you trust.
  • Pinned upstream. The debloat lists come from one upstream commit pinned in upstream.json with a content hash. A build refuses anything that doesn't match, so a change upstream reaches this app only after someone reviews it and moves the pin.
  • The launcher signing key ships inside the app, on purpose. resources/signing/cleanmytv.jks (password cleanyourtv) signs CleanMyTV Home, so every build installs over the others. It gives no access to a TV: installing anything still needs ADB access the owner allowed.
  • Close debugging when you're done. Some TVs (ro.adb.secure=0) accept any device on the network without the Allow prompt; the app warns you if yours is one. The Finish step checks that port 5555 is closed. The launcher keeps working without debugging.
  • Window lockdown. The app window is sandboxed, cannot navigate away from its own page, and only that page may call into the part that talks to the TV.

Found a security problem? Please report it privately through the repository's Security → Report a vulnerability page rather than in a public issue.

How it relates to upstream

The debloat side is a TypeScript port of upstream's tools/, and the launcher handover follows launcher/build-and-install.sh:

  • src/main/adb/ is an ADB-over-TCP client, the twin of tools/tv.py.
  • src/main/debloat.ts has the same guards as disable.sh: it won't disable the app that owns Home while nothing else can take it, and it won't disable setupwraith while it owns the Wi-Fi network. It writes the same recovery record to ~/.cleanyourtv/, plus the TV's device name so the record follows the TV to a new address. tests/engine.test.ts checks that the record names and the restore batch match upstream recovery.py exactly, so tools/restore.sh ~/.cleanyourtv/lists/<tv>.txt can also undo what the app did.
  • src/main/launcher.ts follows the handover order of build-and-install.sh: install, start, disable the stock launcher, set Home, check, roll back. It also removes the CleanYourTV launcher that 0.1.x installed.
  • src/main/home.ts reads and writes CleanMyTV Home's settings through its ContentProvider.

Upstream's themes are still synced into resources/upstream, but the app doesn't use them.

The launcher APK

CleanMyTV Home lives in home/: Kotlin and Jetpack Compose for TV, package io.github.wingedpanther.cleanmytv.home. npm run home builds it into resources/home.apk, and resources/home.json records its version. The script uses JAVA_HOME and ANDROID_HOME if they are set. Otherwise it downloads JDK 17 and the Android SDK into .cytv-build/. Every build is signed with resources/signing/cleanmytv.jks, so each one installs over the others.

Develop

npm install
npm run sync                 # lists and themes from the pinned upstream commit
npm run home                 # resources/home.apk (without JAVA_HOME/ANDROID_HOME, first run downloads the build tools)
npm run dev                  # the app, with hot reload
npx tsx scripts/fake-tv.ts   # a pretend TV on 127.0.0.1:5556 to try the app without one
UPSTREAM_DIR=<clone at the pinned commit> npm test
npm run dist:mac             # dist/*.dmg   (on a Mac)
npm run dist:win             # dist/*.exe   (on Windows, a Mac, or in CI)

To move to a newer upstream: review its changes, then node scripts/pin-upstream.mjs <commit sha>, npm run sync, and test on a TV. UPSTREAM_UNPINNED=1 lets sync use other content for a local trial.

.github/workflows/build.yml builds the APK on Linux and runs the tests on every push and pull request. Pushes to main and version tags also build the macOS and Windows installers; download them from the run's Artifacts. It runs with read-only repository permissions and actions pinned to commits.

Releasing

  1. Set the new version in package.json and commit it.
  2. Tag and push: git tag v0.2.0 && git push origin main v0.2.0.
  3. The workflow builds both installers and opens a draft release with them attached. Check it, then press Publish release.

The tag has to match the version in package.json, or the release step stops.

Help and community

  • Chat and how-to questions: the CleanMyTV Discord. Share your home screen in #show-your-setup.
  • Bugs and feature requests: open a GitHub issue with your TV model, Android version and what happened. Issues are where fixes get tracked, so please don't report bugs only in Discord.

Known limits

  • Wireless debugging pairing uses Google's adb, downloaded on demand. On macOS, Local Network privacy can block that binary. If pairing fails there, pair from a Windows PC or run adb pair in Terminal once.

Licence

MIT, see LICENSE. The bundled debloat lists and themes are from cleanyourtv by Gathin23, also MIT; its licence ships in resources/upstream/LICENSE.

About

Desktop companion and MORE for TV: debloat an Android TV, install the clean launcher and customise it.

Topics

Resources

Stars

127 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages