In this guide
  1. What the adb devices states mean
  2. Fix 1: Accept the Allow USB debugging prompt
  3. Fix 2: Restart ADB and replug
  4. Fix 3: Change the USB mode to File transfer
  5. Fix 4: Revoke USB debugging authorisations
  6. Fix 5: Delete the computer’s ADB keys
  7. Fix 6: Update Platform-Tools
  8. Fix 7: Try another cable, port and driver
  9. Fix 8: Use wireless debugging instead (Android 11 and later)
  10. “adb is not recognized as an internal or external command”
  11. When you can’t authorise: broken screen, locked phone
  12. FAQ
    1. Why does adb say unauthorized?
    2. How do I get the USB debugging prompt to show again?
    3. Is it safe to turn on USB debugging?
    4. Why does my device show offline in adb devices?
    5. Where are ADB keys stored?

“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:

Command Prompt showing adb devices listing a phone as unauthorized, then as device after approval

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

  1. 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.
  2. Connect the USB cable.
  3. Look for Allow USB debugging? with “The computer’s RSA key fingerprint is…”.
  4. Tick Always allow from this computer so you aren’t asked every time.
  5. Tap Allow.
  6. On the computer, run adb devices again. It should now say device.

Allow USB debugging prompt on an Android phone with Always allow from this computer ticked and Allow highlighted

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.

  1. Open Settings → System → Developer options (on some phones, Developer options sits directly in Settings or under Additional settings).
  2. Tap Revoke USB debugging authorisations (spelled authorizations on US-English phones) and confirm.
  3. Turn USB debugging off, then on again.
  4. Run adb kill-server, reconnect, and accept the new prompt.

Android Developer options with USB debugging on and Revoke USB debugging authorisations highlighted

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.

  1. Run adb kill-server.
  2. Delete adbkey and adbkey.pub from the .android folder in your user profile:
    • Windows: %USERPROFILE%\.android\ (paste it into File Explorer’s address bar)
    • Mac and Linux: ~/.android/
  3. 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)

  1. Connect the phone and computer to the same Wi-Fi network.
  2. In Developer options, turn on Wireless debugging, then tap its name and choose Pair device with pairing code.
  3. On the computer, run adb pair with 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.

Technology Sage

The Technology Sage desk: guides, explainers and contributed articles since 2014.