Can I tweak my android emulator to make it fast?
Solution 1:
I was having a similar problem (thread here). However, mine was taking 10-15 mins. 90 seconds is blazing fast considering a lot of threads in the Android discussion groups. The emulator is slow by nature and the only recommendation I read was to keep the emulator open instead of closing it and rerunning it. However, as mentioned in my thread, if you have a physical Android device, you can just run it on that. It's what I'm doing at the moment and it was top-notch advice. No long waiting time. If you don't have a physical device, then I can only suggest you don't close the emulator between code changes, as the system will recognise the change.
Solution 2:
use those 3 options.
emulator --cpu-delay 0 --no-boot-anim --cache ./cache --avd avd_name
the first two are obvious. the third one will make the memory of the emulator kind of persistent. you can point it to any file that does not get destroyed by boot (such happens with /tmp) it's like a always-on hibernating device.
Solution 3:
If you absolutely cannot use a physical Android device, what you can do is run the Android OS on Virtualbox, and then get the IP address of the emulated Android. Then you'd connect ADB to the emulator using that IP address. That's the jist of it. I've written a more detailed guide to this approach on my blog. http://www.bobbychanblog.com/2011/07/faster-android-emulator-alternative-using-virtualbox/
Solution 4:
- The -no-boot-anim parameter is good.
- Don't turn the emulator off, just re-launch your app.
- For further speedups, try the new snapshot feature, which is described here.