Justin808
Justin808

Reputation: 21522

How do I launch an android AVD thats not in the default location?

I have an AVD in a ~/development/app/test/android folder:

~/development/app/test/android/Test1.ini
~/development/app/test/android/Test1.avd

How can I launch this without moving them into ~/.android/avd?

I've tried adding -sysdir ~/development/app/test/android/ but that didn't work.

Upvotes: 0

Views: 56

Answers (1)

Digit
Digit

Reputation: 2113

This can be done by doing the following:

  1. Move the config file and content directory to ~/development/app/test/android/.android/avd/, this will require modifying the 'path' value in the .ini file.

  2. Define ANDROID_SDK_HOME in your environment to point to $HOME/development/app/test/android

When this variable is defined, the emulator will always look under $ANDROID_SDK_HOME/.android/avd/ for AVD configuration files.

Also a file like Test1.ini contains a line like:

path=/full/path/to/Test1.avd

Which gives the path to the AVD's content directory.

By default, the SDK's AVD Manager creates new AVD instances with a content path of $ANDROID_SDK_HOME/.android/avd/.avd but you can actually use a different location as long as your .ini file points to it.

The .ini file is always looked up under $ANDROID_SDK_HOME/.android/avd/ though.

Upvotes: 1

Related Questions