4
votes

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

https://i.stack.imgur.com/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.
8
Which device do you use? - Shohel Rana
samsung j5 i used but it happens in any device - urvashi

8 Answers

6
votes

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.

4
votes

Can you Please Following Below step:

1) Go to Phone Setting > Developer options > Revoke USB debugging.

2) Turn off USB debugging and Restart Again.

It will work definitely, in my case it worked.

2
votes

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

1
votes

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

1
votes

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.

0
votes

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
0
votes

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.

0
votes

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