rooting my G1 and flashing to CyanogenMod

My old G1 with a cracked screen is good for something: trying out the root/mod procedures without worries :-)

First, to root: Downgrade phone

First thing to say is that you really do need to format the SD card. The phone wouldn’t find the firmware image with other stuff on the card. Also note that you gotta umount the phone device on the host before you can repartition the card from the host. gparted didn’t want to format the card as it was – it comes with one big partition at the root, gparted wanted to create a partition table and a partition so i let it.

I got the four colored horizontal bars, installed the update. Evidently there’s no “proper” way to turn the phone off from this mode – buttons do nothing – so I just remove battery/power.

The phone of course comes up freshly installed and w/ no SIM card it won’t activate. So I pop in the Sim card from my newer G1 and use that. I use the same Google account to activate, hope that’s no problem. Wish it would let me turn on wifi, would be a lot faster than edge. But OK, we’re set.

I’m sadly reminded of how responsive the phone was at this point, and how unresponsive my new phone is now with all the updates and installs. But OK, that’s why I’m doing this in the end.

Next, installing the … installer.

So I ran telnetd and used the telnet put the cm-update img on my SD card, but ls /sdcard doesn’t show anything there (and yes, I umounted from the host). netstat on the phone shows an IP address but I can’t telnet to it from my host, which sucks. It will ping but not accept telnet, weird. Hm, and after that ping, now it’s working, WTF. WEEEEIIRD. But at least now I don’t have to type on the phone keyboard.

So there’s nothing in /sdcard. I looked around and found a random article that showed what device is used for the sdcard, and mounted it manually. I assume the reason it didn’t mount itself is because of the new partition structure. Here’s what I did:

# mount -t vfat /dev/block/mmcblk0p1 /sdcard/
# ls /sdcard
DREAIMG.nbh
cm-recovery-1.4.img

Looks good. Something tells me that using a remote machine to run the self-flash routine may not be the greatest idea, so i use the on-phone telnet for that. Maybe if I’m brave I’ll try it the other way sometime. Or I’ll figure out how to do all this in an emulator.

Ran flash_image, the lack of feedback is disconcerting but OK. Took no time at all, I guess this was a minor thing I could’ve done remotely.

Now to get the files for the actual OS image.

I downloaded DRC83_base_defanged and checked the MD5 sum (downloads get corrupted and I don’t wanna brick the thing). Deleted the other files on the SD card. Download latest version of CM, checked MD5 sum. Downloaded the radio thing, no md5sum to check, doh.

Now the actual flashing of the firmware. This goes as described until the end. It was showing the box opening up to the phone for a LOOONG time. I asked on IRC if this was normal and they said not, but that status indicated it was likely doing the radio update. Pressing Home + Red (End) got me back to the recovery menu. I don’t remember what all I did there – I think I retried “Apply images”, I know I rebooted at least once and got the menu back or the box-to-phone screen. Eventually I chose the “reboot” option from the menu, and it started booting the CyanogenMod screen so I knew I was at least not too bad off.

(08:05:00 AM) sosiouxme: looks good. how do i tell if the radio update worked?
(08:05:25 AM) PsychoI3oy: sosiouxme, settings->about phone
(08:05:37 AM) PsychoI3oy: for baseband version the first number after the _ should be a 2

It was. So evidently I’m good. Very relieved, could’ve been bricked.

For some reason I can’t mount the SD card on the phone. Going to move it back to my stock phone and write its original image back over it if I can. Should be fun fiddling with CM and maybe I can show it tonight at Android meetup.

Advertisements

One Response

  1. […] rooting my G1 and flashing to CyanogenMod « Teh Tech Blogz0r by Luke Meyer linked to this post on January 21, 2010 […] there’s nothing in /sdcard. I looked around and found a random article that showed what device is used for the sdcard, and mounted it manually. I assume the reason it […] […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: