Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Emulator: How to Copy an Emulator / AVD?

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!)?

like image 319
SMBiggs Avatar asked Sep 18 '13 05:09

SMBiggs


People also ask

How do I transfer emulators to emulator?

Go to "Device File Explorer" which is on the bottom right of android studio. If you have more than one device connected, select the device you want from the drop-down list on top. mnt>sdcard is the location for SD card on the emulator. Right click on the folder and click Upload.

Can you copy and paste into Android emulator?

Just copy from wherever, click and hold on the emulator phone's edit text where you want the text to go (kind of like you would press and hold to paste on an actual phone), the PASTE option will appear, then PASTE.

Is emulator and AVD same?

Android Emulator architectureThe Android Emulator runs the Android operating system in a virtual machine called an Android Virtual Device (AVD). The AVD contains the full Android software stack, and it runs as if it were on a physical device.

Where are android AVD stored?

All applications and files that you have deployed to the Android emulator are stored in a file named userdata-qemu. img located in the C:\Users\<username>\. android\avd\<avd_name>. avd folder.


1 Answers

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.

like image 123
Zax Avatar answered Sep 23 '22 00:09

Zax