Back to blog

Clean Your TV on GitHub: Debloat Android TV with an AI Agent

Clean Your TV is the GitHub project that strips ads, tracking and bloat from Android and Google TV over ADB, no root. Agent flow, phone app, undo and risks.

Nov 1, 2026AINovaTools Team
Clean Your TV on GitHub: Debloat Android TV with an AI Agent

Clean Your TV is an open-source GitHub project that strips ads, sponsored rows, background tracking and preinstalled bloat from Android TV and Google TV sets. It works over your Wi-Fi through ADB, Android's built-in debug bridge, and needs no root. The unusual part is how you run it: clone the repo, open it in an AI coding agent such as Claude Code, paste one prompt, and answer three or four questions while the agent does the work.

It started in mid-October 2026, when the developer posted a before-and-after of his parents' Xiaomi TV, cleaned up by Claude Code over Wi-Fi. The repo, Gathin23/cleanyourtv, took off within days — partly because everyone has a relative with a TV like that, and partly because the "product" is mostly one carefully written prompt plus a few guardrail scripts.

Below: what it changes, how the agent runs it, the no-laptop phone app, and how to undo it all.

What Clean Your TV actually changes

The README describes three moves:

  1. Back up. The package list and settings are saved, and a restore script is written, before anything changes.
  2. Disable. Telemetry, ad services and bloat are switched off with pm disable-user. Nothing is uninstalled, flashed or rooted.
  3. Replace the home screen. A small native launcher — about 572 KB, plain Java, built for TVs with 1 GB of RAM — becomes your Home: black background, a dock of the apps you pick, no sponsored rows.

Step three is what you'll notice: most ads live on the stock home screen.

Tested package lists in examples/ cover 407 TV models from 106 brands at the time of writing; unlisted models get a more cautious pass.

What goes awayWhat stays
Sponsored rows and promo banners (stock launcher replaced)Ads inside YouTube and other streaming apps
Telemetry and ad servicesPlay Store and Google Play Services
Preinstalled apps you say you don't useHDMI inputs, live TV, remote pairing
Manufacturer content feedsSystem updates, unless you choose otherwise

Why Android TV ads got this bad

A budget smart TV sold close to cost earns its margin back on the home screen. Google TV leads with recommendations and sponsored tiles, manufacturers such as Xiaomi add their own content feeds, and telemetry services phone home in the background. The menus barely help: Google TV's apps-only mode hides recommendations but also switches off Google Assistant, and nothing in Settings touches the background services. ADB, the debug bridge every Android TV exposes once developer options are on, is the side door.

Before you start: what you need

RequirementDetails
TVAndroid TV or Google TV; Android 8.0 (API 26) or newer for the launcher
NetworkComputer and TV on the same Wi-Fi
ToolchainPython 3, JDK 17 through 22, Android SDK platform 34 with build-tools 34.x
AgentClaude Code, Codex, Gemini CLI or Antigravity CLI, or anything that reads AGENTS.md
TimeAbout 15 minutes, in one sitting

The toolchain is heavier than "debloat my TV" suggests because the launcher is built from source on your machine; the project ships no prebuilt APKs. Mind the ceiling: JDK 23 and newer breaks the Gradle 8.9 build. Windows gets PowerShell versions of every script.

The repo ships CLAUDE.md, AGENTS.md and GEMINI.md, so Claude Code and Gemini CLI find their own instructions and OpenCode reads the same rules from AGENTS.md. Never run a terminal agent before? Our Claude Code tutorial for beginners covers install, plan mode and permissions.

How the agent-driven setup works, step by step

  1. Turn on developer options. In the TV's Settings, find About (under System on Google TV, under Device Preferences on many Android TV sets) and press OK on the Build entry seven times.

  2. Enable debugging. Switch on USB debugging, plus Network or ADB debugging if your TV lists it separately.

  3. Clone the repo and start your agent inside it:

    git clone https://github.com/Gathin23/cleanyourtv
    cd cleanyourtv
    claude   # or: opencode
    

    Cloning matters: the agent is told to reuse tools/disable.sh and the launcher build script, which carry safety checks, instead of improvising raw ADB commands.

  4. Paste PROMPT.md and fill in your TV model. That one prompt is the whole playbook.

  5. Accept the debugging prompt on the TV. The agent connects over ADB and saves the backup — package lists, getprop output, settings — before touching anything.

  6. Answer the checklist. Which streaming apps your household uses, whether you need the voice assistant, Chromecast and updates, and how many dock slots you want (four to seven).

  7. Let it work in small batches. Packages are disabled one per command, with screenshots in between. The new launcher is installed and confirmed as Home before the stock one is switched off, so you're never stranded without a home screen.

  8. Close the door. The agent turns off debugging, revokes authorizations, and runs tools/adb-closed.py to confirm the ADB port refuses connections after a reboot. Only the tool's "closed" counts.

The agent may also offer ad-blocking DNS; the prompt is upfront that it won't stop YouTube ads and can bypass your router's filtering. Leave auto-approve off for this one: each pm call is a separate command you can read before saying yes.

Why an agent instead of a script?

Because TVs are a mess. A fixed script can't know that a Google TV setup component can grab the Home role and hold your saved Wi-Fi, or that disabling one MediaTek middleware service bootlooped a Haier set — both cases the prompt warns about. An agent reads the package list, checks screenshots and asks what your family uses; the scripts are the rails, refusing any list that touches core Android packages, with no override.

No laptop? The companion phone app

If installing a JDK to clean a TV sounds absurd, there's a shortcut: a free, open-source Android app by developer udhaykumarbala that does the job from your phone, no laptop or agent needed. It's a separate community project with its own issue tracker; find it on the Clean Your TV app page.

It takes about five minutes:

  1. Connect. The app finds the TV on Wi-Fi and walks you through authorizing your phone.
  2. Analyse. It reads what's installed and shows a plan. Nothing changes yet.
  3. Clean. It saves a restore point, switches off the clutter and applies a new home screen.

You need an Android 9+ phone with a screen lock, and network debugging enabled on the TV (the app shows you where, then turns it off). If the phone doesn't confirm the new home screen within 150 seconds, a watchdog restores the TV's own.

AI agent (repo)Companion app
NeedsComputer, JDK, Android SDK, an agentAndroid 9+ phone
TimeAbout 15 minutesAbout 5 minutes
TV coverage407 listed models, plus unlisted ones with care131 models from 46 brands
Undotools/restore.sh replays the backupBuilt-in restore point
Best forTinkerers, unlisted TVs, custom docksEveryone else

One warning: the main project says it publishes no app-store app of its own. Install via the link on cleanyour.tv, not whatever a store search turns up.

If something breaks

Usually one app someone relies on stopped working. Open the TV's Settings, go to Apps, show system apps, and re-enable it — no computer needed.

For a full undo, tools/restore.sh replays the state recorded in ~/.cleanyourtv/ before the first change:

tools/restore.sh examples/your-tv-model/debloat.txt

The launcher itself stays until you remove it in Settings. If a Google TV is left without a working home screen, this brings the stock one back:

adb shell pm enable --user 0 com.google.android.apps.tv.launcherx

Firmware updates are the recurring annoyance: disabled packages come back and Home reverts to stock (see the FAQ). The last resort always works — a factory reset re-enables everything, at the cost of your logins.

The risks, honestly

  • The wrong package can break things — launcher features, input switching, remote pairing, even booting. The prompt keeps a never-touch list: TV and HDMI input services, remote and Bluetooth pairing, the on-screen keyboard, Play Store and Play Services, core Android. Stick to the curated list for your model.
  • An open ADB port is a real hole in your network. Don't skip the closing step.
  • Nothing is truly uninstalled. Without root, packages are only disabled for the default user; the APKs stay on the system partition. Expect a quieter TV, not more free storage.
  • Warranty and support. Disabling apps isn't rooting, and a reset undoes it, but check your warranty terms and expect support to ask for a factory reset before helping.
  • Leave factory and test packages alone. The repo's agent rules forbid starting them; a factory-mode flag may not be reversible.

Who should do this, and who shouldn't

Good fit: anyone whose Android TV or Google TV home screen has turned into a billboard; anyone doing tech support for their parents (the origin story); owners of older, low-RAM sets, since the launcher is built for 1 GB machines.

Skip it if your TV is a Samsung, LG or Roku — those run Tizen, webOS and Roku OS, not Android. Skip it, too, if you like Google TV's recommendations (the stock home screen goes away), if the TV isn't yours to modify, or if you can't finish in one sitting the night before the big game.

The bigger takeaway: Clean Your TV is less a tool than a job description for an agent, with rails attached. The pattern is spreading — Ponytail is one SKILL.md that changes how agents write code, Reverse Engineer Anything points agents at binaries, the Day Trader Skill bundles 11 guardrailed trading skills, and Karpathy's HackerTube was a full YouTube alternative built in a weekend. Still picking an agent? Start with our best AI agent tools roundup.

FAQ

Does Clean Your TV need root?

No. It uses ADB, which every Android TV exposes once developer options are on. Packages are disabled for the default user with pm disable-user; nothing is flashed, rooted or uninstalled.

Is Clean Your TV safe to run?

Reasonably, if you follow the process: backup first, curated per-model lists, scripts that refuse core packages, and a launcher swap ordered so Home never disappears. The real risks are disabling something your TV needs and forgetting to close ADB.

Will it block YouTube ads?

No. It removes home-screen ads and disables ad and telemetry services, but ads inside YouTube and other streaming apps are served by those apps themselves. The optional ad-blocking DNS won't touch them either.

Does it work on Samsung, LG or Roku TVs?

No. Those TVs don't run Android, so there's no ADB to talk to. Android-based sets from Sony, TCL, Xiaomi, Philips, Hisense and many others are covered — check examples/ for your exact model.

Will a firmware update undo the cleanup?

Usually, yes. An update brings the disabled packages back and resets Home to the stock launcher. Run the repo's tools/check.py with --fix, or ask your agent to, and the list is re-applied.

Tools mentioned in this article