adb: fix authentication when reconnecting.
If we have multiple keys available for authentication (ADB_VENDOR_KEYS + the one in ~/.android), we will still have keys in our list of avilable keys after we've successfully connected. A subsequent reconnection will start authorizing using the list of keys after the key that actually worked, resulting in that session being unauthorized until another reconnection happens. Clear the key list before reconnecting to fix this. (We could do this after successfully connecting, but we need to do this before reconnecting anyway, because our connection could have died during authorization.) Bug: http://b/117267347 Test: `adb connect foo; adb -s foo reconnect device` with ADB_VENDOR_KEYS Change-Id: Ieb7dcc28e333c89ae0d75f97e89bcd1b571cb299
Loading
Please register or sign in to comment