Recent Changes‎ > ‎

    Emulator snapshots

    posted Feb 2, 2011, 9:57 AM by weasel@google.com   [ updated Feb 2, 2011, 10:13 AM ]
    The new emulator in Tools r9 has the ability to save and restore its state to a 'snapshot' file in each AVD - so you can usually avoid booting when you start the emulator. This isn't as fully tested as we'd like, but is working usefully for us so we thought it reliable enough to share.

    When creating (or editing) an AVD, tick the 'Snapshot enabled' box.



    The launch dialogue for a snapshot-enabled AVD will offer additional 'Launch from snapshot' and 'Save to snapshot' options.



    The first time a snapshot-enabled AVD is launched, there is no snapshot data so it will boot normally. Pressing the close button will save the state (if that's been selected) and then quit the emulator. Note that saving the state can be three times slower than loading (8 seconds for us) and the window will freeze while that's happening - this is one of the reasons this is only an alpha-quality feature.

    Once the snapshot has been saved, loading is fast - 3 seconds - no booting.

    Other points to note with snapshot AVDs:
    • If you want to reboot the phone, you need to untick the 'Load from snapshot' option.
    • The time is corrected to the current time of day from the emulated cell tower, on average after 8 seconds after restore.
    • Some emulated systems, like cell tower strength, may not be saved to the snapshot, and will restore with the emulator's default setting.
    Comments