Android Emulator: How to Copy an Emulator / AVD?
Asked Answered
A

2

10

I am currently making an upgrade of an existing app that's already on the Google App store (aka Google Play). I want to test that the data conversions go smoothly when customers upgrade.

I have an AVD with the old version of the app installed. The usual thing would be to run the new version on this app and see if it works. But the problem is that after doing this, that particular AVD is no longer mimicking that old state.

I'd like to make copies of this AVD/Emulator (yeah, the whole thing!) so that I can make repeated tests.

This seems like something that would happen often, but I can't find any references to this situation. Or am I missing something obvious (I hope!)?

Aeromancy answered 18/9, 2013 at 5:38 Comment(2)
Do you mean to say you want to create a backup of your AVD??Conjunction
Yes! That's another way of saying it.Aeromancy
C
22

If you want to create a backup of your AVD, then follow the below steps:

To find your avd folder on you machine, check your user directory. For me, with user name “zax”, those locations are:

  • Windows 7: \users\zax.android

  • Windows XP: C:\Documents and Settings\zax.android\ on Windows XP

  • Linux/Mac: ~/.android

Steps for backing up your AVD:

  • Go to the .android folder and pick the avd you want to export.

  • Compress the device.avd folder and the device.ini file. (where, device is the name of the device that you want to backup. Eg. mmx.avd and mmx.ini)

  • Copy the compressed files to the new location

These AVD, you can even move across OS, Only thing is you have to change the user name in the device.ini file and so syntax like slash is different for win and linux.

Goto AVD manager> Import > select the backed up .avd > in case x mark is show, repair the device.

Hope this has met your requirements.

Conjunction answered 18/9, 2013 at 5:58 Comment(1)
Good enough for a check! However, for me (on a macintosh), all the AVDs are in the ~/.android/avd/ directory. Also, note that on my version of the AVD manager there is no import. But making a copy in the same directory with a different name will show up automatically by hitting the "refresh" button in the AVD Manager.Aeromancy
E
1

For everyone who uses windows and used "junction" mklink in windows for android devices:

There should be a folder C:\Users\%Username%\.android\avd which can be copied and then symbolinked into another drive like O:/%Username%/.android/avd (external non-system data SSD)

And then you probably reinstalled on OS and loaded configuration from previous OS c:\user\%Username%\AppData\Roaming\Google\AndroidStudioX.Y

(source: https://mcmap.net/q/202941/-from-where-do-i-import-settings-from-previous-version-of-android-studio)

Use these cmd's to locate and link the .android avd folder:

C:\Users\%Username%\.android
mklink /j "avd" "O:\%Username%\.android\avd"
Eldridge answered 19/1 at 8:59 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.