Note: these instructions may be out of date. Consider trying whatever instructions are posted on the Android-on-Freerunner page at openmoko.org.
I got Android working (as far as it goes) on my Freerunner using Sean McNeil’s kernel and filesystem images. These instructions are intended for the average Ubuntu users who wants to see the magic of Android on his/her phone with as little futzing about as possible.
Step 1: Partition your MicroSD card
You need to put a FAT (DOS) partition and an ext2 (or ext3) partition on your MicroSD card in order for Android to boot properly. If it’s possible to do this by plugging your Freerunner into USB, I don’t know how. So you will need some other way of reading your MicroSD card with your PC, for example a MicroSD to SD adapter (if your PC has an SD card reader built in) or a MicroSD to USB adapter. Once you have one of these…
- Insert your MicroSD card into your card reader, and your card reader into your PC.
- If there is a filesystem on your MicroSD card already, it may auto-mount. You must unmount the drive(s) on the card before proceeding. You can do this either through Nautilus (right-click the drive and click “Unmount”) or from the command prompt:
sudo umount /path/to/disk/
Partitions (old or new) may remount themselves after you add or remove them using fdisk (below). If so, you will have to unmount those as well.
- Run fdisk:
sudo fdisk /dev/[device number]
- Enter “p” to display existing partitions and their sizes.
- For each existing partition, enter “d” and then the partition number to delete it.
- Enter “p” again to make sure there are no partitions left on the card, and note the total number of cylinders on the card.
- Create the first partition: enter “n” (new partition), then “p” (for a primary partition), then “1″ (for the first partition), then “1″ (start at the first cylinder), then enter half of the total number of cylinders (to make the first partition half the size of the card).
- Create the second partition: enter “n” (new partition), then “p” (for a primary partition), then “2″ (for the second partition), then accept the defaults for the start and end cylinders.
- Enter “p” to make sure that both of your partitions have been created. If they have not, make sure you have unmounted all of the existing partitions and add any missing partition according to #7 and/or 8 above.
- Enter “w” to write the partition table, then “q” to quit.
- Create filesystems on the new partitions:
- sudo mkfs.vfat /dev/[first partition device number]
- sudo mkfs.ext3 /dev/[second parition device number]
- If any of the new partitions are mounted, unmount them (see #2 above).
- Put the MicroSD card and battery back into your Freerunner and close it up.
Step 2: Download the firmware image files
Android requires three image files: the kernel, the root filesystem, and the bootloader. For now, the best kernel and rootfs images to use are those packaged by a developer named Sean McNeil. The latest files can be found here. I provide links to the existing images below, but the filenames may change. The Qi bootloader image is packaged by a user named Andy and is available here (for Android, use the file that begins “qi-s3c2442-”). Again, the names and locations of these files may change as development progresses, so if these links break, just seek out the most recent files.
- Download the kernel
- Download the root filesystem
- Download the Qi bootloader
Step 3: Download and set up the “neotool” flash utility and dfu-util
NeoTool is a handy, lightweight graphical tool for flashing images to your Freerunner’s memory. It uses a command-line utility called dfu-util to do this, so you’ll need that too.
- Download the NeoTool script (this is just a text file, so you may want to right-click and “Save Link As…”)
- Download dfu-util
- Make both files executable—from the command line, navigate to the directory where you downloaded them and enter: chmod +x neotool dfu-util
- Run NeoTool—in the same directory, enter: sudo ./neotool
- In the NeoTool menu, select “Setup NeoTool”, then “Locate dfu-util”. Find dfu-util on your drive and click “OK”. Click “OK” again to return to the main NeoTool menu.
Step 4: Flash the images to your Freerunner with NeoTool
Now we will load the images into your Freerunner’s memory.
- Make sure your Freerunner has a decent charge in its battery, is turned off, and is disconnected from your PC.
- Boot the Freerunner into its NOR boot menu: while holding down the AUX (side) button on your Freerunner, press and hold the power button until a menu appears.
- Attach the Freerunner to your PC via USB.
- From the NeoTool menu, select “Flash your Neo”.
- Select “Root-Filesystem”, “Kernel”, and “Bootloader” from the list.
- NeoTool will ask you to locate the image file for the Root FS first. Locate the file (androidfs.jffs2) on your drive, select it, and click “OK”.
- Next, do the same for the kernel (uImage-android).
- Next, do the same for the Bootloader (NeoTool will ask you for UBOOT even though we are using Qi).
- Click “OK” through the scary message.
- Wait for NeoTool to finish flashing the firmware (you can follow the progress in the terminal from which you started NeoTool).
- When NeoTool has finished doing its thing, press the AUX button on your Freerunner until “Power off” is highlighted. Press the power button to select it and power down your Freerunner.
- Unplug your Freerunner from USB power.
Step 5: Boot into Android
- Hold down the Freerunner’s power button until the screen’s backlight turns on (the screen will still be black) and then for a few seconds more.
- Release the power button and wait for Android to load.
- Android loads! Hurrah! This is way better than Om2008! It found my network! Calling works!
- Oh look, it’s going into suspend. Wait, why does it look like nuclear winter? Why is the screen white? Why doesn’t the power button do anything? I guess I’ll take out the battery. (NB: suspend doesn’t work yet.)
I hope this helps someone. Feel free to send/post feedback.