android-tv-setup
Set up an Android TV or Google TV over network ADB - back up, debloat with the owner's choices, switch off screen recognition (ACR) and take the microphone and camera away from vendor apps, tune perfo
SKILL.mdskills/android-tv-setup/SKILL.md
GitHubAndroid TV setup
Work on the real device, step by step. Every change is reversible and verified with a screenshot or a
command that proves it. Ask the owner before anything that depends on taste or on how they use the TV.
The question bank is references/questions.md; ask each question at its phase, in the owner's language,
with checklist/option UI when available.
Layout
scripts/- helpers, run from the TV's work directory. Python 3, no packages needed.launcher/- the launcher source (Java, AndroidX RecyclerView). Copied into each TV's work directory.references/- one file per phase, read it when you reach that phase.- Work directory per TV:
tvs/<brand-model>/next to the skill's repo (or the current project). It holds.tv(one lineIP:5555),backup/,shots/,debloat/,launcher/and the TV'sREADME.md.backup/andshots/contain device identifiers: never publish them.
Run scripts as python <skill>/scripts/<name>.py with the work directory as the current directory.
| Script | Purpose |
|---|---|
scan.py |
find TVs on the LAN (ADB and Cast ports) |
tv.py |
shell command, key presses, screenshots |
backup.py |
save the original state, print a device summary |
disable.py |
disable a package list, refuses core/factory/Wi-Fi-owner packages, logs for restore |
setting.py |
change settings, records original values for restore |
snapshot.py |
find which settings key a TV menu item writes (save, change one item, diff) |
appops.py |
restrict background running for apps, logs for restore |
privacy.py |
list ACR/ad packages and apps holding the mic or camera; block mic and camera; blocking DNS with a proof check; logs for restore |
restore.py |
undo everything: packages, settings, app ops, Home |
build-install.sh |
build the launcher, install, set as Home, print who really holds Home |
adb-closed.py |
prove network ADB is closed at the end |
Phases
- Connect -
references/connect.md. Find the TV, connect ADB, tell the owner when the "Allow debugging?" prompt appears and to tick "Always allow". Ask the connection questions (Q-C*). - Back up -
scripts/backup.pybefore any change. Read the summary aloud: brand, Android version, RAM, Google TV or not, who owns the saved Wi-Fi network. - Debloat -
references/debloat.md. Sort packages, ask Q-D*, disable in small batches, screenshot after each batch. - Privacy -
references/privacy.md. Mandatory on every TV, never skipped. Scan withscripts/privacy.py, have the owner switch off ACR / viewing information / ad ID in the menu (screenshots), disable proven ACR packages, block the mic and camera for vendor apps, turn on blocking DNS (privacy.py dns on). Ask Q-R*. - Performance -
references/performance.md. Measure memory first, ask Q-P*, apply, measure again. - Launcher -
references/launcher.md. Ask Q-L*, build, install, take over Home. On Google TV this involves the setup wizard and the Wi-Fi owner: follow the file exactly. Verify the cold-start skeletons perlauncher.mdsection 5a. For owners in Russia (timezone/locale) or with slow YouTube, ask Q-B* and set up ByeByeDPI perreferences/dpi-bypass.mdbefore building, so the launcher can start it only while YouTube is open. - Picture -
references/picture.md. Ask Q-V*, discover the vendor's keys, apply a calibrated profile, verify in the TV's own menu. - Sound -
references/sound.md. Ask Q-S*, apply, verify. - Reboot check - reboot once. Confirm Home, network, the disabled list, the settings and the mic/camera app ops survived.
- Finish -
references/finish.md. Write the TV's README (with a Privacy section), close network ADB, prove it is closed.
Remote buttons (app keys, gear/dashboard key, remapping, Bluetooth remotes) are a separate module that is
not part of this version. Record which buttons stopped working (getevent -lt + logcat) and tell the owner.
Hard rules
- Back up first. Never uninstall system packages:
pm disable-user --user 0only, onepmcall per shell call. - Never disable Android core packages (see
references/debloat.md) or anything the TV needs to show a picture, switch inputs, pair the remote, type, or install apps. When a vendor package name is unclear, readdumpsys package <pkg>(activities, services, receivers, permissions); ask the owner if still unclear. - Never launch, even read-only, a package whose name says factory/fac/AT/production. Some boards flip a factory flag when one starts and lose the Input key, CEC and Play services on the next boot.
- Before disabling a package, check
dumpsys wifi | grep -o 'cname=[^ ]*'. Android deletes the saved network of a disabled owner and the TV drops off Wi-Fi and ADB.disable.pyrefuses; the owner must forget and re-join the network in Settings first. The TV may get a new IP afterwards. - Disable in small batches and screenshot between them. After the last batch, reboot and compare
pm list packages -dwithbackup/disabled-by-us.txt. - If
pm disable-useris refused for every package, stop debloating and say so. Offer DNS blocking and the TV's own privacy toggles instead. set-home-activitycan printSuccessand change nothing. Onlydumpsys activity activities | grep mFocusedAppafter pressing Home proves the takeover. If Home goes black, re-enable the stock launcher at once.- Settings writes must be verified: read the value back and look at the TV's menu (screenshot). A vendor key
that changes in
settingsbut not on screen was not applied. - Live TV, HDMI and DRM apps give 0-byte screenshots. That is the TV, not a fault: check
dumpsys activity activities | grep topResumedActivityinstead. - The privacy phase is not optional. If the owner declines a step, record it in the TV's README as declined.
Menu toggles are not proof: verify with
privacy.py scanandpm list packages -d. - Keep it light: TVs have 1-3 GB of RAM. The launcher has no blur, no video, no network polling.
- Finish by closing network ADB: port 5555 is plaintext and gives a shell to authorised keys on the LAN.
Reporting
After each phase tell the owner, briefly: what changed, how it was verified, how to undo it.
Write per-TV knowledge (package meanings, vendor settings keys, quirks) into references/devices/<board>.md
so the next TV of the same family goes faster.