Skip to content

Customize Your TV with Claude Code

Category Creative & Real-World AI Builds
Status ๐ŸŸก Partially completed
Repo nextwork-customize-your-tv-with-claude-code
Original NextWork guide nextwork.ai

Learning project

Practice work following a NextWork guide, separate from my production projects.

๐Ÿ“š NextWork learning project. This is a practice project I built while working through NextWork's Customize Your TV with Claude Code guide. It is part of my Learning portfolio and is fully separate from my production projects.

Category: Learning โ€บ Creative & Real-World AI Builds
Status: ๐ŸŸก Partial

Overview

Customizing a TV over ADB is easy to get wrong and hard to undo. This project is mostly safety rails: look before touching, save a recovery record first, change only an approved list in small batches, prove the restore works, then close the debugging port.

Summary

The supervised cleanup workflow is built and runs end to end against a simulated Android TV: a read-only probe, a dated recovery record, a reviewed approved list disabled in small batches (with a guard that refuses essential packages), a guarded launcher handover, a verified restore, reapply, and an ADB lock-down that's proven by a refused connection. No real TV was touched.

The checks behind this are in docs/verification.txt.

Skills & tools

Python, ADB / Android, Change management, Reversible operations, Simulation

What I built

  • tv.py: probe (read-only model/SDK/firmware/HOME owner), backup (dated recovery record), candidates, disable LIST (batches of 3, refuses protected packages), launcher (install, verify, then hand over HOME), restore RECORD (verified against the record), lock (disables ADB and proves the connection is refused), and screenshot.
  • faketv.py: a stateful simulated TV that answers the same adb shell commands. Real TVs use --host IP:PORT through the real adb binary.
  • demo.sh: the guide's whole flow in order, from probe to before shot, backup, review, guard test, batch disable, launcher, restore, reapply, final shot, and ADB lock.

How to run

bash demo.sh                                   # simulated TV
# real TV (after enabling network debugging and pairing with `adb pair`):
python tv.py --host 192.168.1.50:5555 probe

Verification

I ran the verification command on 2026-12-02. The full output is in docs/verification.txt.

mkdir -p docs && PYTHON=/workspace/nextwork-portfolio/.venv/bin/python bash demo.sh | tee docs/demo-run.txt && grep -q 'restore verified' docs/demo-run.txt && grep -q 'refused (good)' docs/demo-run.txt

Notes

The guide uses the CleanYourTV repository's own scripts (tools/tv.py, disable.sh, restore.sh, theme.sh) on a Mac. I rebuilt the same safety sequence as one small Python CLI.

What isn't done, and why

There's no TV. Everything ran against a simulated Android TV, so there are no real screenshots, the remote-control checks (Settings, HDMI input, three favorite apps) weren't done, and the secret mission (timing three remote routes and rearranging tiles with the physical remote) needs the real TV and remote. The guide also uses Claude Code to drive the workflow, and I wrote the CLI myself. To finish, run tv.py --host against your own TV, following demo.sh's order.


Original project: https://nextwork.ai/projects/d1f93300-eaec-401a-876c-d627e974a28b ยท Part of my NextWork Learning portfolio (hub).

Verification output

From docs/verification.txt:

$ mkdir -p docs && PYTHON=/workspace/nextwork-portfolio/.venv/bin/python bash demo.sh | tee docs/demo-run.txt && grep -q 'restore verified' docs/demo-run.txt && grep -q 'refused (good)' docs/demo-run.txt

== 1. read-only probe
model                        Demo Google TV 55 (simulated)
android                      12
sdk                          31
firmware                     STVM.240905.001
home_owner                   com.google.android.apps.tv.launcherx/.home.HomeActivity
third_party_home_supported   True
read-only probe: no package or setting was changed
== 2. before screenshot
shots/01-before.png [screenshot: home=com.google.android.apps.tv.launcherx, disabled=0]
== 3. dated backup
record: backups/recovery-2026-12-02.json
== 4. cleanup candidates
candidate (needs your approval): com.google.android.play.games
candidate (needs your approval): com.google.android.tvrecommendations
candidate (needs your approval): com.vendor.adplatform
candidate (needs your approval): com.vendor.shoppingchannel
# approved after review (kept play.games):
com.google.android.tvrecommendations
com.vendor.adplatform
com.vendor.shoppingchannel
== 5. guard: a list with an essential package is refused
== 6. disable approved packages in batches
Package com.google.android.tvrecommendations new state: disabled-user
Package com.vendor.adplatform new state: disabled-user
Package com.vendor.shoppingchannel new state: disabled-user
batch 1 done; check Settings, HDMI input and voice on the TV before the next batch
== 7. guarded launcher handover
Success
Success: set home activity
home_owner                   com.cleanyourtv.launcher/.Home
== 8. restore from the recovery record
Package com.google.android.tvrecommendations new state: enabled
Package com.vendor.adplatform new state: enabled
Package com.vendor.shoppingchannel new state: enabled
Success: set home activity
restore verified: package state and HOME match the recovery record
shots/02-restored.png [screenshot: home=com.google.android.apps.tv.launcherx, disabled=0]
== 9. reapply cleanup + launcher
shots/99-final.png [screenshot: home=com.cleanyourtv.launcher, disabled=3]
== 10. lock ADB
network debugging disabled; connection refused as expected
probe after lock: refused (good)
refusing: approved list contains protected packages ['com.android.tv.settings']

[exit code 0]