ADBKEY in registry images
Even though I didn't handle ADBKEY while using the registry images, I could authenticate fine. But with the image that I built(using the emu-docker) I get failed to authenticate. What am I missing in building the image?
I noticed the same issue, even in an image I build myself.. my emulator happily takes ADB connections from anywhere and anyone without verifying the ADB key. In logs I see this at connect time:
10-04 17:58:30.552 470 470 I adbd : authentication not required
Through adb shell I've confirmed that the right key is in /data/misc/adb/adb_keys. Also did notice a -skip-adb-auth flag in the cmdline but even if I delete that, ADB auth still does seem to get skipped.
I wonder what that log message means and where is the "authentication is required" setting..
The adbd source code seems to set auth_required at https://android.googlesource.com/platform/packages/modules/adb/+/refs/tags/aml_tz4_332714050/daemon/main.cpp#221(plus a few more codepaths). And that property isn't set in the image I've used to build my container, and seems to be quite commonly set that way.
I don't understand why these scripts offer this ADB key feature then though, when the key really doesn't seem to get used..
Success with for example this one: https://dl.google.com/android/repository/sys-img/google_apis_playstore/x86_64-30_r10-linux.zip
127|generic_x86_64_arm64:/ $ getprop ro.adb.secure
1
This time indeed ADB authentication was truly required. And now I also can't do stuff as root in that image for example, which I guess I won't need. But it's a shame that this isn't a finer-grained setting...