Android Emulator: How to Copy an Emulator / AVD?

江枫思渺然 提交于 2019-12-05 00:20:36

问题


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


回答1:


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.



来源:https://stackoverflow.com/questions/18864637/android-emulator-how-to-copy-an-emulator-avd

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!