Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages
Flutter and app store releases

The phone shows as unauthorized and Android Studio will not run the app

Errorunauthorized

Short 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.

  • Applies to Android Studio Otter, Platform-Tools 36, Android 14 to 17
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 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 -l
  2. 2Match what you see, then jump to its fix

    1. 1The 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. 2The phone stays unauthorized and no dialog appears after repluggingAn old authorization is stuck and the prompt does not returnFix
    3. 3You accepted the prompt but the list still shows the old stateThe adb server on the computer is out of step with the phoneFix

What does the error look like?

  • unauthorized
  • adb 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 -l

2Fix

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 terminal

3Verify

The phone is now listed as device.

adb devices

Confirmed by developer.android.com

Did this fix it?

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 -l

2Fix

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 devices

3Verify

After you accept the new prompt the phone is listed as device.

adb devices -l

Confirmed by developer.android.com

Did this fix it?

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 version

2Fix

Stop the server and start it again, then list devices.

adb kill-server
adb start-server
adb devices

3Verify

The phone appears as device and Run in Android Studio can pick it.

adb devices -l

Confirmed by developer.android.com

Did this fix it?

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 fix

Mobile 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 fix

Mobile 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

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.