Hein (fub) wrote,
Hein
fub

  • Mood:

Unrooting the G1 and getting up to date

I have spent almost all day fiddling with my G1. I had rooted my phone and ran a custom ROM with some theme. Pretty cool and with a lot of features that were not yet available in the 'official' ROM. However, Android 1.6 (codenamed 'Donut') has been sent to phones through Over-The-Air (OTA) updates as release DRC92.
Some things didn't work quite well on the ROM I used -- I frequently got a 'force close' dialog for certain applications, that would simply crap out from under me. Even the camera application crashed the first time I ran it when I had restarted my phone. I wasn't pleased with that, but I did want the new features.
Now that the features are available through the official ROM, I wanted to 'unroot' my G1 and get back with the T-mobile program. However, that turned out to be quite hard. I think I spent three times as much time and effort to unroot my phone than to get root in the first place. A bit counter-intuitive.

For the benefit of everyone who wants to do the same thing, I will post what I did to get back on track. Mind you: I use a European G1, so what you get here is the European updates. Also, I use Ubuntu on my desktop, so all commands will be geared towards that.

Before you begin
Be advised that this process will completely wipe your phone. It'll be as if you just took it out of the packaging, that first time. You'll have to re-setup everything, and you will lose any data for any application. Before you follow these steps, be sure to back up everything you want to retain to your computer!
However, all the applications you downloaded are remembered, so you can easily re-download them through the 'My Downloads'-section of the Market.

Roughly, the process falls into three parts:
- First, we need to make a so-called 'goldcard', which allows you to downgrade your phone;
- Next, we install the downgraded, original ROM (RC8);
- Next, we install the latest update, DRC92.

What you will need
- A G1 with an SD card;
- A computer running Ubuntu;
- An (USB) SD card reader;
- Connection to the internet;
- A USB cable to connect your G1 to your computer.

Preparing a goldcard
If you try to install a downgraded ROM image, you will get a message 'Not allow'. This is a security feature of the phone, which can be defeated by preparing your SD card as a so-called 'goldcard'. Unfortunately, the process to do so is rather involved. I puzzled the whole thing together from multiple forum and blog posts so you don't have to. Here's what you do:
- Install a terminal application through the market. There's lots of 'em -- just download one and start it up. These applications allow you to issue commands to the underlying Linux system.
- Issue the command:
cat /sys/class/mmc_host/mmc1/mmc1:*/cid > /sdcard/cid.txt
- Connect the phone through USB with your computer and copy the file cid.txt from your phone to your computer;
- Open it with a text editor. The file contains a long hexadecimal number. Chop the number up in pairs. In my case, the ID is 1b534d55534420201002207bfb009258. So the pairs are 1b 53 4d 55 53 etc.
- Put the pairs in reverse order, so that the line begins with the last pair and ends with the first pair;
- Change the first pair into '00'. In my case, that gave me 009200fb7b20021020204453554d531b;
- Go to the free G1 goldcard generation page and enter your email adress and the transposed CID (without any spaces!);
- Wait for the goldcard.img to be mailed to you;
- Shutdown your phone and take out the SD card and put it in your computer;
- Start gparted and select your SD card;
- Re-partition the card so that only one partition remains. Format it in FAT32 format;
- Determine the device of the SD card. If it gets mounted to /dev/sdc1, the device is /dev/sdc. Gparted also shows this;
- Issue the following command to turn your SD card into a goldcard:
su dd if=[path to goldcard.img] of=/dev/sdc
Do this as superuser if necessary.

Congratulations, now you have a goldcard that allows you to downgrade your ROM!

Downgrading the ROM
- I have prepared a zip file that contains everything you need. Download it here;
- Unzip this file and put it on your SD card;
- Rename the file signed-kila_eu-ota-15632.a5e2aac2.zip into update.zip on your SD card;
- Put the SD card back in your phone;
- Press the camera and power (end call) buttons to switch on the phone and put it in bootloader mode;
- Once you get the 'rainbow screen' you can release the buttons;
- You will get the option to flash the update. Start the update process by pressing the power button;
- Wait until the update is finished!
- Press the action button (the trackball) to get back to the rainbow screen when prompted;
- Press call, menu and power buttons to reboot your phone;
- Your phone might reboot a few times. Have patience;
- After a bit of waiting, the 'Welcome to Android'-screen appears, just as if you just got the phone. Your phone is now at RC8, a really old release;
- Set up your phone normally, but do not install any applications! We're going to go to Donut after this, so it's not that useful. There's a big chance most of your favourite applications aren't even available in this release;
- Once you get back to the home screen and the first sync is done, it is time to move on to the next step.

Install Donut
- Turn off your phone;
- Turn your phone on by pressing both the home and the power buttons. Keep them pressed until you get a picture of your phone with a warning sign;
- Slide out the keyboard and press ALT-L. A menu appears on-screen;
- Press ALT-S to flash your phone with update.zip;
- Wait until the update is finished!
- Once it's all installed, press home and back to reboot your phone;
- Your phone might reboot a few times. Have patience;
- After a bit of waiting, your G1 will boot into DRC92, and you will have access to all of Donut's sugary goodness!
- Take some time to set up your phone the way you want it.

All in all, these steps may take upto an hour, including waiting for reboots and setting up. And it took me all day to puzzle the information together and hunt for the right updates to download... I hope this is useful for people who are in the same situation. Leave a comment if you have something to say about it!
Tags: android
Subscribe

  • Little Laptop woes and the solution

    Last week Sunday I was sitting on the couch using my little laptop when it ‘seized up’ for a few seconds. And after that, I could not…

  • Little laptop

    Most of the stuff I do on a computer can be done in Firefox: mail, twitter, discord, etc. But my machine is in our office (it’s a proper…

  • CPU upgrade

    I had an AMD A8 in my desktop, one of the AMD APUs which have a CPU and a nifty graphics card built in the same package. Our media computer is an…

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 5 comments