I am trying to follow the instructions here, but my phone never displays the "Authorize USB Debugging" option.

On the PC side, adb devices shows that the PC see the device, but it is listed as "offline" and I cannot use adb shell to talk to it.

Moreoever, if I unplug the device, adb devices does not list it at all, so I assume that the adb server is able to see the phone and simply cannot talk to it.

How can I force the "Allow USB Debugging" to appear on the phone?

I have already tried restarting both devices and disabling and enabling USB debugging on the phone.

  • 1
    @Firelord, Yes, I tried three machines but they were all Linux. Haven't tried Windows or Mac. – merlin2011 Mar 11 '15 at 19:10
  • You might have a faulty cable or one that isn't a data cable. – Huey Oct 11 '15 at 3:51

I have had this happen multiple times on multiple Android devices. Solved every time by putting the device in Photo transfer (PTP) mode.

ADB will not work for me when my device is in MTP or any other mode.

  • This should be accepted answer. Same issue I had with Nexus 6P, which I could debug with no issues on Win10, but on Ubuntu 18 did not popup "Allow USB Debugging" dialog box. I've found this answer, tried it and worked out like a charm. – Sinisa Aug 12 at 1:23
  • MTP was selected for me. Switched to PTP and worked. Thank you. – Antinous Oct 3 at 10:22
  • My device only shows up in Chrome's remove debugging when "Install Driver" is selected, but disappears for MTP or PTP. Still will not currently ask for authorization. – Aaron Cicali Nov 2 at 16:40

My SAMSUNG Galaxy S4 sometimes bothers me with this annoying offline status message too. I always fix it by trying options below:

  • Try to revoke the USB Debugging authorization on Developer Options menu.
  • Try using adb kill-server and the adb usb commands.
  • Try to replug your device if none of above works.
  • Try Restarting your device.
  • Turn USB Debugging OFF and ON again.
  • Try to Turn Developer Options OFF and ON again.

hope it hepls.

  • I was just providing general solutions for others didn't try them :) – Sdghasemi Mar 11 '15 at 11:59
  • Idea 2 (kill-server, then usb) worked for me on my S6 when nothing else would! Thank you! – Frank May 17 at 0:46
  • BTW, I also had my phone in PTP mode (Due to Chuck's answer below), not MTP. Not sure if that's related, but if none of these options work for you in MTP try switching it into PTP and trying again. – Frank May 17 at 21:08

I am not sure if you ever solved this problem, but I ran into this problem, and tried out many many different procedures, each of which might have helped others, but this is 2016 and a summary might help.

A brand new phone bought in 2016 didn't work when I installed Android Studio on Linux. A phone bought in 2015 worked without a problem. A new phone didn't work with the exact same configuration.

When I have Android Studio open, the AVD manager didn't show the new phone, but showed the old one. The old phone, when connected on the USB plug, threw a dialog asking me to confirm the fingerprint of the RSA key, but the new phone didn't show the same dialog when connected.

I found a tip at https://stackoverflow.com/questions/18011685/cant-connect-nexus-4-to-adb-unauthorized and tried it out and it worked for me.

I removed two files adbkey and adbkey.pub from ~/.android. Apparently android-studio detects this and creates the keys immediately. As soon as this occurs, the new phone threw the dialog open and started working. I am able to see the phone on the Android-Studio's AVD menu and start running the applications.

adb version 1.0.31, BUT, if I try to run 'adb devices' on the command line, Android-Studio stops showing this phone on the AVD menu.

I still don't see the phone (but that does not bother me as I am able to see the phone from the AVD menu). adb command line utility only showed an emulator that was running, but not the phone connected in debugging mode, one that was seen on the AVD menu, up until the command was run.

$ adb devices
adb server is out of date.  killing...
* daemon started successfully *
List of devices attached 
emulator-5554   device

At this point, reconnecting the phone does not help. AVD menu only showed the emulator that was still running on my computer.

You have to run 'adb kill-server'. Once that is done, and if you open up the AVD menu, Android Studio initializes its own ADB and the phone shows up on the AVD menu.

adb version 1.0.31 Android Studio 2.1

So in summary: two things.

  1. Delete adbkey and adbkey.pub from ~/.android while Android Studio is open.
  2. Do not run command line utility adb. It messes with the server instance run by Android Studio. The server instance from commandline works for some phones but not all. Android-Studio works with all the phones I have.

All the above is of course after making sure:

  • you tap the 'build number' thing 7 times and enabling the USB debugging mode...
  • tried 'revoking the debug permissions' many times
  • tried rebooting the phone a few times
  • enable/disable/enable usb debugging mode,

All the above steps seemed like voodoo things to try, but essentially they didn't work, except the ones I listed above.

(Update: Adding this line that was originally a comment, but belongs in the answer).

I also had to add the new phone's vendor ID to /etc/udev/rules.d/51-android.rules file to help identify the new phone and to set the permissions.

  • removing ~/.android completely worked for me – Tek Aug 7 at 8:16

I just had this happen to me. Debugging was working fine at the office, but broken at home.

Turned out to be my usb cable. Everytime I plugged it in, it would charge but I never received the Allow USB Debugging prompt.

I tried a second cable, same thing.

Third cable was the charm, worked fine with a better cable.

I had to delete the adbkey from /data/misc/adb on the phone and then

In adb shell type > adb kill-server In adb shell type > adb start-server

Now connecting the USB cable brought back the options. For some strange reason I revoked the authorization and been spending hours to get it back..


I've had the same issue and it turned out that having the USB mode set to file transfer instead of charging caused my issue. As soon as I set it to charging mode, it fixed my problem and I was prompted for debugging.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.