How to Restore Your TV After cleanyourtv

An unofficial guide to undoing cleanyourtv: how the restore script actually works, re-enabling apps through Settings, fixing a stuck Google TV, and leaving ADB closed when you're done.

Updated October 20, 2026 · Unofficial guide

This is an unofficial guide to cleanyourtv, an open-source MIT-licensed project. Nothing cleanyourtv does is destructive by design: packages are disabled, not uninstalled, specifically so a restore like this one can always put the TV back.

Every change cleanyourtv makes is reversible, and that reversibility is the whole point of how it works: packages are disabled with pm disable-user, never uninstalled, so nothing has to be reinstalled to restore a TV. This page covers every way to restore a TV that's been through cleanyourtv, from the one-line scripted restore to fixing a TV that's stuck mid-recovery.

What restore actually undoes

Before tools/disable.sh changes anything on your TV, cleanyourtv writes down exactly what it found: for every package in the list, whether it was enabled, already disabled, or not installed at all, which component owned the Home screen, and the three system animation scales. That record is saved to ~/.cleanyourtv/, one file per TV and per debloat list. Restore doesn't just flip every package back to "enabled" blindly; it replays that specific record, so the TV returns to the state it was actually in, not a generic default.

This matters for two reasons when you restore: a package you'd already disabled yourself, before ever running cleanyourtv, stays disabled after restore rather than getting switched back on. And Home goes back to whichever launcher component actually owned it beforehand, which isn't always the obvious "stock launcher" if your TV had something else claiming Home already.

The normal way to restore: tools/restore.sh

With the same debloat list you used to clean the TV, run:

TV_HOST=192.168.1.50 tools/restore.sh examples/<your tv>/debloat.txt

On Google TV, pass the launcher fallback argument too:

TV_HOST=192.168.1.50 tools/restore.sh examples/<your tv>/debloat.txt com.google.android.apps.tv.launcherx
That launcherx argument is only a fallback. If the saved record names a different launcher as the one that actually owned Home, that's the one restore gives it back to; the argument is used only when nothing answered HOME at the time of the backup, or when cleanyourtv's own launcher had taken it. Keep the exact debloat list you applied, since restore needs it to find the matching record.

Without a saved record, either from an older cleanyourtv version or one you deleted yourself, the script says so plainly and falls back to its older, less precise behaviour: enabling every package on the list regardless of its original state, and resetting all three animation scales to 1.0.

On Windows, the PowerShell twin works the same way:

powershell -ExecutionPolicy Bypass -File tools\restore.ps1 -TvHost 192.168.1.50 examples\<your tv>\debloat.txt

Restoring one app by hand, without ADB

If you don't have ADB access, or just want one specific app back, the TV's own menu does the same underlying job: Settings → Apps, find the disabled app, and re-enable it from there. This works even with the TV completely offline from your computer, since it's a local setting, not something that needs cleanyourtv's tools or a network connection to your machine. It won't restore Home ownership or the animation scales the way the scripted restore does; it only flips that one package back on.

Switching the Home screen back without disabling anything

If the cleanyourtv launcher is installed and working but you just want your old home screen back temporarily, most Android TV and Google TV sets expose a home picker: go into the cleanyourtv launcher's own Launcher settings, or use the optional "Default home" tile if it's configured, to open Android's home-app chooser and select the original launcher. For this to work, the original launcher has to still be enabled; if the install step disabled it, run the restore script first, then switch Home back through the picker. Some TVs don't expose a home picker at all, in which case restoring through tools/restore.sh is the only way back.

Removing the cleanyourtv launcher entirely

Restore re-enables the stock launcher and gives it Home back, but it deliberately leaves the cleanyourtv launcher itself installed on the TV, in case you want to switch back to it later. To remove it completely: Settings → Apps, find com.gathin.tvhome, and uninstall it like any other app.

Checking what's still disabled before you restore

If it's been a while since you ran cleanyourtv and you're not sure exactly what got disabled, check before you restore rather than guess. Over ADB:

tools/tv.py 'pm list packages -d'

lists every package currently disabled on the TV, cleanyourtv's changes included. Compare that against the debloat.txt list you applied; anything on the list that isn't in that output was either already re-enabled, or was recorded as "not installed" at backup time and was never actually touched. This is also a useful sanity check right after a restore: run the same command again and the packages from your list should no longer appear, apart from any that were disabled before cleanyourtv ever ran, since restore puts those back to disabled on purpose.

Don't re-enable packages you don't recognize just because they show up in this list. Some entries may have been disabled by the manufacturer's own firmware, not by cleanyourtv, and re-enabling those can bring back the exact ad or telemetry services you debloated in the first place.

Partial restore: giving back just one app, keeping the rest debloated

A full restore undoes everything cleanyourtv changed on that TV, but you don't have to go all the way back to stock to get one specific app working again. If, say, a casting feature you didn't think you needed turns out to matter, re-enable that single package instead of running the whole restore script:

tools/tv.py 'pm enable --user 0 <package name>'

or, without ADB, through Settings → Apps → <app name> → Enable on the TV itself. Either way, the rest of your debloat list stays exactly as it was; a partial restore like this doesn't touch the saved record in ~/.cleanyourtv/, so a later full restore still works normally if you decide to use it.

Stuck after disabling setupwraith: the one command that fixes it

On Google TV, the first-run setup wizard, com.google.android.tungsten.setupwraith, can claim the Home screen the moment the stock launcher is disabled, and in some cases (notably Xiaomi's MiTV-MZTU0) its recovery activity grabs Home and crash-loops the system every couple hundred milliseconds. If your Google TV is stuck like this after a cleanyourtv run went wrong, the direct fix is:

tools/tv.py 'pm enable --user 0 com.google.android.apps.tv.launcherx'

This re-enables the Google TV launcher directly over ADB, which gets the system out of the loop even while it's cycling. Before you re-disable setupwraith on a later attempt, check whether your Wi-Fi network is tied to it first: dumpsys wifi | grep -o 'cname=[^ ]*'; if the network shows as belonging to setupwraith, disabling that package again deletes the saved Wi-Fi network along with it, which drops the TV off ADB entirely. Rejoin the network from Settings before disabling setupwraith a second time.

Because this failure mode is known, cleanyourtv's own debloat lists for affected models list setupwraith in debloat.txt specifically so the normal restore script re-enables it along with everything else, which is the version of "undo" you want before a factory reset or a firmware update.

Firmware updates and restore

Most debloat lists disable the firmware update service as one of the disabled packages, which means updates stop arriving until that service is re-enabled, typically as part of a full restore. If you'd rather keep updates flowing without a full restore, re-enable just that one package through Settings → Apps or with pm enable-user over ADB, leaving the rest of the debloat in place. If an update does land while a package is still disabled, the worst case documented is that package coming back enabled on its own; re-running the relevant line from your debloat list fixes it.

Closing ADB after you restore

Restoring the TV's apps and launcher doesn't automatically close the ADB connection you opened to do it, and leaving port 5555 open is a real exposure: it's plaintext, and on firmware with ro.adb.secure=0, anyone on your LAN can get a shell to the TV through it. Whether or not you've restored anything, close it when you're finished:

  1. On the TV: Developer options → turn off USB debugging and Network/ADB debugging, and revoke the USB debugging authorisations.
  2. Reboot the TV.
  3. From your computer, confirm the port is actually gone: nc -vz <tv ip> 5555 should fail.

The cleanyourtv launcher, if you've kept it installed, keeps working normally with debugging off; closing ADB has no effect on day-to-day use.

If you haven't run cleanyourtv yet and are weighing whether to, see how the cleanyourtv prompt works first, or the platform guides for Android TV and Google TV. For the DNS side of ad removal, which restore doesn't touch, see removing ads from a smart TV.

Frequently Asked Questions

How do I restore my TV after running cleanyourtv?

Run tools/restore.sh with the same debloat list you applied, e.g. TV_HOST=192.168.1.50 tools/restore.sh examples/<your tv>/debloat.txt. It replays the record cleanyourtv saved before it changed anything, re-enabling each package to the state it was actually in and handing Home back to whichever launcher owned it.

Will cleanyourtv restore re-enable apps I had already disabled myself?

No. The restore script reads the record saved in ~/.cleanyourtv/ before the debloat ran, which notes whether each package was enabled, already disabled, or not installed. A package you'd disabled yourself before running cleanyourtv stays disabled after restore.

What if restore says there's no record to work from?

An older run or a deleted record makes restore fall back to its old behaviour: enabling every package on the list and resetting the three animation scales to 1.0, regardless of what state they were actually in beforehand. This is a less precise restore than the normal record-based one.

My Google TV is stuck in a boot loop after disabling setupwraith, how do I restore it?

Run tools/tv.py 'pm enable --user 0 com.google.android.apps.tv.launcherx' over ADB. This is the direct fix for the setupwraith recovery loop, and it works even if the TV is cycling through Wi-Fi drops, as long as the ADB connection itself still holds.

Can I restore my TV without ADB or the restore script?

Partially. The TV's own Settings → Apps page can re-enable any package cleanyourtv disabled, one at a time, even without ADB access. It won't restore the exact Home ownership or animation scales the way the scripted restore does, but it gets apps back.

Does restoring remove the cleanyourtv launcher itself?

No. Restore re-enables the stock launcher and gives it back Home ownership, but it leaves the cleanyourtv launcher installed on the TV. Remove it manually from Settings → Apps if you want it gone entirely.

Does a firmware update undo cleanyourtv, or do I need to restore first?

Most debloat lists disable the firmware update service as part of the cleanup, so updates only arrive once you re-enable it, typically through restore. If an update does land with cleanyourtv still active, the worst case is a disabled package coming back enabled, fixed by re-running the debloat batch.

How do I know ADB is actually closed after I'm done with cleanyourtv?

Run nc -vz <tv ip> 5555 from your computer after turning off USB and Network/ADB debugging on the TV and rebooting it; it should fail to connect. This matters independently of restoring: an open ADB port is a full shell for any device on your LAN on insecure firmware.

Find your TV's debloat list

80 tested lists across 28 brands, each with the exact packages to disable and the one-line restore command.