From 3319749c0df593b3559402e0791bc74d0c5ba3e6 Mon Sep 17 00:00:00 2001 From: Oleks Date: Fri, 29 May 2026 18:20:28 +0300 Subject: [PATCH] justfile: add install-tv for Chromecast with Google TV (network adb over WiFi) Adds an adb variable (from nixpkgs android-tools), an install-tv recipe that adb-connects to :5555 and installs the debug APK, and tv-disconnect. --- justfile | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/justfile b/justfile index b61d84af..241cea5c 100644 --- a/justfile +++ b/justfile @@ -11,6 +11,10 @@ pkg := ".?submodules=1#moonlight-android" build_flags := "--builders '' --print-build-logs" +# adb from nixpkgs (no system install needed). The adb server daemon persists +# between invocations, so `connect` in one recipe line carries to the next. +adb := "nix run nixpkgs#android-tools -- adb" + # list available recipes default: @just --list @@ -27,9 +31,19 @@ build: apk: build @ls -l result/app-nonRoot-debug.apk -# install the built debug APK onto a connected device/emulator (needs adb + USB debugging) +# install the built debug APK onto a USB-connected device/emulator (needs USB debugging) install: build - nix run nixpkgs#android-tools -- adb install -r result/app-nonRoot-debug.apk + {{ adb }} install -r result/app-nonRoot-debug.apk + +# install over WiFi to a Chromecast with Google TV (enable Developer options -> USB debugging first): just install-tv 192.168.1.x +install-tv ip: build + {{ adb }} connect {{ ip }}:5555 + {{ adb }} -s {{ ip }}:5555 install -r result/app-nonRoot-debug.apk + @echo "Installed. Launch Moonlight from the TV's app list (apps row / 'See all apps')." + +# disconnect a network adb device (e.g. the TV) when done +tv-disconnect ip: + {{ adb }} disconnect {{ ip }}:5555 # regenerate the offline Maven lockfile (deps.json) after changing dependencies deps: