Aaron Williamson


Android on Openmoko Freerunner (Ubuntu 8.04 Hardy Heron)

by Aaron Williamson

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…

  1. Insert your MicroSD card into your card reader, and your card reader into your PC.
  2. 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.

  3. 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.
  1. Create filesystems on the new partitions:
  • sudo mkfs.vfat /dev/[first partition device number]
  • sudo mkfs.ext3 /dev/[second parition device number]
  1. If any of the new partitions are mounted, unmount them (see #2 above).
  2. 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.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.

  1. Download the kernel
  2. Download the root filesystem
  3. 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.

  1. Download the NeoTool script (this is just a text file, so you may want to right-click and “Save Link As…”)
  2. Download dfu-util
  3. Make both files executable—from the command line, navigate to the directory where you downloaded them and enter: chmod +x neotool dfu-util
  4. Run NeoTool—in the same directory, enter: sudo ./neotool
  5. 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.

  1. Make sure your Freerunner has a decent charge in its battery, is turned off, and is disconnected from your PC.
  2. 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
  3. Attach the Freerunner to your PC via USB.
  4. From the NeoTool menu, select “Flash your Neo”.
  5. Select “Root-Filesystem”, “Kernel”, and “Bootloader” from the list.
  6. 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”.
  7. Next, do the same for the kernel (uImage-android).
  8. Next, do the same for the Bootloader (NeoTool will ask you for UBOOT even though we are using Qi).
  9. Click “OK” through the scary message.
  10. Wait for NeoTool to finish flashing the firmware (you can follow the progress in the terminal from which you started NeoTool).
  11. 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.
  12. Unplug your Freerunner from USB power.

Step 5: Boot into Android

  1. 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.
  2. Release the power button and wait for Android to load.
  3. Android loads!  Hurrah!  This is way better than Om2008!  It found my network!  Calling works!
  4. 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.

  1. 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. []
  2. 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. []
  3. Again, you may need to unmount the first partition before you can do this. []
  4. 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. []
  5. 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. []

12 Responses to Android on Openmoko Freerunner (Ubuntu 8.04 Hardy Heron):

jjsm586 posted on December 9, 2008 at 6:29 pm:

THANK YOU, I had been trying to install android for ever & thanks to your article I was able to do so :D

aaron posted on December 9, 2008 at 6:31 pm:

jjsm586: Glad to hear it! Thanks for making this worth writing up!

https://me.yahoo.com/gnublade#cc026 posted on December 10, 2008 at 6:15 pm:

If you have existing working opkg based image on your FR you can partition it with that (just make sure you stop any services that are using it (fuser -vm /dev/….).

If fdisk segfaults on you opkg install util-linux-fdisk and proceed as above.

Am fairly pleased with Android although wifi isn’t working for me and I’m having problems with SMS which Sean has I believe fixed (though am waiting for a newer image). Using it as my daily phone.

aaron posted on December 10, 2008 at 6:16 pm:

gnublade: does that mean suspend is working for you? or are you just carrying around your wall-wart?

effbiai posted on December 10, 2008 at 7:13 pm:

Did you manage to turn off suspend?
And have you ever seen the “no service after a short while –
bug”? (it’s mentioned here:
http://forum.koolu.org/viewtopic.php?f=10&t=16) And maybe know a
workaround for it? :)

vivek posted on December 12, 2008 at 5:05 pm:

I have a neo 1973, i want to port android on tha one, since both 1973 and freerunner have same arm core, i assume same images/procedure will work for 1973 as well, can you please confirm if my assumption is correc, if not then why is that? and what different i need to do to make it work on 1973.

aaron posted on December 12, 2008 at 5:15 pm:

vivek: from what I understand, these instructions *will NOT* work on the Neo 1973 (and flashing the bootloader on the Neo is dicey too). The user Benno has apparently solved the Android-on-Neo problem (http://benno.id.au/blog/2008/11/02/android-on-neo1973) but does not explain how, although he did explain why he was unable to make the port work in the first place (http://benno.id.au/blog/2007/11/21/android-neo1973). Sorry I can’t be of more help.

pravi posted on December 16, 2008 at 9:39 pm:

You can use adb (Android debugger) to see the logs and to get into a shell.

ADBHOST=neo ./adb logcat – like a tail -f of the android log
ADBHOST=neo ./adb logcat -b radio – same as above for the radio logs
ADBHOST=neo ./adb shell – bring up a command shell to the phone
ADBHOST=neo ./adb kill-server – kill the background server on the host

jka posted on January 20, 2009 at 8:21 am:

It didn’t boot when I followed your instructions, but with small corrections I got it to work. I’m having a 2GB microSD and GTA02. It didn’t boot correctly when the first partition was 1GB big, so I entered +8M instead of the half disk size, Then I had to set the filesystem type for the first partition to 6 (FAT16). This is done after you have created the first partition with fdisk (type t and then 6). Also note that there are three different Qi bootloaders available at: http://people.openmoko.org/andy/

qi-s3c2410-*.udfu is for GTA01
qi-s3c2442-*.udfu is for GTA02
qi-s3c6410-*.udfu is for GTA03

Pingback: Yang » Blog Archive » Install Android on Openmoko Note

qasimalikhawaja posted on June 4, 2009 at 1:03 pm:

hi buddy you wiki for flashing android was the coolest but the i ran into a one problem.
First of all when i boot into android nothing appears on the screen except for the black light.
MOre over I’m sure the android is successfully installed on my freerunner as i can interct with the andoird using adb shell.

What could be the problem? can u suggests some solution?

aaron posted on June 4, 2009 at 2:21 pm:

Sorry man, I haven’t been keeping up with android builds, so I’m not sure what the current procedures are. Good luck!

Leave a Reply