Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Emulator Unauthorized

I've got a Pixel 2 emulator running Android Q. Whenever I boot the device there's no RSA popup, and no notification that USB Debugging is enabled. Whenever I run adb devices -l I get the following output:

List of devices attached emulator-5554 unauthorized transport_id:1

I've tried wiping the emulator and cold booting it, restarting the adb-server and made sure USB Debug is turned on in the emulator itself.

I tried it on both my desktop running Kubuntu 18.10 & my XPS 15 running the same OS. Has anyone found a fix for this?

EDIT:

It worked when I selected a hardware profile without the play services. Problem solved!

like image 393
Gilles Avatar asked Mar 17 '19 15:03

Gilles


People also ask

How do I troubleshoot unauthorized emulators?

If you are experiencing problems with "unauthorized" emulators, do the following troubleshooting steps: Exit all emulators. Delete both the ~/.android/adbkey and ~/.android/adbkey.pub files. Run the following command: adb kill-server Run the following command: adb devices Wipe the AVD data. Relaunch the emulator.

How do I run an Android emulator without running the app?

Launch the Android Emulator without first running an app. To start the emulator: Open the AVD Manager. Double-click an AVD, or click Run. The Android Emulator loads. While the emulator is running, you can run Android Studio projects and choose the emulator as the target device.

What is an Android emulator?

This Android emulator is mostly for developers. It lets you test your apps on a variety of devices without owning them. You can configure the emulator for a variety of devices with various versions of Android to help suit your needs. For instance, you can run a Nexus One with Android 4.2 or a Nexus 6 with Android 6.0.

What's new in the Android emulator update?

This update includes support for running the emulator directly in Android Studio and virtual devices with Freeform Window Mode activated by default. The Android Emulator can now be run directly in Android Studio .


2 Answers

Seems there was an issue with adb tools.

Taken from Android Studio blog: https://androidstudio.googleblog.com/2019/03/emulator-28112-canary-28025-to-beta.html

ADB from platform-tools 28.0.2 can now be safely used with the emulator. If you are experiencing issues with "unauthorized" emulators:

  1. Exit all emulators
  2. Delete ~/.android/adbkey and ~/.android/adbkey.pub
  3. adb kill-server
  4. adb devices Wipe data of AVD
  5. Relaunch emulator
like image 143
Marcel Avatar answered Sep 29 '22 02:09

Marcel


I created a device without the play store services, which connected instantly!

like image 28
Gilles Avatar answered Sep 29 '22 02:09

Gilles