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.1 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/2
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:3 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.
Android requires three image files: the kernel, the root filesystem, and the bootloader.4 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.
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.5
- 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.
- Despite the Freerunner’s agonizing early history, there is still a very active community developing and testing the platform, and though none of the many distributions available for the platform are ready for primetime, that community has actually accomplished a lot. Unfortunately, relatively little effort is dedicated to “bringing up the rear,” i.e. explaining clearly to less sophisticated users how to do all of the fun stuff the hardcore developers are doing. Sean McNeil’s kernel and filesystem images go a long way toward making Android accessible to the average user, but his instructions for installing them do not work for me, and I couldn’t find any that did. I pieced together these from 3 or 4 different sources, none of which contained the whole answer. I hope they’ll be useful to someone. [↩]
- When I mounted the MicroSD card using an SD adapter, it mounted as /dev/mmcblk0 and I unmounted the drives using:
sudo umount /dev/mmcblk0p*. When I used a USB adapter, it mounted as /dev/sdb and I unmounted the drives using
sudo umount /dev/sdb*. Yours may mount differently. Be careful that you have correctly identified the SD card and not some other more important drive on your computer. [↩]
- Again, you may need to unmount the first partition before you can do this. [↩]
- Supposedly you can use the default bootloader, u-boot, to load Android if you modify its environment to allow for larger kernels. I tried this several times and was unsuccessful. I have had no issues using Qi and it is reportedly faster. [↩]
- This menu will only be displayed for 30 seconds, and then the phone will turn off again. If this happens before you begin flashing the firmware, just repeat this step. [↩]