Requirement
Share all the android virtual devices (AVD) across multiple instances. So that, an AVD can be started from any instance.
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
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
andadb 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