Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create the snapshots.img from console?

When creating a new AVD through the AVD manager it is possible to enable the snapshot feature by simply checking the right option in the "Create new AVD" window.

enter image description here

After creating the AVD you can find a file named snapshots.img under <user-home>/.android/avd/<avd-name>/. It is the snapshot storage file for the new AVD.

Does anybody know how to obtain the same result by using the command line tools?

I already tried creating a new AVD by using the android create avd command as well as setting the option snapshot.present=true in the AVD config.ini, but no snapshot storage is created.

like image 733
Andrea Avatar asked Oct 15 '12 13:10

Andrea


People also ask

How to create snapshot of Windows?

Press Ctrl + PrtScn keys. The entire screen changes to gray including the open menu. Select Mode, or in earlier versions of Windows, select the arrow next to the New button. Select the kind of snip you want, and then select the area of the screen capture that you want to capture.


2 Answers

I finally managed to create the snapshot storage file.

The documentation to consider is the QEMU one. In particular, under Linux you can use the qemu-img tool (documentation here).

I created the snapshots.img file by using this command:

qemu-img create -f qcow2 snapshots.img 500M

like image 135
Andrea Avatar answered Sep 24 '22 15:09

Andrea


You can also do android create avd --snapshot which will create the snapshots.img file for you and set the snapshot.present=true flag.

like image 45
pschwamb Avatar answered Sep 21 '22 15:09

pschwamb