r/AndroidQuestions • u/Nexsonic • 4d ago
[Help] ADB shows "unauthorized" — can I authorize my Ubuntu PC without using the phone?
I’m trying to connect my Motorola Moto e22s to Ubuntu using ADB, but I’m stuck at the authorization step.
So the USB connection and ADB interface appear to be working, but the device is showing as unauthorized.
The problem is that I currently cannot interact with the phone (I don't want/need a solution that requires using the phone screen).
Is there any legitimate way to authorize the existing Ubuntu computer for ADB without touching/unlocking the phone?
I'm specifically looking for a way to establish the ADB authorization without interacting with the phone itself.
I understand that Android normally requires accepting the RSA fingerprint on the phone. I'm wondering whether there is an exception if the phone was previously configured for USB debugging
Any technical explanation or recovery options would be appreciated. Thanks!
16
u/goodgollymisssomaIi 4d ago
I sure hope there isn't because that would be massively insecure
11
u/Parking_Lemon_4371 4d ago
No, you cannot, and it would be an absolutely massive security issue if you could.
10
u/DFrostedWangsAccount 4d ago
If the screen is broken, use a USB C to A (otg) adapter and a mouse.
If you don't know the password, no. That's the point.
3
u/xsgeng 3d ago
Short answer: not without the phone itself, but the unauthorized flag usually means your Ubuntu box is now presenting a key the phone has never seen, and that half of the problem you can fix from the Linux side before blaming the device.
Run all of this as your normal user, never with sudo:
adb kill-server ls -l ~/.android/adbkey ~/.android/adbkey.pub ps aux | grep -i adb adb devices
If adbkey did not exist, or its timestamp is newer than the last time this setup worked, adb regenerated the key pair and the phone still holds the old fingerprint in /data/misc/adb/adb_keys, so it shows unauthorized forever. Same thing happens if any part of your workflow calls sudo adb, because root keeps a separate key at /root/.android/adbkey; kill that stray server with sudo adb kill-server, then start it again as yourself.
There is no server side bypass worth chasing. Accepting the prompt is what appends your public key to adb_keys, that file needs root to edit, and rooting means unlocking the bootloader, which wipes the data you probably want to keep. Wireless debugging pairing on the e22s is also a screen only handshake, and it needs the same trusted key anyway, so it does not get you around the dialog.
One thing worth trying if the real obstacle is a dead digitizer rather than a locked phone: plug a USB mouse into the phone through an OTG adapter, swipe up, and tap Allow with the pointer. The RSA prompt renders above the lock screen and it is just a normal dialog, so any pointing device works. That still counts as touching the phone, but it does not require a working touch panel.
2
u/agent_kater 3d ago
Well yes, if ot was configured for USB debugging and the computer was authorized with the checkbox ticked, then you don't need to authorize again when you later plug it in.
1
u/__________13o1ksl_ 2d ago
Why can't you interact with the phone?