Here's the information you will need if you're attending my "Embedded Workshop" at ESC India and would like to follow along. This is a summary of the series of tweets sent through @opersys yesterday. As mentioned in the email sent by ESC India, you don't need to do any of this. The talk is formatted for you to benefit from it whether you follow along in a "hands-on" fashion or not.

First, make sure you have VirtualBox installed, it's free. Then download the image I've prepared for the wokshop: oea-110714.vdi.bz2. It's 2.8GB in size and once uncompressed will weigh in at around 7.8GB. It's in fact a 30GB auto-expand VirtualBox image (i.e. it'll only grow as is required, up to 30GB, but won't shrink.)

Once, you've extracted the image, start VirtualBox and click on "New". Follow the wizard and make sure you select the following:

  • The OS type is Linux->Ubuntu (NOT 64-bit)
  • Give it 1GB of RAM
  • When asked for "Virtual Hard Disk", point it to oea-110714.vdi

Once the VM is created, click on "Settings" and give it 2 CPUs if possible.

It's highly recommended that you build Android ahead of time as the first run is usually quite lengthy. To do so, start the VM and log in. There's only one user on it, "Opersys", and its password is "opersys" - all lowercase.

Once you've logged in, start a shell and type the following ("$" sign is for context, you don't need to type it in):

$ cd android/aosp-2.3.4
$ . build/envsetup.sh
[note: there's a space between the "." and "build/ensetup.sh". Type as-is.]
$ lunch
[This will ask a question, just press enter until you get the "$" prompt again.]
$ make -j4
[The "4" assumes 2 CPUs. If you only gave it one, then put "2" instead.]

This will run for a while; possibly a few hours, the shorter the better -- ideally less than an hour. Do NOT close that terminal. Wait for it to be done (i.e. once done it gives you a "$" again and doesn't spill out any errors right before that ... ; if all goes well just towards the end of the output you should see it mention that it's generating "system.img".)

Once done, from that same shell, type:

$ emulator &

This should start an Android emulator and if you give it a few minutes you'll see the Android desktop and will be able to click around.

If, for whatever reason, you close the terminal and want to go back to the emulator, you'll need to re-set some environment variables (notice that you don't need to type "make"):

$ cd android/aosp-2.3.4
$ . build/envsetup.sh
$ lunch
$ emulator &

All of it should work just fine, so long as you follow those steps as-is. Looking forward to seeing you at the workshop.