Android Emulator Required Files

Viewed 587

I want to share one of my android emulators and am trying to figure out what is needed.

I have copied my c:\users\me\appdata\local\android\sdk folder with the exception of the platforms folder which doesn't appear to be needed. Along with my .avd folder and the corresponding .ini. Whilst this is working it's very big and I would like to see if I can slim it down.

I get the impression the system-images folder should only be required to create a new virtual machine, but for some reason if I try and start my avd without the required system-image I get an error. Why is the system image required?

What are the files within my .avd;

  • userdata.img
  • userdata-qemu.img
  • userdata-qemu.img.qcow2

Are there other folders from the sdk folder I can drop?

In several instances my virtual machine has seemed to reset (i.e. all config and installed apps have vanished). Are there any obvious events that could cause this?

1 Answers

You need to copy the whole *.avd folder and modify the configuration files properly. E.g. you have an avd named Pixel_2_API_26, which is by default under directory ~/.android/avd/Pixel_2_API_26.avd on Mac machines. So, you need to copy this Pixel_2_API_26.avd folder completely and put it under the corresponding location on your other machines.

Then either copy or create a file with the same file name, i.e. Pixel_2_API_26 but with extension of .ini and put it under the same location, i.e. ~/.android/avd/, modify the content as below:

avd.ini.encoding=UTF-8
path=~/.android/avd/Pixel_2_API_26.avd
path.rel=avd/Pixel_2_API_26.avd
target=android-26

Then fix all the wrong paths inside all the configuration files, e.g.

  • Pixel_2_API_26.avd/config.ini
  • Pixel_2_API_26.avd/hardware-qemu.ini
Related