Faster start up of the Android Emulator

May 14, 2009

First of all, you may wish to have a look here, and setup a memory card in your project directory called my128MbCard if you want to use any of the scripts or have a look at the TraceViews of our application.

Starting the emulator from eclipse to the Android Home Screen: 1 minute 50 seconds+

Starting the emulator from the command line to the Android Home Screen: ~30 seconds.
(using this command: emulator -avd 1.5sdcard -skin G1 -sdcard my128MbCard)

That’s over 3 times faster!

Anyways give it a crack, YMMV.

I’ll be uploading a few shell scripts to the github repository that:

  • Start the emulator
  • Install the application to the emulator or device and then runs it
  • Uninstall the application from the emulator or device

Note: If you deploy using Eclipse, then uninstall using the command line, then try to deploy again from eclipse, you may encounter the situation where eclipse thinks the application is installed, but it isn’t, so you will enjoy the following infinite loop:

[blah] Application already deployed. No need to reinstall.
[blah] Starting activity com.candlelightproject.lifemap.LifeMap on device
[blah] ActivityManager: Starting: Intent { comp={com.candlelightproject.lifemap/com.candlelightproject.lifemap.LifeMap} }
[blaht] New package not yet registered with the system. Waiting 3 seconds before next attempt.

Simply do a Project->Clean in eclipse, and the deploy will work again.

I’m going to have a play around with TraceView and see if there are any places we can look to optimise in our current application as it stands.

Leave a comment