amerw
amerw

Reputation: 427

Android Emulator keep showing allow USB debugging prompt

I just installed Android Studio Bumblebee (2021.1.1 Patch 2)

But when I try to run my emulator, I got allow USB debugging prompt that always showed up even after I press allow, check the always allow option, or even cancel it. I already tried to restart my adb server and remove and create a new emulator, wipe the data and try to cold boot it, but the issue persists.

Does anyone know what is the root cause of this issue and how to solve it?

I can still develop using real device but I do want to know if this issue able to be resolved.

emulator keep showing prompt

Emulator: Google Pixel 3 API 30

Upvotes: 10

Views: 6029

Answers (5)

Bink
Bink

Reputation: 2201

In my case, adb kill-server did not resolve the issue; I had to kill the adb process.

One way this can be done in Windows is by going to Task Manager, the Process tab, right clicking on the adb process, and then clicking End task.

Upvotes: 0

Marcel Hofgesang
Marcel Hofgesang

Reputation: 1040

You might already found a solution, but I had the same issue today and I hope this answer will eventually help others.

In my case the solution was to disable mDNS for wireless debugging and restarting adb via troubleshooting of device connections.

1. Disable mDNS
File > Settings... > Debugger > Deselect Enable adb mDNS for wireless debugging

Disable mDNS

2. Restart adb
Dropdown Devices > Troubleshoot Device Connections > Next -> > Restart ADB server

Dropdown Devices

Upvotes: 1

Robert
Robert

Reputation: 42829

If the "Allow USB debugging" message is shown again and again then this is usually a problem of the host, not of the Android device.

You should reset the Android ADB authentication key by deleting it and then restarting ADB. A new authentication key (pair) will be generated which will hopefully work.

To do so delete the files adbkey and adbkey.pub in the folder ~/.android/.

Then execute adb kill-server and finally restart adb by executing adb start-server.

Note that this will reset USB ADB authorization of all devices you had connected to that PC/user account.

Upvotes: 5

amerw
amerw

Reputation: 427

I able to resolve this issue by creating new AVD with X86_64 system image. ADB devices

Emulator running

Upvotes: 3

Filip Debelić
Filip Debelić

Reputation: 21

I had the same issue and and manage to fix it by turning off and back on usb debugging in emulator developer options. Still don't know what caused the issue in the first place.

Upvotes: 2

Related Questions