Skip to content

JohnWayneeee/cleantv / skills/android-tv-setup

android-tv-setup

Unverified

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 performance, set picture and sound like a calibrator, replace the home screen with a clean Apple TV style launcher, and set up a YouTube DPI bypass (ByeByeDPI) where the ISP throttles YouTube, verifying every step with screenshots from the TV. Use when the user wants to debloat, clean up, speed up, configure, calibrate or replace the launcher on an Android TV / Google TV set or box (Xiaomi, TCL, Hisense, Sony, Philips, CHiQ/Changhong, Haier, Nvidia Shield and others). Not for Samsung Tizen, LG webOS or Fire TV launchers.

FileKindSize
SKILL.mdskill md7.1 KB
launcher/app/build.gradleother482 B
launcher/app/src/main/AndroidManifest.xmlconfig2.2 KB
launcher/app/src/main/assets/fonts/OFL.txtmarkdown4.3 KB
launcher/app/src/main/assets/fonts/Onest.ttfbinary188.5 KB
launcher/app/src/main/java/com/cleantv/launcher/AppRepository.javaother4.5 KB
launcher/app/src/main/java/com/cleantv/launcher/GlassHighlight.javaother2.8 KB
launcher/app/src/main/java/com/cleantv/launcher/MainActivity.javaother29.2 KB
launcher/app/src/main/java/com/cleantv/launcher/ShimmerDrawable.javaother2.1 KB
launcher/app/src/main/java/com/cleantv/launcher/SkeletonAdapter.javaother2.4 KB
launcher/app/src/main/java/com/cleantv/launcher/TileAdapter.javaother3.0 KB
launcher/app/src/main/res/drawable/banner.xmlconfig491 B
launcher/app/src/main/res/drawable/ic_input.xmlconfig472 B
launcher/app/src/main/res/drawable/ic_settings.xmlconfig1.2 KB
launcher/app/src/main/res/drawable/ic_wifi.xmlconfig489 B
launcher/app/src/main/res/layout/activity_main.xmlconfig7.3 KB
launcher/app/src/main/res/layout/item_tile.xmlconfig1.0 KB
launcher/app/src/main/res/values/config.xmlconfig2.2 KB
launcher/app/src/main/res/values/strings.xmlconfig696 B
launcher/app/src/main/res/values/styles.xmlconfig1.1 KB
launcher/build.gradleother74 B
launcher/gradle.propertiesother109 B
launcher/gradle/wrapper/gradle-wrapper.jarbinary42.7 KB
launcher/gradle/wrapper/gradle-wrapper.propertiesother251 B
launcher/gradlewother8.5 KB
launcher/gradlew.batscript2.8 KB
launcher/settings.gradleother332 B
references/connect.mdmarkdown3.1 KB
references/debloat.mdmarkdown4.0 KB
references/devices/mediatek-mt5889-homwee.mdmarkdown9.6 KB
references/devices/skyworth-m7332.mdmarkdown6.9 KB
references/dpi-bypass.mdmarkdown4.5 KB
references/finish.mdmarkdown2.5 KB
references/launcher.mdmarkdown7.9 KB
references/performance.mdmarkdown3.1 KB
references/picture.mdmarkdown5.5 KB
references/privacy.mdmarkdown5.2 KB
references/questions.mdmarkdown11.6 KB
references/sound.mdmarkdown2.9 KB
scripts/adb-closed.pyscript893 B
scripts/appops.pyscript1.2 KB
scripts/backup.pyscript3.2 KB
scripts/build-install.shscript2.9 KB
scripts/disable.pyscript3.0 KB
scripts/privacy.pyscript5.4 KB
scripts/restore.pyscript1.5 KB
scripts/scan.pyscript2.4 KB
scripts/setting.pyscript1.9 KB
scripts/snapshot.pyscript1.9 KB
scripts/tv.pyscript1.8 KB
scripts/tvlib.pyscript2.4 KB

scripts/backup.py

View on GitHub
#!/usr/bin/env python3
"""Save the TV's original state to ./backup before anything is changed.

  backup.py          # refuses to overwrite an existing backup
  backup.py --force

Prints a one-screen device summary at the end.
"""
import os
import re
import sys

sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
from tvlib import BACKUP, ensure_backup_dir, packages, sh  # noqa: E402

HOME_Q = "-a android.intent.action.MAIN -c android.intent.category.HOME"


def save(name, text):
    with open(os.path.join(BACKUP, name), "w", encoding="utf-8", newline="\n") as f:
        f.write(text.rstrip("\n") + "\n")


def main(argv):
    if os.path.exists(os.path.join(BACKUP, "getprop.txt")) and "--force" not in argv:
        sys.exit("backup/ already exists; it holds the original state. Use --force only on purpose.")
    ensure_backup_dir()
    save("packages-full.txt", sh("pm list packages -f -U"))
    save("packages-system.txt", "\n".join(packages("-s")))
    save("packages-3rdparty.txt", "\n".join(packages("-3")))
    save("packages-disabled-before.txt", "\n".join(packages("-d")))
    save("getprop.txt", sh("getprop"))
    for ns in ("system", "secure", "global"):
        save(f"settings-{ns}.txt", sh(f"settings list {ns}"))
    save("home-activities.txt", sh(f"cmd package query-activities --brief {HOME_Q}"))
    stock = sh(f"cmd package resolve-activity --brief {HOME_Q}").splitlines()[-1].strip()
    save("stock-home.txt", stock)
    save("launchable.txt", sh("cmd package query-activities --brief -a android.intent.action.MAIN "
                              "-c android.intent.category.LEANBACK_LAUNCHER"))
    owners = sorted(set(re.findall(r"cname=(\S+)", sh("dumpsys wifi"))))
    save("wifi-owner.txt", "\n".join(owners))
    save("display.txt", sh("wm size; wm density; echo forced=$(settings get secure display_density_forced)"))
    save("meminfo.txt", sh("cat /proc/meminfo | head -3; dumpsys meminfo | sed -n '/Total PSS by process/,/Total PSS by OOM/p' | head -40"))

    p = {}
    for line in open(os.path.join(BACKUP, "getprop.txt"), encoding="utf-8"):
        m = re.match(r"\[(.+?)\]: \[(.*)\]", line)
        if m:
            p[m.group(1)] = m.group(2)
    ram = sh("grep MemTotal /proc/meminfo")
    summary = [
        f"brand/model : {p.get('ro.product.brand')} {p.get('ro.product.model')} ({p.get('ro.product.manufacturer')})",
        f"device/board: {p.get('ro.product.device')} / {p.get('ro.board.platform') or p.get('ro.hardware')}",
        f"android     : {p.get('ro.build.version.release')} (SDK {p.get('ro.build.version.sdk')})",
        f"fingerprint : {p.get('ro.build.fingerprint')}",
        f"abi         : {p.get('ro.product.cpu.abi')}",
        f"ram         : {ram}",
        f"adb.secure  : {p.get('ro.adb.secure')}",
        f"stock home  : {stock}",
        f"wifi owner  : {', '.join(owners) or '-'}",
        f"google tv   : {'yes' if 'launcherx' in stock else 'no'}",
        f"vendors     : {', '.join(sorted({'.'.join(x.split('.')[:2]) for x in packages('-s') if x.count('.') >= 2 and not x.startswith(('com.android', 'com.google', 'android'))}))}",
    ]
    save("device.txt", "\n".join(summary))
    print("\n".join(summary))
    print(f"\nbackup saved to {BACKUP}")


if __name__ == "__main__":
    main(sys.argv[1:])
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 196kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 193kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 193kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 193kUpdated Claude CodeCodexVerifiedInstall