Customize Your TV with Claude Code

Use Claude Code to safely replace your Android TV launcher and prove recovery.

Introduction

30 Second Summary

TV home screens can feel crowded before you even choose what to watch. Promotions often take the first row while your favorite apps sit several clicks away.

In this project, you will use Claude Code as a supervised operator to turn a compatible Android TV or Google TV into a focused Home for your favorite apps. You will preserve the original state through a tested recovery path before closing network debugging.

What You'll Build

Your remote's Home button opens a quiet CleanYourTV screen with your favorite apps first, backed by a tested route to the stock launcher.

By the end of this project, you'll have:

  • Press Home to see the minimal theme with your most-used apps arranged first.
  • Restore the stock Home on demand. Reapply the approved cleanup after proving recovery works.
  • Capture before, restored, and final screenshots. Open Settings with the physical remote. Display an HDMI input. Launch three favorite apps. Verify the network ADB port is closed.
  • Secret Mission: measure a three-task remote baseline. Rearrange the Home tiles without ADB. Beat the original route with a lower count or time.

Are there any prerequisites?

You need a Mac with admin access plus an existing paid Claude plan. Your Mac and TV must share the same trusted home network with the physical remote nearby. The project confirms TV compatibility before changing the device.

Before We Start

This step gives you a safety commitment before any hands-on work begins. It connects your desired TV improvement to reversible recovery without rooting, firmware flashing, system-package removal, or unclear device changes.

Prepare Your Mac and Safety Rails

Your safety commitment defines the boundary for every change in this project. Your Mac now needs a known toolchain before Claude Code can inspect the repository or reach your TV.

An outdated dependency can make a guarded script fail in an unpredictable place. This step verifies each tool before any TV setting or package is touched.

In this step, get ready to:
  • Check the Mac toolchain and record every installed version.
  • Install the required development tools through a supported Homebrew setup.
  • Prepare CleanYourTV and start Claude Code with Manual permissions.
Check your Mac toolchain

A toolchain check shows exactly what your Mac can run today. It also identifies missing commands before they become harder-to-diagnose installation failures.

  • Press Cmd+Space to open Spotlight.
  • Type Terminal into the search field.
  • Press Return to open macOS Terminal.
  • Check your macOS version by running this command:
sw_vers -productVersion

What does this check show?

The result identifies the macOS version that Homebrew must support. Keep this version visible for the compatibility decision below.

  • Check your existing Claude Code installation by running this command:
claude --version

What should you see?

You should see a version number followed by (Claude Code). This confirms the command is available from Terminal.

  • Check the installed Git version by running this command:
git --version

What does this check show?

The result shows whether Git is already available for downloading the CleanYourTV repository.

  • Check the default Python version by running this command:
python3 --version

What does this check show?

The result identifies the Python interpreter currently selected by python3. The project prepares Python 3.14 if your current version differs.

  • Check the active Java version by running this command:
java -version

What does this check show?

The result identifies the Java runtime currently selected by Terminal. CleanYourTV uses OpenJDK 17 for its launcher build.

  • Check the ADB server status by running this command:
adb server-status

What does this check show?

A current Platform-Tools installation reports a server version of 37.0.0 or higher. It also reports mdns_enabled: true for wireless discovery.

A missing-command result is useful evidence at this stage. The installation path below adds ADB without connecting to your TV.

  • Check whether Homebrew is available by running this command:
brew --version

What does this check show?

A version result confirms that Homebrew is ready to manage the local toolchain. A missing-command result sends you to the installation scenario below.

  • Compare the first number in your macOS version with 15.
  • Continue if your Mac runs macOS Sequoia 15 or newer.
  • Stop the primary setup path if your Mac runs an earlier version.

Using an older macOS version?

Homebrew supports macOS Sequoia 15 and newer for this setup path. Use the direct vendor installers in a follow-on setup guide before returning to this project.

Install the required toolchain

The launcher build depends on version-pinned tools. The correct versions keep the repository scripts aligned with the Android build configuration.

Why use the native toolchain?

CleanYourTV provides a native macOS workflow through Homebrew and the Android SDK. This keeps the safety checks close to the commands that operate on the device.

A Docker workflow would add another system dependency without improving the approval or rollback model. The native path keeps this project focused on supervised device changes.

✔️ I see the required versions

Homebrew is available. Your existing commands show the required versions or compatible newer output.

Homebrew may spend several minutes checking packages before it prints a completion summary. That pause is normal during the first formula check.

  • Install or verify the three Homebrew formulae by running this command:
brew install git python@3.14 openjdk@17

What does this command do?

  • Homebrew keeps Git available for the repository checkout.
  • The python@3.14 formula provides the project interpreter.
  • The openjdk@17 formula provides the Java toolchain used by the launcher build.

Formula check failed?

Confirm that the Homebrew command above prints a version in the same Terminal window. Retry the formula command from a stable network.

If a package remains unavailable, ask for help with the Homebrew output.

The next command requests your Mac administrator password because it registers OpenJDK with the system Java wrappers. Review the path before approving it.

  • Register OpenJDK 17 with macOS by running this command:
sudo ln -sfn $HOMEBREW_PREFIX/opt/openjdk@17/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-17.jdk

Why register the JDK?

Homebrew installs this alternate Java version in its own location. The symbolic link lets the macOS Java wrappers find OpenJDK 17.

Java still points elsewhere?

Rerun the link command with the same Terminal account that installed Homebrew. Enter your Mac login password when sudo requests it.

If Java still reports a different runtime, ask for help selecting OpenJDK 17.

ⓧ I see older versions

Your existing tools need the pinned project versions. Homebrew installs the required formulae without changing the TV.

The package check can take several minutes while Homebrew downloads newer files. Terminal output means the process is still active.

  • Install the pinned Git, Python, and OpenJDK formulae by running this command:
brew install git python@3.14 openjdk@17

What gets installed?

  • Git provides the repository checkout command.
  • Python 3.14 provides the isolated project environment.
  • OpenJDK 17 provides the compatible launcher build tools.

Upgrade stopped early?

Read the last Homebrew line for the package that failed. Retry from a stable network after any requested Homebrew PATH instruction is complete.

If the same package fails again, ask for help with the failed formula.

The next command uses administrator approval to register OpenJDK with macOS. It creates one system JDK link that points to the Homebrew installation.

  • Register OpenJDK 17 with macOS by running this command:
sudo ln -sfn $HOMEBREW_PREFIX/opt/openjdk@17/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-17.jdk

Why register the JDK?

The link exposes the Homebrew JDK to the macOS Java wrappers. This allows java -version to resolve the compatible runtime.

JDK link failed?

Confirm that the formula installation completed before retrying the link command. Enter your Mac login password when prompted.

If the link still fails, ask for help registering OpenJDK 17.

ⓧ One or more commands are missing

A missing Homebrew command requires the supported installer first. The installer prints its plan before changing files.

The installer may request your Mac administrator password. Read the printed plan before you approve it.

  • Install Homebrew on your supported Mac by running this command:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

What happens during installation?

The installer explains the files it creates. It pauses for confirmation before making changes.

Homebrew prints a PATH instruction when installation finishes. That instruction is specific to your Mac.

  • Run the PATH instruction printed by the Homebrew installer.
  • Confirm Homebrew is available by running this command:
brew --version

What should you see?

You should see the installed Homebrew version. This confirms the current Terminal can find the package manager.

Homebrew still not found?

Return to the installer's final output. Copy its printed PATH instruction exactly into the same Terminal window.

If the command remains unavailable, ask for help with the Homebrew PATH.

The formula download can take several minutes on its first run. Progress lines confirm that Homebrew is still working.

  • Install the required formulae by running this command:
brew install git python@3.14 openjdk@17

What gets installed?

  • Git supports the repository checkout.
  • Python 3.14 supports the isolated project tools.
  • OpenJDK 17 supports the Android launcher build.

Package installation failed?

Check that the Homebrew version command succeeds in this Terminal. Retry the installation from a stable network.

If a formula still fails, ask for help with the Homebrew installation.

The JDK registration command uses administrator approval. It links the Homebrew JDK into the location used by macOS Java wrappers.

  • Register OpenJDK 17 with macOS by running this command:
sudo ln -sfn $HOMEBREW_PREFIX/opt/openjdk@17/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-17.jdk

Why register the JDK?

OpenJDK 17 is an alternate Homebrew formula. The link makes it visible to the system Java command.

Registration failed?

Confirm the OpenJDK formula finished installing. Retry the link command with your Mac administrator password.

If the link remains unavailable, ask for help registering the JDK.

The core language tools are ready. The remaining packages provide the Android build files and the ADB command used by the repository.

  • Install the Android command-line tools by running this command:
brew install --cask android-commandlinetools

What does this install?

The cask provides sdkmanager. That command installs the exact Android SDK components required by CleanYourTV.

Cask installation failed?

Confirm that Homebrew works in the current Terminal. Retry the cask installation from a stable network.

If the cask remains unavailable, ask for help installing the Android command-line tools.

The SDK download can take several minutes because it retrieves multiple Android packages. Keep Terminal open while progress output continues.

  • Install Platform-Tools and the required Android build packages by running this command:
sdkmanager "platform-tools" "platforms;android-34" "build-tools;34.0.0"

What does this command install?

  • Platform-Tools provides the adb command.
  • Android Platform 34 provides the launcher compilation target.
  • Build-Tools 34.0.0 provides the matching Android build utilities.

SDK download failed?

Confirm that the Android command-line tools cask finished installing. Retry the SDK command from a stable network.

If sdkmanager remains unavailable, ask for help with the Android tools PATH.

License prompts require you to review Android's terms before accepting them. This approval covers local SDK components only.

  • Review every outstanding Android SDK license by running this command:
sdkmanager --licenses

What happens next?

The command displays each unaccepted license. Accept the required terms at each prompt to let the launcher build use the installed SDK packages.

License prompts unavailable?

Confirm that the SDK package installation completed before retrying the license command. Keep the command-line tools on your Terminal PATH.

If the prompt still fails, ask for help accepting Android SDK licenses.

Prepare CleanYourTV and Manual mode

A local CleanYourTV checkout gives Claude Code the repository's safety guards and recovery scripts. A dedicated virtual environment keeps its Python dependencies separate from the rest of your Mac.

  • Move to your Desktop by running this command:
cd ~/Desktop

What does this command do?

The command makes your Desktop the current Terminal location. The repository folder will be easy to find in Finder later.

  • Clone the canonical CleanYourTV repository by running this command:
git clone https://github.com/Gathin23/cleanyourtv

What does this command create?

Git downloads the current repository into a new cleanyourtv folder on your Desktop. The checkout includes the guarded launcher and recovery tools used later.

Clone failed?

Confirm that the Git version check succeeds. Retry the clone from a stable network.

If the repository still fails to download, ask for help cloning CleanYourTV.

  • Enter the downloaded repository by running this command:
cd cleanyourtv

What does this command do?

Terminal now runs repository commands from the cleanyourtv folder on your Desktop.

  • Create the isolated project environment by running this command:
python3.14 -m venv tools/venv

What does this command create?

Python creates tools/venv inside the repository. The repository scripts can use this interpreter without changing system Python packages.

Virtual environment creation failed?

Confirm that the Python 3.14 installation completed. Make sure Terminal is still inside the cleanyourtv folder.

If creation still fails, ask for help creating tools/venv.

The dependency download can take a few minutes while Python retrieves compatible packages. Progress output confirms the installer is still active.

  • Install the three pinned Python packages into tools/venv by running this command:
tools/venv/bin/python -m pip install adb-shell==0.4.4 rsa==4.9.1 cryptography==50.0.2

Why pin these packages?

  • The adb-shell==0.4.4 package supports the repository's Python ADB workflow.
  • The rsa==4.9.1 package supports ADB authentication data.
  • The cryptography==50.0.2 package provides the pinned cryptographic implementation for this environment.

Python package installation failed?

Confirm that tools/venv exists inside the repository. Retry from a stable network.

If a pinned package still fails, ask for help with the virtual environment.

  • Inspect the launcher build configuration by running this command:
cat launcher/app/build.gradle

What are you confirming?

The Gradle file defines the launcher version and Android build requirements. Find versionName '3.3' in the output before continuing.

Good work. You have confirmed that the checkout contains the expected CleanYourTV 3.3 launcher configuration.

Before you run the final checks, which outputs should identify Python 3.14, Java 17, and an available ADB server?

  • Verify the pinned Python interpreter by running this command:
python3.14 --version

What should you see?

You should see Python 3.14 with its installed patch version.

  • Verify the active Java runtime by running this command:
java -version

What should you see?

You should see an OpenJDK version beginning with 17.

  • Verify Git is available by running this command:
git --version

What should you see?

You should see the installed Git version. This confirms the repository tool remains available after setup.

  • Verify the ADB server status by running this command:
adb server-status

What should you see?

You should see server version 37.0.0 or higher. You should also see mdns_enabled: true.

  • Verify Claude Code remains available by running this command:
claude --version

What should you see?

You should see a version number followed by (Claude Code).

One of the final checks failed?

Return to the matching installation command above. Confirm that it completed in the same Terminal environment.

If the version still differs, ask for help reviewing the final tool checks.

Before you start the project session, do you expect Claude Code to run device-changing commands without asking for approval?

  • Start Claude Code with Manual permission mode by running this command:
claude --permission-mode default

What does Manual mode protect?

Claude Code starts an interactive session in Manual mode. It asks before most actions that edit files, run shell commands, or reach the network.

This approval gate supports your safety commitment. No TV setting or package has been changed in this step.

That's the safety foundation in place. Your Mac has the required toolchain while Claude Code remains approval-gated for the device workflow.

Your Mac and repository are ready. Next, you'll connect to the TV for a read-only compatibility report and a before screenshot.

Connect and Probe the TV

Your Mac toolchain is ready. Claude Code is waiting in Manual permission mode.

A model name on the bezel does not prove the TV's operating system. It also leaves the Android SDK level unknown.

A read-only ADB connection can inspect these facts before any package changes. It can also confirm whether the firmware supports a third-party HOME launcher.

You will finish with a compatibility report. You will also capture the stock Home as your before-state.

In this step, get ready to:
  • Enable only the debugging route that your TV provides.
  • Authorize a read-only connection from your Mac.
  • Probe compatibility and capture the stock Home.
Enable the TV's debugging route

Developer options exposes the controls that let your Mac inspect the TV. Finding this menu can be fiddly because manufacturers move it between firmware versions.

Treat This Route as a Guide

The repository provides a generic route for Android TV and Google TV. Follow the equivalent labels if your TV uses different wording.

  • Open Settings on the TV using its physical remote.
  • Select Device Preferences.
  • Select About.
  • Highlight Build.
  • Press OK seven times.
  • Return to Device Preferences.
  • Open Developer options.

You should now see the TV's debugging controls inside Developer options.

  • Enable USB debugging.
  • Enable Network debugging or ADB debugging if either option is present.
  • Inspect the TV's USB ports for connected devices.
  • Record the current USB connection here: for example, USB Ethernet adapter or nothing connected.

The TV now exposes its available debugging route. No package or launcher state has changed.

Authorize a read-only connection

ADB can inspect device properties across your trusted home network. The read-only instruction gives Claude a firm boundary before that inspection begins.

  • Switch back to the Claude Code session running from your CleanYourTV checkout.
  • Ask Claude to read PROMPT.md.
  • Give Claude the read-only boundary by pasting this instruction:
Stay read-only. Identify the exact TV model, operating system, Android SDK, firmware, current HOME owner, USB network risk, and connection route. Stop after a compatibility report and before screenshot. Do not disable, install, or change anything.

What Does This Instruction Protect?

  • Claude can inspect the model and software.
  • Claude can identify the HOME owner and connection route.
  • Claude must stop before capturing the screenshot.
  • Claude cannot disable a package or install an app during this probe.
  • Find the TV's address in the network details for its current connection.
  • Record the TV's address here: your TV's IP address.
  • Give Claude your TV's IP address as the value for TV_HOST.
  • Give Claude the recorded USB connection: for example, USB Ethernet adapter or nothing connected.
  • Ask Claude to identify the connection route without changing the TV.
  • Check each proposed command in Manual permission mode before approval.
  • Approve the TV's debugging authorization prompt only for this Mac.

Some TVs present pairing-code Wireless debugging instead of port 5555. The pairing command then asks for the temporary code shown on the TV.

  • Open the pairing-code option under Wireless debugging if your TV requires it.
  • Pair the Mac with the displayed endpoint by running this command with that endpoint in place of ipaddr:port:
adb pair ipaddr:port

What Does This Command Do?

The command asks ADB to pair your Mac with the endpoint displayed by the TV. Pairing authorizes the connection without changing an installed package or the HOME owner.

  • Enter the temporary pairing code displayed by the TV.
  • Ask Claude to connect through the paired endpoint identified by the repository.

Claude's connection check should identify the TV as reachable. It should also confirm that this Mac is authorized.

TV Not Authorizing the Mac?

Confirm that the Mac and TV use the same trusted home network. Check that TV_HOST still matches the TV's current network address.

For pairing-code Wireless debugging, use the temporary pairing endpoint displayed by the TV. That endpoint can differ from the later connection endpoint.

Help me diagnose the TV connection.

Probe compatibility and capture the baseline

The probe is the compatibility gate for the rest of the project. It must pass before the first package or launcher change.

Before you approve the probe, do you expect the report to pass every compatibility gate?

  • Ask Claude to run the read-only compatibility probe using exactly this command:
tools/venv/bin/python -I tools/tv.py --probe

What Does This Command Inspect?

  • The probe reads the TV model and Android version.
  • The probe reads the firmware details.
  • Claude records the current HOME owner and connection route.
  • Claude records the USB network risk and third-party HOME support.

Claude should label the TV compatible only if it is Android TV or Google TV on API 26 or newer.

The report should confirm ADB access. It should also confirm third-party HOME support.

Stop at a Failed Compatibility Gate

  • Stop the main path if the device is neither Android TV nor Google TV.
  • Stop the main path if the TV is below API 26.
  • Stop the main path if the TV refuses ADB access.
  • Stop the main path if the firmware blocks third-party HOME launchers.
  • Use the non-Android TV guide only when the probe identifies a non-Android TV.

That is the biggest uncertainty cleared: your report now proves the TV supports the guarded launcher path. The package state remains unchanged.

Before you capture the baseline, what screen do you expect the image to show?

  • Return the TV to its current stock Home using the physical remote.
  • Ask Claude to capture the baseline using exactly this command:
tools/venv/bin/python -I tools/tv.py --screenshot shots/01-before.png

What Does This Command Capture?

The command captures the TV's current screen through the authorized read-only connection. It saves the PNG as shots/01-before.png inside the CleanYourTV checkout.

  • Ask Claude to reveal shots/01-before.png in Finder.
  • Open shots/01-before.png from Finder.

You should see the TV's current stock Home in the PNG. You now have visible proof of the untouched starting point.

Screenshot Missing or Showing the Wrong Screen?

Confirm that the TV still accepts the authorized connection. Return the physical TV to its stock Home before capturing the file again.

Check that Claude ran the command from the CleanYourTV checkout. The PNG belongs at shots/01-before.png.

Help me fix the baseline screenshot.

Your TV is authorized and documented without a package or launcher change. Next, you will back up its current state before applying a learner-approved cleanup.

Back Up and Apply Approved Cleanup

Your read-only Claude Code probe confirmed that the TV is compatible. Your before screenshot also preserves the untouched stock Home.

Disabling packages without a trusted before-state creates guesswork during recovery. A reviewed package list gives the cleanup a clear approval boundary.

In this step, get ready to:
  • Create a dated package-state backup with a recovery plan.
  • Review every cleanup candidate before adding it to the approved list.
  • Disable the approved packages in small batches before testing the TV.
Create the recovery record

A CleanYourTV recovery record captures the TV state that must be restored if an approved change affects an essential feature. It must exist before Claude proposes the first package change.

  • Switch back to the Claude Code session from earlier.
  • Ask Claude to follow the Back up first section of PROMPT.md.
  • Ask Claude to create a dated recovery folder under backups/<dated-run>/.
  • Ask Claude to save the full package list in the dated recovery folder.
  • Ask Claude to save the existing disabled-package list in the dated recovery folder.
  • Ask Claude to save the system properties in the dated recovery folder.
  • Ask Claude to save the system settings in the dated recovery folder.

What makes this backup recoverable?

The full package list records what exists on the TV. The disabled-package list records which packages were already inactive.

The system properties identify the firmware state. The saved settings preserve configuration details that may matter during recovery.

  • Ask Claude to record the current HOME owner in the dated recovery folder.
  • Ask Claude to save a dated pre-change screenshot in the dated recovery folder.
  • Require Claude to display the exact backup paths.
  • Require Claude to present the recovery plan before proposing any package change.

That is your first safety win: a complete recovery path now exists before any package change.

Missing part of the recovery record?

  • Pause the cleanup if Claude has not reported one dated folder under backups.
  • Ask Claude to list every saved artifact with its full local path.
  • Compare the reported artifacts with the required backup contents above.

Ask for help checking my recovery record.

Review the approved package list

Package identifiers are fiddly because their names rarely match the labels on your TV. Claude can propose candidates, while you decide which named packages are safe to disable.

  • Ask Claude to present every candidate package as a checklist.
  • Ask Claude to explain the purpose of each candidate package.

Keep these TV functions protected

  • Every streaming app you use is protected.
  • HDMI services plus tuner input services are protected.
  • Settings plus the TV keyboard are protected.
  • Remote services plus Bluetooth services are protected.
  • Play services plus casting components are protected.
  • Voice-control components are protected.
  • Firmware-update components are protected.
  • Tell Claude to exclude every protected category from the candidate checklist.
  • Reject every guessed package name.
  • Reject every proposal involving an uninstall command, root action, or firmware change.
  • Approve only explicitly named nonessential packages.
  • Ask Claude to write the approved package names to approved-debloat.txt.
  • Ask Claude to display the completed approved-debloat.txt file.
  • Compare the displayed file with your approved checklist.

Why disable instead of uninstall?

CleanYourTV uses pm disable-user to change package state for user 0. The package remains installed on the TV.

The recovery record gives Claude the prior state needed to restore an approved package if an essential feature fails.

Your approval boundary is now concrete: approved-debloat.txt contains every package Claude may disable.

Apply the cleanup and test the TV

An ADB package-state change reaches the real TV through the authorized local connection. Manual mode makes this high-stakes moment manageable by keeping every command behind your approval.

  • Ask Claude to divide approved-debloat.txt into small verified batches.
  • Ask Claude to apply the first batch with tools/disable.sh through the existing TV_HOST connection.
  • Inspect the proposed command before granting Manual-mode approval.
  • Confirm every named package in the batch appears in approved-debloat.txt.
  • Approve the command in Manual mode.
  • Require Claude to report the repository safety-guard result after the batch.
  • Repeat the approval cycle for each remaining batch.
  • Ask Claude to wait at least 15 seconds before the reboot check.

Before you inspect the package state, do you expect any newly disabled package outside your approved list?

  • List every package currently disabled for user 0 by running this command:
tools/venv/bin/python -I tools/tv.py 'pm list packages -d --user 0'

What does this check show?

  • The tools/tv.py wrapper sends the package query through the authorized TV connection.
  • The -d option limits the output to disabled packages.
  • The --user 0 option scopes the result to the TV's primary user.
  • Compare the output with the pre-change disabled-package list in backups/<dated-run>/.
  • Confirm every newly disabled package appears in approved-debloat.txt.

Seeing an unapproved disabled package?

  • Stop before testing any other change.
  • Check whether the package already appeared in the saved pre-change disabled list.
  • Ask Claude to use the recovery record if the package was newly disabled without approval.

Help me compare the disabled-package output.

  • Open Settings using the physical remote.
  • Switch to one HDMI input using the physical remote.
  • Launch one favorite app using the physical remote.

Settings should open normally. The selected HDMI input should display its connected source.

Your favorite app should reach its normal opening screen. Successful navigation through these checks also proves the remote still works.

Did an essential function fail?

  • Stop the cleanup immediately.
  • Ask Claude to identify the approved batch that affected the failed function.
  • Ask Claude to restore the affected package from the recovery record.
  • Avoid adding an unverified workaround.

Help me recover an essential TV function.

Before you press Home for the final check, do you think disabling the approved packages changed which launcher owns the screen?

  • Press Home on the physical remote.

You'll still see the recognizably stock Home interface. The cleanup changed package state.

The stock launcher still owns the visible Home experience. That intended shortfall is the limitation the next step solves.

  • Ask Claude to capture the current stock Home as shots/02-debloated-stock-home.png using the existing screenshot workflow.
  • Open shots/02-debloated-stock-home.png from the shots folder in Finder.

You now have visible proof that the approved cleanup preserved essential functions. The screenshot also captures the stock Home limitation before launcher replacement.

Your package cleanup is approved, reversible, and tested. Next, you'll replace the remaining stock Home with the clean app-first interface.

Install and Personalize Clean Home

Your approved cleanup is applied. The stock Home still controls what appears when you press Home.

Package cleanup cannot create an app-first interface. The guarded CleanYourTV launcher handover checks the replacement before assigning Home.

In this step, get ready to:
  • Install CleanYourTV 3.3 through the guarded launcher handover.
  • Apply the built-in minimal theme before arranging your favorite apps.
  • Verify essential controls before capturing the personalized Home.
Install the guarded launcher

A HOME launcher is the app that responds when you press Home. The repository installer validates the replacement before changing that owner.

This handover touches the TV's main navigation, so your saved recovery record remains the safety net throughout.

  • Switch back to the Claude Code session from earlier.
  • Ask Claude to rerun the repository compatibility checks.

Claude should still report a compatible TV with launcher support. Stop here if that result has changed.

  • Use your recorded TV address in place of <TV-IP> in the command below.
  • Ask Claude to build and install the launcher by running this command:
TV_HOST=<TV-IP> launcher/build-and-install.sh

What does this command do?

  • The TV_HOST value limits this installation to your recorded TV.
  • The launcher/build-and-install.sh script validates compatibility plus the Android SDK state.
  • The script builds the launcher APK before installing it.
  • The script checks whether the replacement owns Home.
  • The rollback guard restores the previous Home owner if the replacement cannot take control.
  • Review each command shown by Manual mode.
  • Approve a command only when it belongs to the explained installer workflow.
  • Reject any proposal that bypasses a failed check.
  • Confirm the script ends with Installed. Press Home on the remote to see it.
  • Confirm Claude reports com.gathin.tvhome/.MainActivity as the current HOME owner.

That handover is complete. Your TV now has a verified replacement ready for the physical Home button.

Did a launcher check fail?

  • Stop at the failed check.
  • Keep the stock Home active.
  • Ask Claude to explain the failed compatibility gate without bypassing it.

Share the reported check with AI by selecting help me understand this launcher check.

Apply the minimal theme and arrange your apps

The launcher controls which apps appear on Home. Its theme controls how that Home looks.

  • Use your recorded TV address in place of <TV-IP> in the command below.
  • Ask Claude to apply the built-in minimal theme by running this command:
TV_HOST=<TV-IP> tools/theme.sh themes/minimal

What does this command do?

  • The TV_HOST value targets the same authorized TV.
  • The tools/theme.sh script applies a built-in launcher theme.
  • The themes/minimal value selects the quiet minimal look included with CleanYourTV 3.3.
  • Review the device-changing command when Manual mode requests approval.
  • Approve the command after confirming the TV address.
  • Press the physical Home button on your remote.

You should see the CleanYourTV Home using its quiet minimal appearance.

Still seeing the previous theme?

  • Confirm the theme command used the same TV address as the launcher installation.
  • Confirm the command contains themes/minimal.
  • Press the physical Home button again after the command finishes.

Select help me troubleshoot the minimal theme for help checking the current theme.

Tile order turns the minimal screen into a Home that matches how you watch TV. The physical remote keeps this personalization separate from the debugging connection.

  • Hold OK on a Home tile.
  • Choose Move from the tile menu.
  • Use the arrow buttons to place the app in your first row.
  • Press Back to put the tile down.
  • Repeat the Move action for every favorite app you want first.
  • Press Home to return focus to the personalized launcher.

Your favorite apps should now appear first on the minimal Home. The launcher reflects the routes you use most often.

Test the remote and capture the clean Home

A replacement Home is ready only when the physical controls still reach every essential TV function. This test checks the paths protected in your approved package list.

Before you test, do you expect every physical control to behave the same after the Home handover?

  • Press the physical Home button.
  • Launch your first favorite app.
  • Press the physical Back button.
  • Launch your second favorite app.
  • Press the physical Home button.
  • Launch your third favorite app.

You should be able to launch all three apps. Home should return to the minimal launcher.

  • Open Settings using the TV remote.
  • Press the physical Input button.
  • Select one HDMI input.
  • Adjust the volume using the physical volume buttons.
  • Test every app shortcut button you use on the remote.

Settings should open normally. Your selected HDMI source should display while the remaining physical buttons continue to respond.

Did an essential action fail?

  • Stop testing immediately.
  • Ask Claude to use the saved recovery record.
  • Reject any unverified workaround that changes another package or firmware setting.

Select help me recover this essential TV function for recovery guidance.

The final screenshot records the launcher only after every essential check passes.

  • Press the physical Home button.
  • Ask Claude to capture the current TV screen as shots/03-clean-home.png.
  • Confirm Claude reports that shots/03-clean-home.png was saved.

You should see the minimal CleanYourTV Home with your favorite apps arranged first. That is your verified personalized Home.

Your clean Home is installed, personalized, and tested through the physical remote. Next up, you will prove the recovery path before reapplying this result and closing network debugging.

Prove Recovery and Lock ADB

Your personalized TV Home works, but the recovery record still needs a live test on the real TV. This proof makes the supervised Claude Code workflow genuinely reversible.

After the restore passes, you'll reapply CleanYourTV 3.3 with your layout. You will then close ADB access so the TV no longer accepts network shell connections.

In this step, get ready to:
  • Prove that the saved recovery record returns the original launcher and package state.
  • Reapply the approved cleanup with the personalized minimal Home.
  • Prove that every recorded network debugging port refuses connections.
Restore the original TV state

A recovery record earns your trust when it restores the real device. Restoring the stock Home may feel like you are undoing your work, but your approved list and personalized setup remain available on the Mac.

Before you run the restore, do you expect the physical Home button to open the stock launcher or the CleanYourTV launcher?

  • Return to the ordinary Terminal window in the existing cleanyourtv directory.
  • Replace <TV-IP> in the command below with the recorded TV address.
  • Replace <approved-list> with approved-debloat.txt.
  • Restore the original package and Home state by running this command:
TV_HOST=<TV-IP> tools/restore.sh <approved-list>

What does the restore do?

  • The TV_HOST value directs the repository workflow to your authorized TV.
  • The restore script uses the saved recovery record to return each approved package to its previous state.
  • The same recovery record returns Home control to the launcher that owned it before the cleanup.
  • Press the physical Home button on the TV remote.
  • Return to the existing Claude Code session.
  • Ask Claude to compare the restored package state with the records in backups/<dated-run>/.
  • Confirm that the report shows the original package state.
  • Ask Claude to capture the restored stock Home as shots/04-restored.png with the repository screenshot workflow.
  • Review the proposed screenshot command before approving it in Manual mode.

You should see the original launcher when you press Home. The restored-state comparison should match the package state saved before cleanup.

That is the recovery proof that matters. Your backup has now restored the real TV instead of sitting untested on the Mac.

Original Home did not return?

  • Stop before reapplying the cleanup.
  • Keep debugging enabled while you investigate the incomplete restore.
  • Ask Claude to compare the recovery record with the current Home owner and package state.

Use Help me diagnose an incomplete CleanYourTV restore if the restored state does not match the backup.

Reapply the clean Home

The successful restore proves that your escape route works. You can now reapply the same reviewed cleanup without introducing new package decisions.

  • Replace <TV-IP> in each command below with the same recorded TV address.
  • Replace <approved-list> with approved-debloat.txt.
  • Reapply the approved cleanup, launcher, and minimal theme by running these commands:
TV_HOST=<TV-IP> tools/disable.sh <approved-list>
TV_HOST=<TV-IP> launcher/build-and-install.sh
TV_HOST=<TV-IP> tools/theme.sh themes/minimal

What does this reapply?

  • The disable script applies only the package names in your reviewed approved-debloat.txt file.
  • The launcher script builds and installs CleanYourTV before checking that com.gathin.tvhome/.MainActivity owns Home.
  • The theme script restores the built-in themes/minimal appearance.

The launcher workflow should complete with com.gathin.tvhome/.MainActivity as the Home owner. Its final message should include Installed. Press Home on the remote to see it.

Before you press Home, which launcher do you expect the physical button to open now?

  • Press the physical Home button on the TV remote.

You should see the CleanYourTV minimal Home again. This confirms that Home control has returned to the replacement launcher.

  • Hold OK on a Home tile that needs repositioning.
  • Choose Move from the tile menu.
  • Use the remote arrows to return the app to its preferred position.
  • Press Back to place the tile.
  • Repeat the tile movement until your favorite apps appear first.

What have you re-established?

The TV now has the same approved package state and minimal theme that passed your earlier checks. Restoring the favorite-app order completes the visible reapplication.

  • Test the physical Home button.
  • Test the physical Back button.
  • Open Settings.
  • Open one HDMI input.
  • Launch three favorite apps.
  • Test the volume controls.
  • Test the app shortcut buttons.
  • Capture the final personalized Home by running this command:
tools/venv/bin/python -I tools/tv.py --screenshot shots/99-final.png

What does this capture prove?

The screenshot workflow saves the current TV screen as shots/99-final.png. It records the reapplied minimal Home before debugging is closed.

You should find shots/99-final.png with the personalized minimal Home visible. Your physical controls and essential apps should still pass the same checks as before the restore.

Clean Home did not return correctly?

  • Stop before closing debugging if the Home owner is different from com.gathin.tvhome/.MainActivity.
  • Use the tested recovery record if an essential control or app fails.
  • Keep the final screenshot only after the personalized Home passes every check.

Use Help me verify the CleanYourTV reapplication if the reapplied state differs from the earlier verified setup.

Close network debugging

Customization is complete, so the network debugging route has no remaining job. The closure test only counts an actively refused connection as proof that a port is closed.

  • Check for an active Wireless debugging connection port by running this command before turning debugging off:
adb mdns services

Why check before closing debugging?

Wireless debugging can use a connection port other than 5555. Recording that port now lets you test every route that was active during the project.

  • Record the active Wireless debugging connection port here if one appears: your Wireless debugging port.

Closing debugging can feel final because it removes the Mac's device-control route. Your restore and reapply tests are already complete, so this action only removes access you no longer need.

  • Return to the TV's Developer options from earlier.
  • Turn off Wireless debugging if it is present.
  • Turn off Network or ADB debugging if it is present.
  • Turn off USB debugging.
  • Revoke the TV's debugging authorizations.
  • Switch back to an ordinary Terminal window with macOS Local Network permission.

Before you check the ports, do you expect the TV to accept the connections or refuse them?

  • Replace <TV-IP> in the optional command below with the recorded TV address.
  • Replace <noted-port> with the Wireless debugging port you recorded.
  • Check the recorded Wireless debugging port by running this command if one existed:
tools/adb-closed.py <TV-IP> <noted-port>

What does the port checker prove?

The repository checker distinguishes an actively refused connection from an inconclusive network failure. A refusal proves that the TV is reachable but no debugging service is listening on that port.

For the recorded Wireless debugging port, you should see output ending with is closed: the TV refused the connection.

  • Replace <TV-IP> in the command below with the recorded TV address.
  • Check the legacy network debugging port by running this command:
tools/adb-closed.py <TV-IP> 5555

Why check port 5555?

Port 5555 is the documented legacy ADB over TCP port. Checking it confirms that the common network shell route no longer accepts connections.

You should see output ending with is closed: the TV refused the connection. A timeout or No route to host remains inconclusive.

Did the checker return an inconclusive result?

  • Confirm that the Mac still has access to the same trusted home network as the TV.
  • Confirm that Terminal has macOS Local Network permission.
  • Repeat the check only after the TV is reachable on the local network.

Use Help me interpret the ADB closure result if the tool does not report an actively refused connection.

  • Restart the TV with its physical remote or power menu.
  • Wait until the personalized minimal Home is visible again.

Before you repeat the final check, do you expect the restart to reopen port 5555 or leave it closed?

  • Repeat the port 5555 closure check by running this command:
tools/adb-closed.py <TV-IP> 5555

Why repeat the check after restart?

The restart proves that the debugging service stays closed across a fresh TV boot. This final check turns a temporary setting change into durable security evidence.

You should again see output ending with is closed: the TV refused the connection. The personalized CleanYourTV Home should still open with debugging disabled.

You have proved both sides of the safety promise. The original state can be restored on demand, while the finished TV keeps its personalized Home without an exposed ADB port.

Secret mission

Beat Your Remote-Only Baseline

Your personalized Home already puts favorite apps within reach. Measure three everyday routes, rearrange the tiles with only your physical remote, and prove that the new layout takes less work while debugging stays closed.

Clean Up Your Resources

Clean Up Your Resources

No new paid subscription or cloud resource was created during this project. It uses your existing paid plan plus storage on your Mac and TV. Decide whether to keep the personalized Home, pause with the tested stock state, or remove the project entirely.

Resources you used:

  • The CleanYourTV 3.3 launcher with the built-in themes/minimal theme on your TV.
  • The approved package state recorded in approved-debloat.txt.
  • The cleanyourtv repository checkout with its Python virtual environment at tools/venv.
  • The tested recovery record under backups/<dated-run>/.
  • The screenshot evidence under shots/, including shots/01-before.png, shots/02-debloated-stock-home.png, shots/03-clean-home.png, shots/04-restored.png, and shots/99-final.png.
  • The remote-only baseline record with improved results for three repeatable tasks.

Keep everything running

Keeping your current setup requires no further action. Choose this option if the personalized Home is working well for your household.

  • Leave the optimized CleanYourTV tile layout in place.
  • Keep ADB debugging disabled.
  • Keep debugging authorizations revoked.
  • Store approved-debloat.txt beside backups/<dated-run>/.
  • Retain every file under shots/ as evidence of the tested restore path.

Pause - I'll come back to this later

Pausing returns the TV to its tested stock state while preserving every Mac file for a later reapply. Restoring Home can feel drastic, but you already proved this exact recovery record on the real TV.

  • Temporarily enable the same network debugging method you used earlier.
  • Approve this Mac if the TV asks for debugging authorization.
  • Switch back to the Terminal session in the cleanyourtv checkout from earlier.
  • Restore the tested recovery state by running:
TV_HOST=<TV-IP> tools/restore.sh <approved-list>

What Does the Restore Change?

This command uses the saved recovery record that already returned the original package state and stock Home during your rollback test.

Did the Restore Stop?

  • Keep the TV powered on.
  • Confirm the Mac shares the trusted home network with the TV.
  • Confirm the TV accepted this Mac's debugging authorization.

Help me diagnose the CleanYourTV restore workflow without bypassing its safety checks.

  • Press Home on the physical remote.

You should see the original stock Home again. This confirms the tested recovery state is active.

  • Open Settings with the physical remote.
  • Open one HDMI input with the physical remote.
  • Launch one favorite streaming app with the physical remote.

Each essential function should behave normally on the restored TV.

  • Turn off the network debugging method you temporarily enabled.
  • Turn off USB debugging.
  • Revoke debugging authorizations.
  • Return to the Terminal session from earlier.
  • Skip the second command below if you did not record a Wireless debugging port.
  • Check the closed debugging ports by running these commands:
tools/adb-closed.py <TV-IP> 5555
tools/adb-closed.py <TV-IP> <noted-wireless-debugging-port>

What Do These Checks Prove?

  • The first command checks the standard network debugging port.
  • The second command checks the recorded Wireless debugging port when one existed.
  • Each checked port must report is closed: the TV refused the connection..

Is the Result Inconclusive?

  • Keep every debugging setting disabled on the TV.
  • Confirm macOS allows Terminal to access the local network.
  • Repeat the affected port check.

Help me investigate an inconclusive ADB closure check without reopening debugging.

  • Keep the cleanyourtv checkout for a later reapply.
  • Keep backups/<dated-run>/ with approved-debloat.txt.
  • Keep every screenshot under shots/.

That gives you a safe pause point. Your TV is back on stock Home while the proven recovery evidence stays available.

Delete - I don't want to use this again

Deletion removes the launcher plus the local project records. The TV returns to its tested stock state before you remove any recovery evidence from your Mac.

  • Temporarily enable the same network debugging method you used earlier.
  • Approve this Mac if the TV asks for debugging authorization.
  • Switch back to the Terminal session in the cleanyourtv checkout from earlier.
  • Restore the tested recovery state by running:
TV_HOST=<TV-IP> tools/restore.sh <approved-list>

Why Restore Before Deleting?

The recovery record returns the original launcher and package state before CleanYourTV is removed. This preserves the escape route until the stock TV experience has passed its checks.

Did the Restore Stop?

  • Keep the TV powered on.
  • Confirm the Mac shares the trusted home network with the TV.
  • Confirm the TV accepted this Mac's debugging authorization.

Help me diagnose the restore before I remove any recovery files.

  • Press Home on the physical remote.

You should see the original stock Home. Do not remove the launcher or local files until this result appears.

  • Open Settings on the TV.
  • Select Apps.
  • Select CleanYourTV from the installed apps.
  • Choose the app-removal option shown by your TV.
  • Confirm the removal.
  • Press Home on the physical remote.

You should remain on the stock Home after CleanYourTV is removed.

  • Open Settings with the physical remote.
  • Open one HDMI input with the physical remote.
  • Launch one favorite streaming app with the physical remote.

Each essential function should still work before you delete the Mac files.

  • Turn off the network debugging method you temporarily enabled.
  • Turn off USB debugging.
  • Revoke debugging authorizations.
  • Return to the Terminal session from earlier.
  • Skip the second command below if you did not record a Wireless debugging port.
  • Check the closed debugging ports by running these commands:
tools/adb-closed.py <TV-IP> 5555
tools/adb-closed.py <TV-IP> <noted-wireless-debugging-port>

What Confirms a Closed Port?

Each checked port must report is closed: the TV refused the connection.. A timeout does not prove that the port is closed.

Is the Port Check Unclear?

  • Keep every debugging setting disabled on the TV.
  • Confirm macOS allows Terminal to access the local network.
  • Repeat the affected port check.

Help me resolve an inconclusive port check before I delete the recovery files.

  • Use Finder to locate the cleanyourtv checkout used for this project.
  • Move the cleanyourtv checkout to Trash.
  • Use the reported backup paths to locate backups/<dated-run>/ if it remains outside the checkout.
  • Move the external backups/<dated-run>/ folder to Trash if it still exists.
  • Empty Trash after the TV passes every stock-state check.

Your cleanup is complete once the TV works normally and every checked debugging port refuses connections. The local launcher files plus recovery records are now removed.

Nice Work!

Nice Work!

You did it! Your TV now opens a personalized CleanYourTV Home that stays recoverable through a tested rollback.

You've learned how to:

  • Supervise Claude Code in Manual mode while it checks a real Android TV or Google TV against a compatibility gate. You kept approval over every device-changing action.
  • Build a package-state backup and recovery record before disabling only packages recorded in approved-debloat.txt. You proved the rollback on the real TV with shots/04-restored.png. You then reapplied the approved state safely.
  • Install CleanYourTV version 3.3 as the Home app. You personalized it with themes/minimal. You verified Home, Settings, playback, favorite apps, and HDMI input. You captured the finished Home in shots/99-final.png. You closed ADB after customization. You proved each checked network port refused connections after restarting the TV.
  • Secret Mission: Measure a remote-only baseline for three repeatable tasks. Rearrange the tiles with only the physical remote. Keep debugging off throughout. Retain the faster layout after a final remote-only function check.

Ready to quiz yourself?