Sunday, January 22, 2012

Froyo Hands in the Air (Android on the O2 Joggler)!

A few months back, I finally managed to dedicated some time to investigate running Android on my O2 joggler. I've had the device for some time now, but I had it running Ubuntu Netbook Remix (UNR) 9.10 after following instructions I found on the JogglerWiki site. However, while the Ubuntu installation was OK (and pretty cool!) it wasn't perfect:

  • The Joggler only has 512MB of RAM, which isn't a lot for a machine running a full desktop operating system, but I thought the Ubuntu NetBook Remix would be suited to the low-spec environment. Instead, I found the UNR application launcher (which is actually quite good for touch-capable displays) consumed a great deal of that memory. As there wasn't much memory available for other applications, I ended up creating a swap file, leading me onto the next point:
  • Running UNR off a USB thumb drive was very slow. I suspect this is due to the media's relatively slow write speed, especially for smaller amounts of data. This meant that any time the OS needed to page data to the swap file the whole system ground to a halt.
  • Despite the application launcher having large icons and seemingly being designed with touch-screens in mind, I found the interface difficult to navigate. This appeared to be because touching the display emulates a mouse pointer being moved around the screen, which unfortunately became very inaccurate and targeting smaller menu items was incredibly difficult.
  • The on screen keyboard that I had available to me was pretty poor as well; it always seemed to take up the entire screen, which meant typing anything of a substantial length was tiresome.

So, even though I ended up with a very customisable OS that I could use for multiple purposes, I found myself longing for a truly touch-oriented system. This is what lead me to attempting an install of Android onto the Joggler. In researching the install process, I found several useful resources:

The only issue I had was getting Android to boot, which was caused by my insistence in manually creating my own partition scheme, instead of using the available image file. My reasoning for doing so was so I could properly use the entire capacity of the thumb drive. The mistake I made was opting to create a GPT partition scheme; the Joggler has an EFI BIOS, so this was a fair assumption to make that it would be supported and bootable. However, when I downloaded and examined the blank disk image, I noticed it uses an MSDOS partition scheme instead of GPT. Once I created an MSDOS partition scheme on my thumb drive, I had no problem booting at all!

In summary, the steps I took to boot Froyo were:

  1. Created a new MSDOS partition scheme on the thumb drive using fdisk. As there were only three partitions required, I opted to make them all "primary", as opposed to having an "extended" partition to contain the 2nd and 3rd:

    1. the first partiton I defined started at the beginning of the drive and 1024 MB in size. I changed the partition ID to "fat32".
    2. the 2nd partition was 1024 MB and of type "Linux"
    3. The final partition filled the remaining space and of type "fat32"

  2. Wrote the changes out to the thumb drive.
  3. Proceeded to format each partition as required (examples below assume USB drive is /dev/sdc):

    1. mkfs -t vfat -n ANDROID /dev/sdc1
    2. mkfs -t ext2 -L Data /dev/sdc2
    3. mkfs -t vfat -n SD /dev/sdc3

  4. Mounted the "ANDROID" file system at /mnt.
  5. Extracted the Froyo tar under this mount-point.
  6. In order to have the install use English language, I had to modify the grub.cfg in the root of the ANDROID partition; changing the LANG=zh to LANG=en.
  7. Extract the Google Apps archive under this mount point as well, in order to install the apps later on (optional).
  8. Unmounted the file system and ejected the thumb drive.
  9. Inserted the thumb drive into the Joggler and powered the device on.
  10. Used the supplied file manager to install the Google Apps in the following order:

    1. GoogleServicesFramework.apk
    2. OneTimeInitializer.apk
    3. SetupWizard.apk
    4. Talk.apk
    5. Vending.apk
    6. Gmail.apk
    7. Maps.apk

  11. Configured the device with a Google account to use with the Market and Mail applications.

After using the Joggler for a while, I began to notice a few problems with the Android installation:

  • Poor application compatibility; most of the apps in the market don't seem to be compatible with the device. However, I did manage to get Last.fm installed by backing up the application from my phone using App Monster and making this available on my network to download via HTTP on the Joggler, where I could install it manually.
  • The virtual home button stopped working after a while.
  • Clock needs to be manually corrected after (re)booting the device.
  • No Google calendar integration in the build and with the current selection of apps.
  • After a long session listening to music via Last.fm, the wireless connection seems to die; the interface shows an "Error" status in the system configuration menus. This can only be resolved by rebooting the device.

Overall, however, I would say the Android experience on the device is pretty good, in particular the following:

  • Android on my joggler!!!
  • Hardware graphics acceleration appears to be working
  • On screen keyboard a big improvement over UNR.
  • Widgets allow the creation of highly customised home screens, reducing the need to navigate into various apps to view their content.

Originally, I wasn't sure about what exactly I'd be using the Joggler for; it was more an experiment to see what was possible with the device. However, since installing Android, it is now resident in my kitchen at home and provides a way to listen to music, catch up on news, the weather and look up recipes online. To provide the necessary functionality, I've installed some additional apps:

  • Weather app
  • BBC app
  • Last.fm

I'm hoping that, over time, the application compatibility will improve, allowing me to install applications like Last FM. In the meantime I've downloaded the Android source code in an effort to compile the OS myself; I would like to see if I could get Ice Cream Sandwich running on the device! The main barriers seem to be integrating the appropriate drivers into the kernel in order for the touch-screen to be recognised.