From dd04fba9af8068040ef06048a68678a1fb4dce42 Mon Sep 17 00:00:00 2001 From: Arnie Date: Fri, 12 Jun 2026 20:14:47 +0200 Subject: [PATCH] feat: add tv-connect / tv-install devshell helpers tv-connect: adb connect $TV_IP:5555 tv-install : installs flavor release APK Co-Authored-By: Claude Sonnet 4.6 --- CLAUDE.md | 5 +++-- flake.nix | 5 +++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 6562162..1cd9354 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -33,9 +33,10 @@ post-25.11). No file rewriting; `gradle.properties` stays untouched. - All APKs: `gradle --no-daemon :app:assembleRelease` → `app/build/outputs/apk//release/-release.apk` - Single APK: `gradle --no-daemon :app:assembleWeatherRelease` -- Sideload: `adb connect :5555 && adb install -r ` +- Connect ADB: `tv-connect` (uses $TV_IP from .envrc) +- Sideload: `tv-install ` e.g. `tv-install weather` (bump `versionCode` in app/build.gradle.kts first for upgrades) -- Fresh install: `adb uninstall cz.c3c.webviewkiosk && adb install ` +- Fresh install: `adb uninstall cz.c3c.webviewkiosk. && tv-install ` ## Key facts diff --git a/flake.nix b/flake.nix index 883bd5b..17fe909 100644 --- a/flake.nix +++ b/flake.nix @@ -63,6 +63,11 @@ # nixpkgs PR #449037 (merged post-25.11, present in 26.05+). GRADLE_OPTS = "-Dorg.gradle.project.android.aapt2FromMavenOverride=${sdkRoot}/build-tools/${buildToolsVersion}/aapt2"; FONTCONFIG_FILE = pkgs.makeFontsConf { fontDirectories = fonts; }; + + shellHook = '' + tv-connect() { adb connect "$TV_IP:5555"; } + tv-install() { adb install -r "app/build/outputs/apk/$1/release/$1-release.apk"; } + ''; }; } );