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/disable.py

View on GitHub
#!/usr/bin/env python3
"""Disable the packages listed in a file (one per line, # comments), one pm call each.

  disable.py debloat/batch1.txt

Each package that ends up disabled is appended to backup/disabled-by-us.txt, which restore.py reads.
The script refuses lists with core packages, factory packages, or the owner of a saved Wi-Fi network.
"""
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

LOG = os.path.join(BACKUP, "disabled-by-us.txt")

# Disabling any of these can leave the TV unbootable or without picture, input or remote.
FORBIDDEN = re.compile(
    r"^(android"
    r"|com\.android\.(systemui|shell|phone|settings|tv\.settings|bluetooth|inputdevices|vending)"
    r"|com\.android\.providers\.(?!calendar|contacts|userdictionary|blockednumber).*"
    r"|com\.(google\.)?android\.(permissioncontroller|packageinstaller|ext\.services|ext\.shared|modulemetadata)"
    r"|com\.google\.android\.overlay\.modules.*"
    r"|com\.google\.android\.(gms|gsf|inputmethod\.latin|tv\.remote\.service)"
    r"|com\.mediatek\.(tvinput|tv\.service|wwtv\.tvcenter|autopair)"
    r")$")
# Never touch these, not even to look: some boards flip a factory flag when they start.
FACTORY = re.compile(r"(factory|\.fac\.|facmenu|hkcfac|\.at\.factory)", re.I)


def main(path):
    pkgs = [l.split("#")[0].strip() for l in open(path, encoding="utf-8")]
    pkgs = [p for p in pkgs if p]
    bad = [p for p in pkgs if FORBIDDEN.match(p)]
    if bad:
        sys.exit(f"refusing: core/load-bearing packages in list: {bad}")
    fac = [p for p in pkgs if FACTORY.search(p)]
    if fac:
        sys.exit(f"refusing: factory packages in list: {fac}")
    owners = set(re.findall(r"cname=(\S+)", sh("dumpsys wifi")))
    if owners & set(pkgs):
        sys.exit(f"refusing: a saved Wi-Fi network belongs to {owners & set(pkgs)}; Android deletes it when the "
                 "package is disabled. Forget and re-join the network in Settings first.")

    ensure_backup_dir()
    done = set(open(LOG).read().split()) if os.path.exists(LOG) else set()
    refused = 0
    for p in pkgs:
        out = sh(f"pm disable-user --user 0 {p}")
        refused += "SecurityException" in out or "Exception" in out
        print(f"{p}: {out.splitlines()[0] if out else '(no output)'}")
    disabled = set(packages("-d"))
    ok = [p for p in pkgs if p in disabled]
    print(f"\nverified disabled: {len(ok)}/{len(pkgs)}")
    for p in pkgs:
        if p not in disabled:
            print(f"  NOT disabled: {p}")
    if pkgs and not ok and refused:
        print("every package was refused: this firmware blocks pm disable-user. Stop debloating; "
              "fall back to the TV's privacy toggles and DNS blocking.")
    with open(LOG, "a") as f:
        for p in ok:
            if p not in done:
                f.write(p + "\n")


if __name__ == "__main__":
    if len(sys.argv) != 2:
        sys.exit(__doc__)
    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: 192kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 192kUpdated 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: 192kUpdated Claude CodeCodexVerifiedInstall