May 05 AT 12:41 AM Taylor Wimberly 349 Comments

Beginners Guide For Rooting Your Android G1 To Install Cupcake

This guide is outdated and a newer version if offered.  Please visit How to root a T-Mobile G1 and myTouch 3G.

I first wrote this guide several months ago, but decided not to post it.  After all the cupcake builds were released and people kept asking for help with upgrading, I decided to touch it up and put it out in the open.  If you are interested in rooting your phone and installing one of the latest cupcake builds, please read the entire guide before getting started.

If you are nervous about upgrading or want more information on the pros/cons read our article about the different flavors of Android.

This article serves one purpose:  demonstrating the easiest method possible to root your Android device.  It is currently intended for the T-Mobile G1 and will be updated when other hardware becomes available.  If you do not know what root access is, then you most likely should not attempt to modify your phone.  Having a rooted phone is mostly for power users.

Preparing Your Phone For Root – Important Disclaimers

Before we begin to root your phone, let’s cover a few basics.

This guide is intended for US phones.  If you are in a country other than the United States, please visit the xda-developers forums for more information on rooting your Android device.

If you do not read and follow instructions, you will have trouble.  We are trying to make this guide as fool proof as possible, but if you do not follow instructions, you will have problems.  I suggest reading the entire guide before you start.  This way you can become familiar with the entire process.  Thankfully, most upgrade problems can be resolved by flashing the RC29 downgrade and starting over.

Make sure your battery is fully charged.  We do not want your phone to die out in the middle of an upgrade flash.  Go plug it in now while you read the rest of this guide.

Set aside at least 60 minutes to root your phone.  The entire process can be completed in about 30 minutes, but I suggest you plan on it taking longer.  We do not want you to get half-way through and then stop.  If you start the root process and do not complete it, you might be unable to use your device and make phone calls.

If you install a non T-Mobile build of Android, you will be missing T-Mobile apps like MyFaves. You can still update your MyFaves online, but will be missing the app for now.  If this is a problem for you, then do not upgrade.  Also absent from the Android Developer Phone builds are several of the messaging clients like MSN, Yahoo, and AIM.  If you need these apps, there are many replacements available in the market.

A WiFi connection will greatly reduce the total time required and I highly suggest it.  You will be downloading several files with some as large as 40MB.  Connect to a WiFi network when possible.  You could attempt this over 2G/3G but I do not recommend it.

The first time you root your phone, all data will be wiped.  Any data you want to keep must first be backed up before you begin.  Most of the important information on your phone is synced with Google, but there are other things you might want to backup.  Call logs, SMS history, and phone settings are the most commonly backed up items.  Thankfully, there are several applications in the Android Market that can backup most data on your phone.  MyBackup Pro from Rerware allows you to backup your data to your SD card or online.

Part of the root process requires you to format your SD card.  After you have backed up data to your SD card, be sure to copy it all over to your PC before formatting.  If you have an extra microSDHC card, I suggest using the spare for the root process.  Also note it takes several minutes to format your micro SD card to the FAT32 file system, so I suggest using the smallest sized card to speed up the process.

After you root your phone, you will not receive system updates from T-Mobile.  Part of the root process blocks T-Mobile from applying updates to your phone.  This is done on purpose to prevent a future update from removing root access.  The good thing is you can manually update your phone to a new custom version of the operating system.  T-Mobile tends to roll out new updates over the span of several days, but when you have root you can apply the update as soon as its available.  This update process for some root users has been simplified with the application JF Updater.  See the end of this article for more information on keeping your phone up to date.

If you run non supported software, T-Mobile will not offer technical support for you.  This can be a make or break issue for some people.  Instead of turning to T-Mobile when you have problems, you will turn to the community for help.  There are many ongoing efforts in the community to help people and most questions can easily be answered via Twitter or several Android forums.  You can of course, return to the official T-Mobile version of Android whenever you choose.

Part 1. Downgrade Your Phone to RC29.

Before we begin, let’s check the current build of Android you are running.  From the home screen, press the Menu button and select “Settings”.  From the settings menu, scroll to the bottom and click “About Phone”.  At the bottom of the about screen you will find the “Build Number”.  Look for the part that says “RC##”.  The numbers after RC indicate the release canidate you have installed.  If you have RC30 and above, you will need to downgrade back to RC29.  The purpose of this downgrade is to exploit a security hole that existed before RC30 was released.

In order to apply updates to your phone, we must first format your micro SD card to the FAT32 file system.  As noted above, when you format your SD card, it will erase all data.  Most micro SDHC cards are already formatted for FAT32, but some are FAT16 and I suggest doing it again if you are not sure.  Instructions for Windows users:

  • Hook your phone up to your PC using a USB cable.
  • Click the notification on your phone that says “USB Connected”.  Select the “Mount” option.
  • Once the device is mounted, you will see a removable disk show up on your computer.  Right click the device and select Format.
  • Pick FAT32 for the file system and click start.  Do not perform a quick format.
  • When the format is complete, you can disconnect your phone by clicking “safely remove hardware” like any other USB device.

Now that your SD card is formatted, we can start the root process.  For this guide we will be using the root application created by Mike Moussa.  His app simplifies the process by including download links to the required files you will need.  It also scripts some of the commands to prevent you from making typing errors.

Download the root app here:

You can either download the file on your PC or directly to your phone(I suggest phone).  Before we can install the file, we need to tell your phone to allow non-Market applications.

  • From the home screen, press “Menu”.
  • Go to “Settings” first then “Application Settings”.
  • Check the box that says “Unknown sources”.

Now that we can install non-Market applications, we need to find the file on your phone and launch it.  If you are in the Android browser, you can go to menu > more > downloads.  If you have a file manager like Linda installed it should be located in “/sdcard/download”.  Click the file called “root.apk” and hit install.

Update:  Some users have reported the DREAIMG.nbh file gets corrupted when downloading over 3G/Edge.  To avoid this just download the file to your PC and then copy it to the SD card.

When the root application is installed, launch it from your application tray.  Click on “Step1: Download NBH file” to start the first download.  This file “DREAIMG.nbh” is what will downgrade your phone back to RC29.  Wait for the download to finish, then complete the following steps.

  • Power off your phone.
  • Holding down the camera button, power the phone back on.
  • Wait for the bootloader to come up all the way, and press the Power button to begin the update.
  • When the first part completes it will prompt you to hit the action key to continue.  The trackball is the action key.
  • Once the update is finished, you can reboot your phone by pressing TALK+MENU+POWER.

Stop and Verify:  When the phone reboots, you should be greeted by a fresh install of Android.  Go through the setup process again for signing into your Google account.  You can double check that the downgrade was successful by checking your build number as explained earlier.  Press “Menu”, then “Settings”, and click “About Phone”.  Your version after the downgrade will read RC29.

Part 2. Install New Bootloader.

Now that we are running RC29, we can exploit the known security hole to gain permanent root access.  The next step involves replacing the SPL or secondary program loader.  This new bootloader is what allows us to load a custom build of Android.  Note that the SPL is independent of the Android build that runs on top of it.

Since the downgrade wiped our phones, we will need to reinstall the root application we used earlier to finish up the process.

Download the root app again here:

Follow the previous instructions to install the root app and launch it.  We will now perform “Step2:  Download IMG and HardSPL files”.  The security hole we will be exploiting requires you to type a command on the physical keyboard.  After you click Step 2, wait for the download to complete and then perform the following steps.

  • Go to the home screen and open up your keyboard.
  • Hit enter, pause a second, then hit enter again.
  • Type “telnetd” in all lower case minus the quotes. Ignore the contact search that comes up.
  • Press enter again.

After typing the “telnetd” command return to the root.apk app and press “Step3: Protect your root”.  This step runs a script that will perform the SPL upgrade.  If you see any errors, it means the telnet session is not open.  Return to the previous instructions and try launching telnet again.  If you are still having problems with Step 3, reboot your phone and try again.  After the script runs, we need to reboot the phone to apply the update file.

  • Power off your phone.
  • Hold down the Home key and power the phone back on.
  • When you see the triangle with the ! inside it, then press Alt+L to display the bootloader options.
  • Press Alt+S to apply the file.
  • When the update is finished, you can reboot by pressing TALK+MENU+POWER.

Part 3. Upgrade the Radio Image to support Android 1.5

Before we move onto the last part, we must upgrade the Radio Image to the latest version that supports Android 1.5.  The new radio image has been posted on HTC’s support website for download.  In order to apply the Radio update, we must download the file “”.

Update: If the HTC download does not work, here is an alternate link to download

Once the file is downloaded, it must be renamed and placed in the root directory of your SD card.  This means to place it in the main directory and not inside any folder.  If there is an file already present from the previous steps, it is ok to overwrite the file or delete it.  When the radio image file is renamed as and placed on your SD card perform the following steps:

  • Power off your phone.
  • Hold down the Home key and power the phone back on.
  • When you see the triangle with the ! inside it, then press Alt+L to display the bootloader options.
  • Press Alt+S to apply the file.
  • When prompted, hit Home+Back to write the image file.
  • When the update is finished, you can reboot by pressing TALK+MENU+POWER.

Stop and Verify:  You can check the version of your radio image to make sure it updated.  Go to Settings > About Phone > Baseband version.  The version number should end in just like the original name of the update file.

Part 4. Install Custom Android Build.

Now that the hard parts are over, we are ready to install a custom build of Android.  There are many to choose from, but I suggest the most recent build from JesusFreke.  His version includes multi-touch support in the browser and a host of other features.  I have chosen the JF build because it was voted the most popular and has been downloaded the most times.  There are also custom builds available from Haykuro and The Dude that we will explore in a future post.  For this last part, we will no longer use the root.apk application.  It links to an old version of a JesusFreke build that we do not want to install.  Instead, we will download the latest build from his blog

The file we want to download is JFv1.50 ADP1.5.

Please note that this cupcake build along with the others is based on the ADP version of Android and is different from the RC builds that T-Mobile offers.  The Android Developers Phone version is the build given to developers and lacks the T-Mobile branded apps.  The Release Candidate builds are approved and released by T-Mobile.  You can swap back and forth between build types, but you will need to wipe your phone each time.

Once you have downloaded the update file JFv1.50 ADP1.5 it must be renamed and placed on your SD card like before.  Make sure the file is named and copied to the main directory of your SD card.  The most common problems I have seen are Windows users who name the file by mistake and others who place the in the wrong place.  After the file is in place we need to reboot and apply it:

  • Power off your phone.
  • Hold down the Home key and power the phone back on.
  • Wait for the bootloader to display, then press Alt+L to display the bootloader options.
  • Press Alt+W to wipe the data and cache folders.  You must wipe when going form a RC to ADP build.
  • Press Alt+S to apply the file.
  • When the update is finished, you can reboot by pressing TALK+MENU+POWER.

After the phone loads back to the home screen, you are now complete.  One of the first apps you should download is JF Updater.  This will make getting updates in the future much easier and you will not have to repete all these steps.

Stop and Verify:  Look at the list of programs you have installed.  You should now see Terminal Emulator.  This means you are now running a custom build.  Launch Terminal Emulator and type the following command to display what version you have:  “getprop ro.modversion”.  It should read JFv1.50.

More To Follow:

  • Creating an ext2 Linux partition on your SD card
  • Moving your apps and cache to your SD card
  • Installing and using a WiFi Tether app

I could keep typing forever, but I will stop and let people check for errors.  Will update in the morning.

Taylor is the founder of Android and Me. He resides in Dallas and carries the Samsung Galaxy S 4 and HTC One as his daily devices. Ask him a question on Twitter or Google+ and he is likely to respond. | Ethics statement

    Most Tweeted This Week