I have a VSTS/Azure DevOps self hosted agent running as a service on a machine with an Android device attached via USB that I'd like to use with ADB.
During the build a Command Line task invokes an ADB command. I'm having an issue where the device goes unauthorized when someone logs into the machine. What I observe happening is
- With no one logged into the machine, I plug in the Android device and get the prompt to allow USB debugging and check the always allow box and click okay
- Builds run properly and ADB commands work
- Sometime later, someone logs into the machine and the device goes unauthorized for them
- During the next build when an ADB command is sent, I get the prompt again with a different RSA key fingerprint
This seems similar to RSA fingerprint change every time a new build is started, but their question is for docker/gitlab-ci.
c:\adb_keys\adbkey
works rather thanc:\adb_keys
whereadbkey
is the key. I assume ADB_KEYS_PATH works too, but running adb shows a list of env variables that suggests ADB_VENDOR_KEYS is what we should use. – Adam