In this guide
- What the adb devices states mean
- Fix 1: Accept the Allow USB debugging prompt
- Fix 2: Restart ADB and replug
- Fix 3: Change the USB mode to File transfer
- Fix 4: Revoke USB debugging authorisations
- Fix 5: Delete the computer’s ADB keys
- Fix 6: Update Platform-Tools
- Fix 7: Try another cable, port and driver
- Fix 8: Use wireless debugging instead (Android 11 and later)
- “adb is not recognized as an internal or external command”
- When you can’t authorise: broken screen, locked phone
- FAQ
“Unauthorized” in adb devices means your phone sees the computer but hasn’t approved it for USB debugging yet. Unlock the phone and look for the Allow USB debugging? prompt, tick Always allow from this computer and tap Allow. If no prompt appears, go to Developer options → Revoke USB debugging authorisations, run adb kill-server, and reconnect the cable — the prompt will come back.
ADB (Android Debug Bridge) uses a security key to make sure only computers you’ve approved can control your phone. “Unauthorized” is that safety check working; you just need to complete it. The steps below cover every reason the prompt doesn’t show, plus the related “adb is not recognized” error.
What the adb devices states mean
Run adb devices and look at the word after the serial number:

| State | Meaning | What to do |
|---|---|---|
device |
Connected and authorised | Nothing — it works |
unauthorized |
Phone hasn’t approved this computer | Accept the prompt on the phone (below) |
offline |
Connection stuck | Replug, adb kill-server, restart phone |
no permissions (Linux) |
USB permission rules missing | Set up udev rules / plugdev group |
| Nothing listed | Not detected at all | Cable, USB mode, driver, USB debugging off |
Fix 1: Accept the Allow USB debugging prompt
- Unlock the phone and keep the screen on. The prompt only appears on an unlocked screen, and it can be hidden behind the lock screen or in the notification shade.
- Connect the USB cable.
- Look for Allow USB debugging? with “The computer’s RSA key fingerprint is…”.
- Tick Always allow from this computer so you aren’t asked every time.
- Tap Allow.
- On the computer, run
adb devicesagain. It should now saydevice.

Fix 2: Restart ADB and replug
If the prompt doesn’t appear:
adb kill-server
adb start-server
adb devices
Then unplug and replug the cable with the phone unlocked. adb kill-server stops the background ADB service on your computer; the next command starts it fresh, which makes the phone ask again.
Fix 3: Change the USB mode to File transfer
Some phones don’t show the prompt while connected in Charging only mode. Pull down the notification shade, tap the USB notification (often “Charging this device via USB”), and choose File transfer (sometimes MTP or Transferring files). Then reconnect and check for the prompt.
Fix 4: Revoke USB debugging authorisations
This clears every computer the phone has approved, which forces a fresh prompt.
- Open Settings → System → Developer options (on some phones, Developer options sits directly in Settings or under Additional settings).
- Tap Revoke USB debugging authorisations (spelled authorizations on US-English phones) and confirm.
- Turn USB debugging off, then on again.
- Run
adb kill-server, reconnect, and accept the new prompt.

Don’t see Developer options? Open Settings → About phone and tap Build number seven times (enter your PIN when asked). On Samsung it’s About phone → Software information → Build number; on Xiaomi phones, tap the OS version entry instead. Then turn on USB debugging inside Developer options.
Fix 5: Delete the computer’s ADB keys
If the phone still won’t ask, the key on your computer may be damaged. ADB creates a fresh one automatically.
- Run
adb kill-server. - Delete
adbkeyandadbkey.pubfrom the.androidfolder in your user profile:- Windows:
%USERPROFILE%\.android\(paste it into File Explorer’s address bar) - Mac and Linux:
~/.android/
- Windows:
- Reconnect the phone and accept the new prompt.
Only delete those two key files — other files in .android belong to Android Studio and emulators.
Fix 6: Update Platform-Tools
Very old copies of adb can fail with newer Android versions. Download the latest SDK Platform-Tools from Google’s Android developer site, extract it, and run adb from that folder (or update the copy in your PATH). Remove old copies bundled with other tools — several different adb versions fighting each other cause “server version doesn’t match” errors and odd states.
Fix 7: Try another cable, port and driver
- Use a cable that supports data (many cheap cables only charge). The one that came with the phone is the best bet.
- Use a USB port directly on the computer, not a hub or front-panel port.
- On Windows, if the phone isn’t listed at all, it may need a driver: Google’s USB driver for Pixel phones, or the maker’s own USB driver for other brands. Check Device Manager for a device with a warning triangle.
If adb devices says unauthorized, the driver is already working — the problem is the authorisation, so focus on Fixes 1-5.
Fix 8: Use wireless debugging instead (Android 11 and later)
- Connect the phone and computer to the same Wi-Fi network.
- In Developer options, turn on Wireless debugging, then tap its name and choose Pair device with pairing code.
- On the computer, run
adb pairwith the IP address and port shown, and enter the code:
adb pair 192.168.1.50:37123
adb connect 192.168.1.50:41235
The pairing port and the connection port are different; use the ones shown on your phone.
“adb is not recognized as an internal or external command”
That’s a different problem: Windows can’t find adb.exe. Either open the terminal in the platform-tools folder (in File Explorer, open the folder, type cmd in the address bar and press Enter) and run adb devices — in PowerShell, type .\adb devices — or add the platform-tools folder to your PATH. The PATH steps are identical to those in our guide to fixing “pip is not recognized”. For setting up ADB from scratch, see how to install ADB and install apps from a computer.
When you can’t authorise: broken screen, locked phone
The approval has to happen on the phone’s screen. If the screen is broken or you can’t unlock the phone, ADB can’t be authorised — that’s the point of the security check, and there’s no legitimate command that skips it. For a phone with a broken screen, a USB-C to HDMI adapter (on phones that support video out) or a USB mouse via an OTG adapter can let you see and tap the prompt. Otherwise, take the phone to an authorised service centre.
Only use ADB on phones you own or are allowed to manage. If you’re working with fastboot mode for repairs, remember that fastboot commands don’t need this prompt, but they also can’t unlock someone else’s phone.
FAQ
Why does adb say unauthorized?
Because the phone hasn’t approved your computer’s RSA key yet. Unlock the phone, accept the Allow USB debugging? prompt and tick Always allow from this computer.
How do I get the USB debugging prompt to show again?
Revoke USB debugging authorisations in Developer options, run adb kill-server, set USB mode to File transfer, and reconnect with the phone unlocked. Deleting adbkey files on the computer also forces a new prompt.
Is it safe to turn on USB debugging?
It’s safe on a phone you control, and it only allows computers you approve. Turn it off when you’re done, and never tap Allow for a computer you don’t recognise, such as a public charging station.
Why does my device show offline in adb devices?
The ADB connection is stuck. Unplug the cable, run adb kill-server, restart the phone, and reconnect. Updating Platform-Tools often fixes repeated offline states.
Where are ADB keys stored?
On the computer, in the .android folder of your user profile (%USERPROFILE%\.android on Windows, ~/.android on Mac and Linux), as adbkey and adbkey.pub. The phone stores the list of approved computers, which you clear with Revoke USB debugging authorisations.




