Updating rooted ROM on HTC G1 (Android)

For a year now, I’ve been content using Enomther’s AOSP 1.6 on my HTC G1 (Dream). I have absolutely no complaints about this ROM, it works perfectly and is a breeze to use. But seeing that it’s been quite a while since the last update and also that Android 2.2 is now available for the HTC G1, I decided to take the plunge and install Cyanogen’s mod v6.1.0 RC1. This one requires Danger SPL for sure and the way to check it is given in this page. Also, Amon_Ra’s custom recovery console is required. I already had v1.2.3, but seeing that the current version is 1.7.0, I decided to upgrade that as well!

The radio on my phone is: 2.22.19.26I. Since I already have DangerSPL installed on my phone (from the time I rooted it last year), looks like I don’t have to worry about this one. Otherwise, you need to have this particular radio and you can download it from the DangerSPL page.

Here’s the link for installing Cyanogen Mod 6.

Ok, updating it to Cyanogen mod was a breeze. Nothing too difficult since I’d done it already previously. I must admit the new boot up screen looks really good. And the whole system is very responsive even though it’s running android 2.2. Wait! I’ve got 2.2! 2.2 baby! Dam, it only just hit me! I’ve got Android 2.2 on my g1! Yes! 🙂

Formatting SD Card on Ubuntu

This is a post just to remind me about the steps needed to format an SD Card on Ubuntu 9.10. I just got a class 4 8GB Kingston SD Card to replace the 1GB Stock SD Card on my G1. Since I’m using a rooted ROM (this one to be precise), I need an ext+fat+swap partition setup on my SD Card. I needed to format the new card identical to the old one and copy the old data onto the new card.

First of all, Ubuntu has a very weird delayed write mechanism that writes data to plugged in devices only when you eject or unmount them. So, if you write something to the card and pull it out, there’s a very good chance that it doesn’t show up. I haven’t seen this anywhere before, especially when using gentoo earlier.

GParted doesn’t display my card which is /dev/sdb. (Update in comments below) So, I decide to use the command line for this. There are three command line utilities for formatting, i.e. fdisk, cfdisk, sfdisk.

cfdisk gives you a UI so that you can select everything using arrow keys. But for some reason, when creating the partitions, it kept creating them as /dev/sdb1p1, /dev/sdb1p2 and /dev/sdb1p3 instead of /dev/sdb1, /dev/sdb2, /dev/sdb3. This kept the disk from showing up when listing the partition table with sudo fdisk -l. Didn’t really investigate why it was doing that. Checked out sfdisk, but the commands are different and looked like I’d need to learn a bit more before I could use it.

So, finally came down to fdisk which is quite handy once you get used to it. Important commands are ‘m’ which displays all the commands and ‘p’ which prints the partition table. So, first created the partitions using ‘n’ and setting them up as 7.4GB win95 fat32 (code ‘b’), 500MB ext3 (code ’83’), remaining 30+MB swap (code ’82’). The file system type can be set using ‘t’ and the codes obtained using ‘L’. The partition table is written using ‘w’.

Now, we need to format the different partitions with the corresponding file systems. This is done as follows:

  • Fat32: sudo mkfs.vfat /dev/sdb1
  • Ext3: sudo mke2fs -j /dev/sdb2 (the -j is required for ext3. Omit it for ext2)
  • Swap: sudo mkswap /dev/sdb3

Once this is done, you should immediately be able to see the different partitions in Nautilus.