How to take a snapshot of the status of the Android emulator?

When I launch the Android emulator from the Android SDK and AVD Manager , I can check the Run from snapshot and Save to snapshot checkboxes , so that the emulator state is saved when I close it and restore it again when I launch it. This is great because I don’t have to wait for Android to load every time the emulator starts. However, I also want to take snapshots of the state of the emulator during the session, and then during the session will go back to the snapshot, for example, to restart my tests. How should I do it? There seems to be no controls in AVD Manager.

+5
source share
1 answer

I found the answer thanks to this comment . To take and upload snapshots, start a Telnet session for the emulator:

$ telnet localhost 5554
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Android Console: type 'help' for a list of commands
OK
avd snapshot save snapshot_name
OK
avd snapshot load snapshot_name
OK

Android emulator freezes for several seconds when saving / loading snapshot. You can also list snapshots with avd snapshot list.

+8
source

All Articles