你如何保存Android模拟器快照? [英] how do you save android emulator snapshot?

查看:309
本文介绍了你如何保存Android模拟器快照?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是更新到了Android的开发工具是刚刚发布,使您能够保存到和恢复,从仿真快照。有谁知道如何使用此功能?这将大大降低仿真器的加载时间!但我不能找到一种方法来告诉模拟器这样做。谢谢你。

An update to the Android development tools was just released enabling you to save-to and restore-from an emulator snapshot. Does anyone know how to use this feature? This would greatly reduce the emulator's load time! But I can't find a way to tell the emulator to do so. Thanks.

推荐答案

蜂窝介绍了这一功能,它是pretty的爽!这就像一台笔记本电脑的休眠功能。你节省了模拟器的状态成一个大文件,并从该文件后恢复其状态。

Honeycomb introduced this feature, and it's pretty cool! It's like the hibernate feature on a laptop. You're saving the state of the emulator into a big file, and restoring its state from the file later.

有几种方法得到它。第一种方式是开始从Android SDK和AVD管理模拟器时,设置所需的选项,在启动选项对话框(见下图)。擦拭用户数据的选项仍然存在来自前,这将创建一个新的系统,从头开始。新快照选项是从快照到启动(如果已保存previously),或保存到快照时,仿真器关闭。很明显,你必须保存快照之前,你可以从一个发射。快照文件可以得到相当大的,这增加了需要多长时间的仿真器,当您关闭退出。但它是值得的。从快照发起非常快,相​​比经历机器人的整个引导序列。一个你可以做的招数就是保存快照一次,然后从快照启动,但不保存后第一时间为快照。你的创业公司会很快,你的出口将快速。你会从相同的快照状态,虽然每一次出发,无论你在每一个仿真器会话做什么。

There are a couple of ways to get it. The first way is to set your desired options in the Launch Options dialog when Starting the emulator from the Android SDK and AVD Manager (see image below). The Wipe user data option is still there from before, and that will create a new system from scratch. The new snapshot options are to Launch from snapshot (if one has been saved previously), or to Save to snapshot when the emulator shuts down. Obviously you have to save a snapshot before you can launch from one. The snapshot file can get rather large, and this adds to how long it takes for the emulator to exit when you close it. But it's worth it. Launching from a snapshot is very quick, compared to going through the entire boot-up sequence of Android. One of the tricks you could do is Save to snapshot once, then Launch from snapshot but don't Save to snapshot after that first time. Your startups will be fast and your exits will be fast. You'll be starting from the same snapshot state every time though, no matter what you do in each emulator session.

要使用快照另一种方法是从模拟器的命令行。该文件目前并没有提到这些选项,但通过调用模拟器的帮助选项,我们发现这些:

The other way to use snapshots is from the command line of emulator. The documentation currently doesn't mention these options, but by invoking the help option on emulator, we find these:

-snapstorage <file>            file that contains all state snapshots (default <datadir>/snapshots.img)
-no-snapstorage                do not mount a snapshot storage file (this disables all snapshot functionality)
-snapshot <name>               name of snapshot within storage file for auto-start and auto-save (default 'default-boot')
-no-snapshot                   perform a full boot and do not do not auto-save, but qemu vmload and vmsave operate on snapstorage
-no-snapshot-save              do not auto-save to snapshot on exit: abandon changed state
-no-snapshot-load              do not auto-start from snapshot: perform a full boot
-snapshot-list                 show a list of available snapshots
-no-snapshot-update-time       do not do try to correct snapshot time on restore

我还没有尝试过的快照命令行自启动选项对话框更容易。编辑:还有一件事,快照文件被存储在同一个地方作为你的AVD文件

I haven't tried snapshots from the command line since the Launch Options dialog is easier. One more thing, the snapshot file gets stored in the same place as your AVD files.

这篇关于你如何保存Android模拟器快照?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆