Urvashi kharecha
Urvashi kharecha

Reputation: 869

My device doesn't show the Allow USB Debugging dialog

My Android Studio shows 'Allow USB debugging from your device', but my device does not show that dialog:

https://i.sstatic.net/QfOMm.png

I have tried the following, but nothing worked:

  1. Adb kill-server
  2. Adb start-server
  3. Kill adb process from Task Manager
  4. Restarted both the computer and the device
  5. Selected both MTP and PTP connections in my device's USB debugging settings.

Upvotes: 20

Views: 97246

Answers (16)

Suliman Ali
Suliman Ali

Reputation: 1

I tried this for my HONOR magic 6 pro and it worked:

  1. Go to C:\Users\ [your user name] \ .android
  2. delete adbkey and adbkey.pub << you may not find adbkey.pub it is ok.
  3. Go to C:\Users[your user name] \AppData\Local\Android\Sdk\platform-tools
  4. Right Click
  5. Open in terminal
  6. Run the following commands

.\adb kill-server

.\adb start-server

.\adb devices

and that is it

Upvotes: 0

AVataRR
AVataRR

Reputation: 21

I might have had a different problem to everyone else, but in my case, I had some stale public/private keys for USB debugging. The fix was to:

  • Go to C:\Users\myUserName\.android (if you're using Windows)
  • Delete adbkey and adbkey.pub files

After I plugged in the Link cable, the familiar Windows USB chime sounded (which wasn't working at all before) — and I got the "Allow USB Debugging" notification on the headset.

Upvotes: 2

hyp3rg3om3tric
hyp3rg3om3tric

Reputation: 549

I tried everything else listed here (as of this post datetime), and the trick I used to finally get it to show up on a Samsung Note 9 was to:

  • In Android Studio (Hedgehog) open the Virtual Device Manager under More Actions on the home screen (Projects).
  • That's it! The auth prompt finally popped up on the phone.

Screenshot of 'Virtual Device Manager' option under 'More Actions' on Android Studio home screen

Upvotes: 0

Tylla
Tylla

Reputation: 309

Try turning your USB-C cable around.

I met this problem using a Sony Xperia XZ2 Compact with a slightly noname USB-A to USB-C cable. None of the other options helped, but as soon as I turned around my cable it worked each time. Still have to find out which is the erroneous one (phone connector or cable).

Upvotes: 2

Michael S
Michael S

Reputation: 1865

Off and on, USB debugging option in Developer options on device

Upvotes: 1

Patrick
Patrick

Reputation: 61

I just solved this problem on my Samsung by going into developer options>debugging and selecting "Revoke USB debugging authorizations. After this I reconnected my phone to my PC and the dialog finally appeared.

Upvotes: 6

Jason Foglia
Jason Foglia

Reputation: 2561

If anyone comes across this. Resolved using factor reset, none of the other solutions worked for me.

Upvotes: 0

Stig Helmer
Stig Helmer

Reputation: 113

On my Zebra device (Android 7.1.2) I had to change "Select USB Configuration" which is under "Networking" in the "Developer Options" from MTP (Media Transfer Protocol) to Charging for the dialog to show.

Upvotes: 0

user15461964
user15461964

Reputation: 29

for me it was vice versa. "from Charging to MTP(Media Transfer Protocol) for the dialog to show" but from MTP to charging (i prefer charging in general)

Upvotes: 1

ADF
ADF

Reputation: 221

In my case I have to set the "Select USB Configuration" which is under "Networking" in the "Developer Options" from Charging to MTP(Media Transfer Protocol) for the dialog to show

Upvotes: 22

Taylor Gronka
Taylor Gronka

Reputation: 62

I ran into this issue with my phone Android 11 after I rooted it. I resolved the issue by disabling and then re-enabling Developer options

Disable Developer options in the Developer options menu.

Upvotes: -1

Kurrapica Zoldik
Kurrapica Zoldik

Reputation: 37

For anyone who is interested, here is how I authorized my PC without the Dialog showing for unkown reseaons (requires device to be rooted):

  1. Go to C:\Users<profile_name>.android\adbkey.pub
  2. Copy the file to any location in your phone using USB cable.
  3. Using Root Explorer, move the adbkey.pub onto this location: /data/misc/adb/
  4. rename it from adbkey.pub to adb_keys and allow read and write permissions
  5. Reboot the device.

Now, your devices will be authorized as if you clicked the Authorize button on the Dialog.

Upvotes: 1

Jesus Iniesta
Jesus Iniesta

Reputation: 12519

This is what solved my problem, appears that the public key might have been missing from my computer, causing the issue. Removing the private key solved the issue.

  • browse to the C:/Users//.android directory and delete adbkey and adbkey.pub
  • do adb kill-server
  • do adb devices
  • watch for an "Allow USB debugging" prompt in the headset

Source

Upvotes: 5

Joachim
Joachim

Reputation: 299

A different, hardware-oriented approach:

Are you sure the cable you're using does allow for data transfer?
Some cheaper cables - usually sold with chargers - don't allow for anything else than charging.
Try another cable, and see if that works.

Upvotes: 18

Vaibhav Malviya
Vaibhav Malviya

Reputation: 1

You have to update the driver on your system with respect to attached device

In window system

  • Go to manage by right click on My computer
  • System tool then Device manager
  • Check your device here
  • Right click on device and Update Driver software

Upvotes: 0

No Name
No Name

Reputation: 470

Try this step:

  1. Tools > Connection Assistant (it will appear in the right side of the android studio once you click it)
  2. Click the Rescan USB devices
  3. Click the next buttons
  4. It should appear the device connected to your computer or try to restart ADB Server if device does not appears in the panel.

sample screenshot below

enter image description here

Hope it helps to fix your problem

Upvotes: 2

Related Questions