The Problem
Smart TVs ship with a bundle of pre‑installed apps that add ads, telemetry and rarely used features. Because the devices are locked down, users cannot remove them without rooting, and the default launcher is cluttered. A clean, ad‑free home screen that can be restored in a single tap would improve privacy and performance.
What This Does
The project replaces the stock launcher on any Android or Google TV device with a lightweight, Apple‑TV‑style home.
launcher/app/src/main/java/com/gathin/tvhome/MainActivity.javais the UI entry point.AppLibraryDialog(AppLibraryDialog.java) presents a list of removable packages read from theexamples/*/debloat.txtfiles.HomeKeyService(HomeKeyService.java) listens for the Home button; when pressed it launches the dialog, allowing the user to delete apps over an ADB‑over‑Wi‑Fi connection.Config.javaholds constants such asADB_HOST,ADB_PORT, and the default package list path, making it easy to change the target device or add new lists.
The app does not modify the system itself; it only issues adb shell pm uninstall -k --user 0 <pkg> commands, preserving data for a one‑line restore.
How It Is Wired
- Entry Point –
MainActivity.onCreate()initializes the launcher and registersHomeKeyService. - Call Flow –
HomeKeyService.onKeyDown()→MainActivity.startAppLibraryDialog()→AppLibraryDialog.showDialog()→AppLibraryDialog.onAppSelected()→Config.getDebloatList()→AppLibraryDialog.uninstallPackage(). - External Touches –
- ADB shell calls (
Runtime.exec) to uninstall packages. - Network socket to
ADB_HOST:ADB_PORTfor the Wi‑Fi ADB connection. - Responsibilities –
Configowns constants and path resolution.AppLibraryDialogowns the UI logic and package removal.HomeKeyServiceowns key‑event handling and triggering of the dialog.MainActivityorchestrates the overall flow and manages lifecycle. No file has a wide blast radius; each is tightly scoped.
How To Use It
Setup
git clone https://github.com/moses-y/cleanyourtv
cd cleanyourtv/launcher
./gradlew assembleDebug # builds the APK
Configuration – Edit launcher/app/src/main/java/com/gathin/tvhome/Config.java to point ADB_HOST to your TV’s IP.
Running – Install the generated app-debug.apk on the TV. Enable ADB debugging and connect over Wi‑Fi (adb connect <ip>:5555). Launch the app and press the Home key to open the debloat dialog.
Real‑World Use
A network engineer installs the launcher on a fleet of Google TVs in a hotel. After enabling ADB over Wi‑Fi, the engineer updates Config.java with the hotel’s TV IP range and pushes the APK via OTA. Guests can press Home to remove unwanted telemetry apps and restore the default launcher with a tap.
Code Health & Issues
- Low – Dependencies declared without a lockfile –
launcher/app/build.gradle - Low – No reproducible build lock for
tools/requirements.txt - Low – Missing unit tests for
AppLibraryDialoglogic (only 23 test files intests/).
No critical security findings; all external calls are encapsulated in Runtime.exec with user‑supplied package names validated against the debloat list.
The Bottom Line
CleanYourTV delivers a straightforward, non‑rooted solution to strip bloatware from Android/Google TVs. Its architecture is clear: a launch‑time entry point, a key‑event service, and a dialog that runs ADB uninstall commands. The code is modular, but the build lacks reproducibility due to missing lockfiles. The project is ideal for environments where root access is unavailable but a clean home screen is desired.