11de27d435
The ALLOWED_SERIALS guard matched the adb transport serial, which over WiFi is a rotating ip:port (changes on every wireless-debugging restart) and over USB is the bare hardware serial. Pinning the transport serial meant every port rotation broke the deploy until the profile was hand-edited. Resolve the device's stable ro.serialno (getprop) after target resolution and match that against ALLOWED_SERIALS instead. The transport serial still drives adb/gradle/ANDROID_SERIAL; only the wrong-watch guard switches to the stable identity, so it survives port rotation and is identical over WiFi/USB. Also: 'devices' now prints 'transport -> ro.serialno' per device to make the value for ALLOWED_SERIALS easy to read off. Help text and the example profile are updated to the ro.serialno form. closes #6
29 lines
1.3 KiB
Plaintext
29 lines
1.3 KiB
Plaintext
# Watch build profile template. Copy this file to <profile-name>.sh in the
|
|
# same directory (the .sh files are gitignored). The profile name (the file
|
|
# basename without .sh) is what you pass to ./run.sh, e.g.:
|
|
#
|
|
# ./run.sh watch brummel-dev install
|
|
#
|
|
# Naming convention:
|
|
# <user>-<server> e.g. brummel-dev, brummel-minerva, krey-minerva
|
|
# Profiles whose name ends in "-dev" are treated as development builds
|
|
# (launcher label "Doctate (Dev)" + red "DEV" badge in the UI). All other
|
|
# profiles render the production-clean UI.
|
|
|
|
# Backend URL the watch talks to. Plain HTTP is fine on the LAN.
|
|
SERVER_URL="http://minerva.lan:3000"
|
|
|
|
# Plaintext api_key matching the slug in the server's users.toml.
|
|
# Generate with: openssl rand -base64 24
|
|
API_KEY="REPLACE_ME_WITH_PLAINTEXT_API_KEY"
|
|
|
|
# Bash array of stable hardware serials (ro.serialno) — one per attached watch
|
|
# this profile may target. NOT the adb transport serial (the rotating ip:port
|
|
# you see over WiFi): the guard reads ro.serialno so it survives port rotation
|
|
# and is identical over WiFi and USB.
|
|
# Find a watch's ro.serialno with: ./run.sh devices (prints "transport -> ro.serialno").
|
|
# Brummel's watch can appear in multiple profiles; Krey's watch only in hers.
|
|
ALLOWED_SERIALS=(
|
|
"XXXXXXXXXXXXXX"
|
|
)
|