6

Requirement

Share all the android virtual devices (AVD) across multiple instances. So that, an AVD can be started from any instance.

Setup

android emulator setup

  • I have multiple instances where the Android Sdk are donwloaded
  • Location of .android is put in a separate HDD, wherein all the AVD devices lies

Problem

I am able to create avd from an instance and also able to start avd from that particular instance only. But when I try to start avd from another instance, it gives the following unauthorized error

Command: adb devices -l

adb unauthorized error

Solutions Tried

These are the solutions that I tried but it didn't work.

  • Tried to kill adb server and start again, adb kill-server and adb start-server
  • Tried generating a new adbKey using adb pubkey ~/.android/adbkey > ~/.android/adbkey.pub and replacing it with old ones.

Commands

  • To create the emulator
avdmanager create avd --name test -b google_apis/x86 -k "system-images;android-30;google_apis;x86" --device "pixel"
  • To start the emulator
emulator -avd test -gpu swiftshader_indirect -show-kernel -snapshot test -port 5542
Sabbiu Shah
  • 1,569
  • 3
  • 16
  • 28

0 Answers0