justfile: fix adb invocation (nix shell --command) + add wireless-debugging recipes
nix run nixpkgs#android-tools has no main binary; use nix shell --command adb. Add tv-pair/tv-connect/install-to for the Android 11+/Google TV wireless debugging flow (random port + pairing code) when :5555 isn't exposed.
This commit is contained in:
@@ -12,8 +12,8 @@ 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"
|
||||
# between invocations, so `connect`/`pair` in one recipe line carries to the next.
|
||||
adb := "nix shell nixpkgs#android-tools --command adb"
|
||||
|
||||
# list available recipes
|
||||
default:
|
||||
@@ -41,6 +41,18 @@ install-tv ip: build
|
||||
{{ 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')."
|
||||
|
||||
# Wireless-debugging pair (Developer options -> Wireless debugging -> Pair with code shows HOST:PAIRPORT + code): just tv-pair 192.168.88.19:37123 123456
|
||||
tv-pair host code:
|
||||
{{ adb }} pair {{ host }} {{ code }}
|
||||
|
||||
# connect after pairing, to the HOST:PORT on the main Wireless debugging screen (different port than pairing): just tv-connect 192.168.88.19:41234
|
||||
tv-connect host:
|
||||
{{ adb }} connect {{ host }}
|
||||
|
||||
# install the built APK to an explicit adb target (e.g. the wireless-debugging host:port)
|
||||
install-to host: build
|
||||
{{ adb }} -s {{ host }} install -r result/app-nonRoot-debug.apk
|
||||
|
||||
# disconnect a network adb device (e.g. the TV) when done
|
||||
tv-disconnect ip:
|
||||
{{ adb }} disconnect {{ ip }}:5555
|
||||
|
||||
Reference in New Issue
Block a user