nandi/frqpublic Fork 0
bc0e14f
Commits
Clone
git clone https://git.rickub.com/nandi/frq.git
git clone ssh://git@rickub.com/nandi/frq.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Let adb keep its identity when the APK recipe moves HOME

`just apk install` and `just apk run` ended in "no devices/emulators
found" on a machine where `adb devices` lists the phone perfectly well.

HOME moves to flutter/.home so Gradle can write into the SDK copy, and adb
keeps the key the device has already trusted under the real HOME. Told to
look somewhere with no key in it, adb makes a new one, and a phone that has
never seen that key does not answer to it — so the build succeeds, every
time, and the deploy cannot find the device it is plugged into.

ANDROID_USER_HOME is what adb reads in preference to $HOME/.android, so it
is set from the real HOME before HOME is changed, and overridable for
anyone who keeps their key elsewhere.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
nandi committed 2026-09-12T06:49:49-07:00 Browse files
bc0e14f parent: 0aa84f8
modified justfile +8 -0
@@ -78,6 +78,14 @@ apk action="build":
7878 sdk="$(nix build --no-link --print-out-paths \
7979 "{{justfile_directory()}}#android-sdk")/libexec/android-sdk"
8080
81+ # adb keeps the key the phone has already trusted under the real HOME, and
82+ # HOME moves below so Gradle can write into the SDK copy. Told where to
83+ # look, adb keeps its identity; left to find $HOME/.android it generates a
84+ # new one, the device stops recognising this machine, and the deploy ends
85+ # in "no devices/emulators found" while `adb devices` in any other shell
86+ # lists it perfectly well.
87+ export ANDROID_USER_HOME="${ANDROID_USER_HOME:-$HOME/.android}"
88+
8189 export HOME="$PWD/.home"
8290 export ANDROID_HOME="$HOME/android-sdk"
8391 export ANDROID_SDK_ROOT="$ANDROID_HOME"
@@ -78,6 +78,14 @@ apk action="build":
78 sdk="$(nix build --no-link --print-out-paths \78 sdk="$(nix build --no-link --print-out-paths \
79 "{{justfile_directory()}}#android-sdk")/libexec/android-sdk"79 "{{justfile_directory()}}#android-sdk")/libexec/android-sdk"
80 80
81+ # adb keeps the key the phone has already trusted under the real HOME, and
82+ # HOME moves below so Gradle can write into the SDK copy. Told where to
83+ # look, adb keeps its identity; left to find $HOME/.android it generates a
84+ # new one, the device stops recognising this machine, and the deploy ends
85+ # in "no devices/emulators found" while `adb devices` in any other shell
86+ # lists it perfectly well.
87+ export ANDROID_USER_HOME="${ANDROID_USER_HOME:-$HOME/.android}"
88+
81 export HOME="$PWD/.home"89 export HOME="$PWD/.home"
82 export ANDROID_HOME="$HOME/android-sdk"90 export ANDROID_HOME="$HOME/android-sdk"
83 export ANDROID_SDK_ROOT="$ANDROID_HOME"91 export ANDROID_SDK_ROOT="$ANDROID_HOME"