justfile: add install-tv for Chromecast with Google TV (network adb over WiFi)
Adds an adb variable (from nixpkgs android-tools), an install-tv <ip> recipe that adb-connects to :5555 and installs the debug APK, and tv-disconnect.
This commit is contained in:
@@ -11,6 +11,10 @@
|
|||||||
pkg := ".?submodules=1#moonlight-android"
|
pkg := ".?submodules=1#moonlight-android"
|
||||||
build_flags := "--builders '' --print-build-logs"
|
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
|
# list available recipes
|
||||||
default:
|
default:
|
||||||
@just --list
|
@just --list
|
||||||
@@ -27,9 +31,19 @@ build:
|
|||||||
apk: build
|
apk: build
|
||||||
@ls -l result/app-nonRoot-debug.apk
|
@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
|
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
|
# regenerate the offline Maven lockfile (deps.json) after changing dependencies
|
||||||
deps:
|
deps:
|
||||||
|
|||||||
Reference in New Issue
Block a user