The phone shows as unauthorized and Android Studio will not run the app
unauthorizedShort answer
An unauthorized phone means it has not trusted this computer's RSA key. Unlock the phone, replug the cable and tap Allow on the USB debugging prompt. If no prompt appears, revoke USB debugging authorizations in Developer options and connect again. If the state still looks stale, restart the adb server.
Fix it fast
1Find out which cause you have
Ask adb what state the phone is in. A phone that has accepted the key is listed as device; one that has not is listed as unauthorized.
adb devices -l2Match what you see, then jump to its fix
- 1
The phone was locked or the screen was off when you plugged it in, or you tapped Cancel onceThe RSA key prompt was dismissed or never shownFix - 2
The phone stays unauthorized and no dialog appears after repluggingAn old authorization is stuck and the prompt does not returnFix - 3
You accepted the prompt but the list still shows the old stateThe adb server on the computer is out of step with the phoneFix
- 1
What does the error look like?
unauthorizedadb devices lists the phone but Android Studio cannot deploy to it
Cause 1 of 3
The RSA key prompt was dismissed or never shown
1Check
Android shows a dialog asking whether to accept an RSA key for debugging through this computer. adb commands cannot run until someone unlocks the phone and accepts it.
adb devices -l2Fix
Unlock the phone, unplug the cable and plug it in again. When the dialog appears, tick Always allow from this computer and tap OK.
adb devices -l
# the prompt is on the phone screen, not in the terminal3Verify
The phone is now listed as device.
adb devicesConfirmed by developer.android.com
Cause 2 of 3
An old authorization is stuck and the prompt does not return
1Check
The prompt may not return while the phone still holds an earlier authorization state. Clearing the phone's saved authorizations forces a new prompt.
adb devices -l2Fix
Disconnect the cable. On the phone open Settings, Developer options, Revoke USB debugging authorizations. Reconnect and grant the new prompt.
# on the phone:
# Settings > Developer options > Revoke USB debugging authorizations
adb devices3Verify
After you accept the new prompt the phone is listed as device.
adb devices -lConfirmed by developer.android.com
Cause 3 of 3
The adb server on the computer is out of step with the phone
1Check
adb runs as a background server on your computer. A stale server can keep reporting an old state. Android Studio has a Restart ADB server button in Tools > Troubleshoot Device Connections.
adb version2Fix
Stop the server and start it again, then list devices.
adb kill-server
adb start-server
adb devices3Verify
The phone appears as device and Run in Android Studio can pick it.
adb devices -lConfirmed by developer.android.com
How do I stop it coming back?
- Unlock the phone before you plug it in, so the key prompt is visible.
- Tick Always allow from this computer on a machine you trust, so the prompt does not repeat.
- Keep Platform-Tools current through the SDK Manager.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Projects of mine built on the same technologies:
Related fixes
Mobile apps
A phone is plugged in over USB but Android Studio and adb do not list it
adb devices prints List of devices attached with nothing below it
adb lists a phone only when four things hold: USB debugging is on, you accepted the computer's RSA key on the phone, the computer has a driver or udev rule for the device, and the cable carries data to a running adb server.
6 causes, each with a fixMobile apps
adb cannot start because something already holds its port
adb start-server failed
The adb server must bind local TCP port 5037, and every adb client talks to it there.
2 causes, each with a fixMobile apps
Android Studio cannot pair the phone over Wi-Fi
The Pair devices over Wi-Fi dialog lists no device
Wireless pairing needs the phone on Android 11 or higher and on the same Wi-Fi network as the computer, with current Platform-Tools.
4 causes, each with a fixMobile apps
adb cannot connect to its daemon or start the server
* daemon started successfully *
The adb server is a background process on your computer that listens on TCP port 5037.
2 causes, each with a fixMobile apps
adb prints 'server version doesn't match this client; killing...'
adb server version doesn't match this client; killing...
adb runs a background server, and every adb command is a client.
3 causes, each with a fixMobile apps
adb tcpip 5555 fails because no device is found
adb: more than one device/emulator
adb tcpip only works while the device is attached and listed by adb, because it tells the phone to start listening on port 5555.
4 causes, each with a fix