An 'unauthorized' device means your PC's RSA key isn't trusted by your phone yet. The fix is to revoke the existing authorizations, restart the ADB server, and re-trigger the "Allow USB debugging" prompt — here's every step, plus what to do when the prompt refuses to appear.
Quick answer
On your phone, open Settings → Developer Options → Revoke USB debugging authorizations. Reconnect the cable — the trust prompt will reappear. Tap Allow and check 'Always allow from this computer.'
What "device unauthorized" actually means
Every computer that runs ADB generates a unique RSA key pair the first time it starts the ADB server. When you connect a phone, ADB offers that key's fingerprint to the device, and the device asks you to approve it with the "Allow USB debugging?" dialog. Until you approve, adb devices lists the phone as unauthorized and refuses to install apps, pull files, or run shell commands.
You'll see it written a few different ways — they all mean the same thing:
error: device unauthorized.
this adb server's $ADB_VENDOR_KEYS is not set
List of devices attached ABC123 unauthorized
It usually appears after you reinstall Windows, switch computers, update ADB, factory-reset the phone, or flash a new ROM — anything that invalidates the previously trusted key.
Step 1 — Revoke existing USB debugging authorizations
On the phone, open Settings → Developer options → Revoke USB debugging authorizations and confirm. This wipes the device's list of trusted computers so it will prompt you fresh on the next connection. (If Developer options is hidden, tap Build number seven times under Settings → About phone first.)
Step 2 — Restart the ADB server
On the PC, force ADB to drop its cached connection and request authorization again:
adb kill-server
adb start-server
adb devices
The first adb devices after a revoke should print your device with no status (briefly) and then trigger the prompt on the phone.
Tired of debugging ADB?
Andora installs APKs, mirrors screens, and fixes these errors automatically. Free for Windows 10/11.
Unlock the phone screen, then replug the USB cable. The authorization dialog only shows on an unlocked device. When "Allow USB debugging?" appears, tick "Always allow from this computer" and tap Allow. Run adb devices again — the status should now read device instead of unauthorized.
If revoking and reconnecting doesn't bring back the dialog, work down this list — these are the fixes that resolve the stubborn cases:
Unlock the screen first. Many phones suppress the prompt on a locked screen. Unlock, then replug.
Change the USB mode. Pull down the notification shade and set the USB connection to File transfer (MTP) or PTP — charge-only mode hides the prompt.
Delete the stale keys on the PC. Close the terminal, delete adbkey and adbkey.pub from C:\Users\<you>\.android\, then run adb kill-server and reconnect. ADB regenerates a fresh key and re-asks.
Swap the cable and port. A charge-only cable or a flaky front-panel USB port can stop the data handshake that triggers the prompt. Use a known-good data cable on a rear/direct port.
Update platform-tools. An old adb.exe can mismatch newer Android versions. Download the latest SDK Platform Tools and use that adb.
Device-specific notes (Xiaomi, Samsung, Pixel)
Device
Extra step that's easy to miss
Xiaomi / Redmi / POCO (MIUI)
Enable both USB debugging and USB debugging (Security settings) — the second toggle is required for the prompt to appear, and it needs a Mi account signed in.
Samsung (One UI)
If the dialog flashes and vanishes, disable Auto Blocker (Security and privacy) and set the USB mode to File transfer.
Pixel / stock Android
Usually works first try; if not, toggle USB debugging off and on and replug while unlocked.
OnePlus / OPPO / vivo
Some builds gate ADB behind Disable permission monitoring in Developer options.
"Unauthorized" in SamFW, Miracle Box, UnlockTool and other flashing tools
Flashing, FRP, and debloat utilities — SamFW, Miracle Box, UnlockTool, Android Utility — all drive the same ADB underneath, so an "unauthorized" or "no ADB connection found" message in those tools is the identical RSA-trust problem. The fix is the same: unlock the phone, accept the Allow USB debugging prompt, and make sure the right USB drivers are installed so Windows actually sees the device. There is no legitimate way to bypass the authorization without confirming on the device — it's a security boundary by design.
Frequently asked questions
"Unauthorized" means ADB reached your device but you haven't approved this computer's RSA key. Your phone should show an "Allow USB debugging?" dialog — tap Allow and check "Always allow from this computer". If the dialog never appears, the device hasn't registered the prompt yet.
Go to Developer options → Revoke USB debugging authorizations, toggle USB debugging off and on, then run adb kill-server and replug the cable. Some devices only show the prompt when the screen is unlocked, so unlock first. If it still won't appear, delete adbkey and adbkey.pub in your user's .android folder and restart the server.
That's the same authorization failure spelled out: ADB couldn't find a trusted key for the device. It isn't a real environment-variable problem for everyday USB debugging — just re-run adb kill-server, replug, and accept the on-device prompt. ADB_VENDOR_KEYS only matters for unattended or CI setups with pre-shared keys.
There's no legitimate way to skip authorization without touching the device — it's a security boundary that requires physical confirmation on the phone. If you own the device but the screen is broken, you'd need to reuse an adbkey the device already trusts. For normal use, just unlock the phone and tap Allow.
A reset wipes the device's list of trusted computers, so your old key is no longer recognized. Reconnect, watch for the Allow dialog, and approve it again — the new key is then stored on the device.