Mohammad Tabbara
Mohammad Tabbara

Reputation: 1467

Android studio Emulator ( device unauthorized)

I know that on a normal device I have to authorize the debugging process, but Authorizing it on an emulator is my first time.

I just installed my first emulator on my home pc to do some work stuff, and this poped up.

Any idea what is the cause or is it normal for android o api 26 google play SDK?

PS: I am using windows version at home.

Upvotes: 18

Views: 25706

Answers (14)

Murcha
Murcha

Reputation: 1

I fixed it on Win10. When adding new device, choose Android 11 (without Google play)

Upvotes: 0

Alex
Alex

Reputation: 363

Create an emulador without google play services, it can be Android Q (Android 11). It worked for me.

Upvotes: 0

Delete your Emulador, then Create an emulador without google play services, it can be Android Q (Android 11). It worked for me.

Upvotes: 1

Rinaldi Pratama
Rinaldi Pratama

Reputation: 47

I fixed this issue on my Arch Linux while I'm developing Flutter apps, by deleting all of the emulator devices and create a new emulator without the Google Play Store.

Also, in the Graphics setting don't forget to choose Hardware Graphics instead of Automatic and the device will be available and detected.

Upvotes: 0

amarnath roy
amarnath roy

Reputation: 21

I was facing the same issue and tried all most all the suggested steps but following worked for me :

Steps:

  1. Delete all the emulators with google play.
  2. Create new emulator without google Play .
  3. Now if you run the emulator, no authorization issue will be there

Or

An another approach to fix this issue is : Steps:

  1. let your emulator launch
  2. Go to settings and enable the "USB debugger" option as you normally do in real time devices(5 click on Developer Options->build number)

Upvotes: 2

Luke Alderton
Luke Alderton

Reputation: 3296

Had the same issue, none of the answers here worked, eventually found the following worked for me:

Create a new emulator without Google Play and start it, visual studio detects it on first start and the device will be authorised.

Upvotes: 0

Kandarp
Kandarp

Reputation: 965

  1. Keep the Emulator on

  2. Delete android folder using

    rm -rf ~/.android

  3. Then restart adb

    adb kill-server

  4. You should get a prompt on the emulator to allow USB Debugging

  5. View the device status

    adb devices

This should fix the issue, I used this to fix when I was having issues launching the emulator from expo when making a react native app.

Upvotes: 0

ParikshitSinghTomar
ParikshitSinghTomar

Reputation: 417

I also face the same issue and its generated because I copied my SDK from one PC to another PC with Same configuration(Software and Hardware). Now I create an emulator on Pie and also tried Oreo but unauthorised comes for both.

Solution: I delete my build tools, platform tools, emulator only not complete SDK and download all of them again. Now I create my emulator for all type of Version and now no unauthorised error for all type of emulators.

Upvotes: 0

lava
lava

Reputation: 7363

TOOLS-->AVDMANAGER

Image1

Image1

Click on tooltip on the right side, you can see wipe data before doing that turn off your emulator.

This Worked for me.

Upvotes: 2

AllanRibas
AllanRibas

Reputation: 1144

when this happens you can request permission through the emulator demonstrative video

But on the android Q api 29 emulator, when USB debugging is requested, the alert is gone before it can be confirmed, and the emulator bugs, preventing the emulator from connecting. I am not able to solve, just resetting and losing everything to solve.

Upvotes: 3

Mercy Reuben
Mercy Reuben

Reputation: 17

Just delete the ~/.android folder.

Upvotes: 0

Steven Heffner
Steven Heffner

Reputation: 21

For this to work for me I had to start a new emulator from android studio with Oreo instead of Pie as a system image.

Upvotes: 0

Tim Baverstock
Tim Baverstock

Reputation: 568

I found a mismatch between the .android/adbkey* files associated with the user running the process running adbd, and the same file associated with the user running the emulator.

I don't know about windows, but this is possible in Linux if you run adb as root to work around file permissions.

Fix: As the user running the emulator, type this into a command shell:

adb kill-server; adb devices

Upvotes: 1

Mohammad Tabbara
Mohammad Tabbara

Reputation: 1467

Issue Resolved.

Step 1- Made a new emulator(Any). Step 2- then fixed another problem the black screen by changing the settings to use hardware graphics.(Dunno if this problem was related to the bug)

And Bam every thing worked.

Upvotes: 12

Related Questions