The complete step-by-step guide to rooting your Android phone

by Ross McKillop on September 21, 2009

Android Windows

This tutorial will guide you every single step of the way through the process of rooting your Android phone, and installing the Cyanogen ROM.

NOTE: this tutorial is no longer accurate. I’m leaving it up because steps 6-20 are still required for the new way to install CyanogenMod.

I’ve created this guide by using several other sources I found online. None were (in my opinion) as comprehensive and easy to follow as this one.

If you’re wondering why you’d want to root your Android phone, give Lifehackers Five great reasons to root your Android phone a read.

It should be noted right up front: following the steps in this tutorial may void the warranty on your phone. All of your settings and applications will be wiped out (but the data on your SD card will remain intact).

Note: the steps and screenshots in this tutorial are specific to the HTC G1. It’s my understanding that this process will work perfectly fine with the myTouch 3G, but I cannot personally confirm that, as I don’t have one.

Here goes:

  1. Start out by plugging your your phone into your PC via USB. Once it’s connected to your PC, you should see a small USB icon in the upper left corner of your phone. Drag the “menu bar” down and there will be an entry titled USB connected. Tap (or click) it.
  2. Now tap the Mount button.
  3. In your browser, visit this page and download the latest stable release of CyanogenMod. The file will be in the format of update-cm-x.x.x-signed.zip (make sure to download the zip file and not the md5sum file). At the time of this tutorial, update-cm-4.0.4-signed.zip was the latest CyanogenMod. Use the date column on the right side of the page to determine which one is the latest version.

    Once you’ve downloaded the file, copy it to your Android’s SD card. The SD card can be found by going to My Computer and locating the drive that represents your SD card.

  4. After you’ve copied the CyanogenMod .zip file to the SD card on your phone, slide down the menu bar again and this time tap Turn off USB storage.
  5. You’ll be prompted with a Turn off USB storage window – tap the Turn Off button.
  6. Now open the browser on your Android phone. Enter the URL http://ryebrye.com/files/flashrec.apk.
  7. The file is just about 4MB in size, so it might take a minute or three to download.
  8. Once the download has completed, tap the download entry for that file.
  9. If you haven’t previously enabled installing 3rd party applications, a warning window will pop up. Click the Settings button on that screen. Note: if you have previously enabled installing 3rd party apps, skip down to step #12.
  10. The Application settings window will open. Tap the ‘grayed out’ check mark next to the Unknown sources entry (so that a green check-mark appears).
  11. Tap OK on the warning window.
  12. Use the Back button to return to the downloads list. Now tap the download entry for flashrec.apk again. This time you’ll be prompted to install it. Click the Install button.
  13. Once the installation has completed, tap the Open button.
  14. On the Recovery Flasher window, tap the Backup Recovery Image button.
  15. Let the recovery flasher do its thing. It’ll only take a few moments.
  16. Once the backup has completed, you should be presented with a screen that says Backed up. at the top. Now tap the Flash Cyanogen Recovery 1.4 button.
  17. Once this process has completed, you’ll be presented with a screen that says Flashed new recovery image. at the top.
  18. At this point you need to power your phone off. Hold down the power button and select the Power off option.
  19. Tap OK to shut your phone down.
  20. Hold down the Home button and click the power button to turn your phone back on. It’s very important that you hold down the Home button when turning your phone back on or Android will over-write the recovery image that you just installed.

    When Android powers up, you’ll be presented with a new screen – the Cyanogen recovery image. Use your trackball and navigate down to nandroid v2.2 backup. Click this entry with the trackball.

  21. Cyanogen will now create a recovery image for you. This is very helpful if you ever need to restore your Android phone. Don’t skip this step.
  22. Once the backup has completed, you’ll see a screen with Backup complete! at the bottom.
  23. Now scroll down to the entry titled wipe data/factory reset and click it with your trackball.
  24. You’ll be asked to confirm this action by clicking the HOME button on your phone. Do so now.
  25. Cyanogen will now wipe your Android phone. Once this process has completed, scroll to the apply any zip from sd entry and click it.
  26. Select the .zip file that you copied to your SD card way back in step #3. Again, this file should be titled something like update-cm-x.x.x-signed.zip. Once you’ve selected that file, click it (using the trackball-button).
  27. Click the HOME button to confirm this action.
  28. The process of applying the CyanogenMod can take a couple of minutes to complete, so don’t worry if nothing seems to be happening.
  29. Once it says Install from sdcard complete at the bottom of your screen, scroll to the reboot system now entry and click it.
  30. Your phone will now restart. You’ll notice that the boot screen is slightly different now. This is a good sign.
  31. Once your device finishes starting up, right away you’ll notice a new background image.
  32. If you’d like to confirm everything installed, open your Settings, scroll down to About phone and select it. There should be a new entry in that list titled Mod version. It should say CyanogenMod-x.x.x (where x.x.x is the version you downloaded and installed).
  33. Once again mount your SD card in Windows (see steps #1-3 above). There should be a new file on your SD card titled recovery-backup.img. Copy this file to your PC. This is the backup that you created in step #14, and it’s very important and helpful to have if you should every decide to restore your Android phone. It’s also a good idea to copy this file elsewhere – to your online backup service, a DVD, an external drive etc. You may even want to email a copy to yourself if you use an online email service like Gmail, so that it will always be stored on the Gmail servers.
  34. That’s it! You’ve now rooted your phone and installed the CyanogenMod mod. Explore your Applications and phone – you’ll notice a number of new apps and features. One of which is that you now have 5 ‘home’ screens instead of 3. You should also notice that your phone is considerably faster – one of the main reasons to go through this process.
  • Pingback: How to partition your Androids SD card to install apps on it – Simple Help

  • Pingback: How to install CyanogenMod 4.1.99 on your G1 Android Phone – Simple Help

  • Jun

    step 15 keeps saying backup failed what do i do

  • Chip

    @Jun: have you found a solution to the Backup FAILED problem. I am getting the same result. I don’t know if anything is supposed to be done first, like rooting, wiping, flashing or partitioning.

  • niv

    i also get a “Backup FAILED.” What to do?

  • robf

    The RecoveryFlasher does not install. Simply says “Application Install Unsuccessful” Is there a way to use the other flashrec (which does install) to manually install this image (ie where is it)

  • niv

    @robf have you tried after a wipe?

  • Abhiroop Basu

    I’m getting the backup failed as well!!

  • darrell

    *backup failed* sounds like the recovery console may not be compatible with donut yet… Russ made that comment in another discussion. said he was checking on it. look for his post here http://www.simplehelp.net/2009/10/04/how-to-install-cyanogenmod-4-1-99-on-your-g1-android-phone/

  • Abhiroop Basu

    But, my phone is the HTC Magic, and it has not been updated to donut, still using cupcake.

  • andrewty

    Could it be possible that the back up isn’t working because i(we) don’t have rooted phones yet. I will be rooting my Dream tonight and then try this and will return with the findings.

    P.S. I’m having a little bit of trouble finding a link to rc29 that works. So if anyone knows of a working one, a link would be great. Thanks.

  • AndroidUsr

    To Andrewty:
    i have RC29 i can email you.

  • AndroidUsr

    I think we’re all having the same issues regarding BACKUP FAILED.
    I have CyanogenMOD 4.0.4 If by a show of “hands”, how many of you have ver 4.0.4 already installed?
    Of those that DON’T have ver 4.0.4, what’s your ver 7

    My theory is this: if our phones are previously MODd by ANY of Cyanogen’s MOD, the RECOVERY is always done at the time of modding, just prior to a FULL wipe. But it
    ‘s always been my impression that the RECOVERY was purely an option. IF, the RECOVERY wasn’t performed then, i suspect that’s the reason why our current RECOVERY is failing.

    Looking at this from Cyanogen’s POSSIBLE PoV, these instructions are written for stock, OEM out-of-the-box T-mobile phones… Never having been modded prior.

    So, i’m modding my G1 as though it has a working RECOVERY backup, foregoing the 1st Step @ SimpleHelp.whatever, and simply modding w/ 4.1.99, then the DREAM uppdate, then 4.1.999

    My 2 cents, AndroidUsr

  • AndroidUsr

    Re: BACKUP FAILED
    All went perfect. A crucial step was left out of the instructions – su needs to be run via Terminal to enable pernissions to be fixed, i.e., fix_permissions. But update is good to go. 4.1.999+Recovery img 1.4

    Excellent build so far. no Radio issues, & no prob w/ updates or Apps

  • Abhiroop Basu

    I’m still confused as to what is required. I have never rooted my phone before so is that problem?

  • AndroidUsr

    To Abhiroop,
    Root, or SuperUsr (su) is a must. During your Mod, the file sys needs permissions, & certain apps you’ll need require root/su access.

    If you come from the Windows world, Administrator access is the analogue.
    Mac world; Super User.

    Follow along @ XDA or Cyanogen’s www, triple check each step & all will go well.

    androidusr

  • BigYetti83

    If you are getting the backup failed message and you have already installed 1.6 you need to downgrade your OS to 1.5 and then run the backup again and it will work as stated in tutorial. I don’t want to link to another site from this one but if you do a google search for “How To: UnRoot Your MyTouch 3G/Get Back To Cupcake” you will find the instructions on how to restore 1.5 to your phone.

  • BG

    i keep getting the backup failed error…. what do i do?
    Pls help!

  • AndroidUsr

    BG, what ver of Mod, if any, do u have? Stock, 4.1.1? etc…

  • BG

    none… i do have the 1.6 update…. how do i get back to the 1.5 cuz it seems dats the issue

  • AndroidUsr

    BG,
    Ok, you have a stock phone.
    You need to root your phone, then apply Recovery Image 1.4, then you can BACKUP, at which point you are free to Mod w/ 4.1.99, followed by 4.1.999 + Recovery Image 1.4 (this is completely diff than the 1st Recovery).

    ALL the procedural steps can be found here: http://www.cyanogenmod.com

  • AndroidUsr
  • AndroidUsr

    People; If you like Cyano’s Mod,
    Plz buy that Man a Beer! Many hrs poring over a terminal pounding out code isn’t all that xciting.

    Oorah, AndroidUsr

  • BG

    how do i work the nandroid

  • AndroidUsr

    BG,
    >Power off phone
    > Home+Power boots you into Recovery Console
    >scroll down to Nandroid Backup. Select w/ trackball & follow instructions

  • AndroidUsr
  • BG

    i did that but it doesn’t show me nandroid backup…. it jus shows me the screen with the exclamation mark… n when i hit alt+L there is no nandroid option… so confused

  • AndroidUsr

    BG, i’m now assuming you have a Stock G1, yes? nevr Mod’d?

  • BG

    yes… you are correct…. does that mean there’s no hope for me…lol…..
    so what do i need to do

  • AndroidUsr

    BG, if you have a Virgin G1- nevr Mod’d- follow this Tutorial- http://www.simplehelp.net/2009/09/21/the-complete-step-by-step-guide-to-rooting-your-android-phone/- & you will succeed.

  • BG

    dats wat i was following,n thats how i got the backup failed error……

  • BG

    n the link you gave says “page not found”…..but i searched it…. n its the same page that says to download the recovery flasher and all…. n when i run it, it says back up failed….

  • BG

    do u have like an IM client so we can chat live

  • AndroidUsr

    BG,
    e-me, androidusratgmaildotcom

  • Samuel Leung

    Problems on step 14… Getting ‘Backup Failed’.
    I currently have build “dream_devphone=userdebug 1.6 DRC83 14721 test-keys” (and the original 1gb Micro SD installed) and would REALLY REALLY REALLY appreciate any help getting ROOT back and updating to latest CyanogenMod. From other comments it seems like plenty of people are experiencing the same problem.

  • Kat

    same problem as other people are mentioning. Trying to root a virgin mytouch using Recovery Flasher and getting “Backup FAILED.” any help would be greatly appreciated thanks!

  • Kat

    nvm figured it out. for those who are still stuck (and have a new unmodded phone like me) you need to downgrade the OS first from 1.6 to 1.5. instructions found here: http://theunlockr.com/2009/08/22/how-to-unroot-your-mytouch-3g/

    then follow the steps on this site. good luck!

  • MIchaelK

    Ok lets start at the beginning. I did as you said. The second reboot of my device booted to android 1.6 default with all the apps. So something didn’t take with the cm 4.1.99 version. Now I’m stook with the dream_devphone_1_DRC83_14721 version. I can’t use the flashrec. It’s giving me a Backup Failed message. My phone is nolonger rooted and I can’t seem to get it to take an update.zip. I don’t want to brick my phone. If someone has an Idea. I’m all for it.

  • Jordan

    i have 4.1.999 installed

    but market and gmail doesnt work

    help!

  • Michaelk

    Ok all, I’ve succeeded and everything works!!! There’s an issue with Market that sometimes the download doesn’t begin. Normally a reboot solves this. I hope cyanogen will fix this.
    The issue is to upgrade to android 1.6 as written above, then reboot into recovery mode, install 4.1.99, run the fix_permissions reboot your device,activate the device, reboot to recovery and install 4.1.999. All works great. exactly as written above… works…..!!!! and is rooted!

  • William

    I can’t seem to install the flash program…
    When it downloads on the phone, it won’t let me install.
    I’ve wiped the SD card and I have rooted RC-30 1.0 if any of this helps?

  • Lance

    I am running CM 4.1.11.1 on my G1.. Will the instructions for downgrading to cupcake on magic work on my G1? I am getting the same backup failed issue.

  • Mario

    phone just frozen on the recovery flasher when i hit flash cyanogen recovery 1.4.(says working do not interrupt. im running 1.5 at the moment. thank you.

  • htariq

    i tried to boot into the recovery console…but it jus gets stuck at the ROGERS screen and doesnt go anywhere :S
    any help??

  • MrGibbage

    I currently have cyanogenmod-4.04, kernel 2.6.29.6-cm4 shade@toxygene. When I press and hold home while booting up, it ends on a screen that says Android system recovery utility build JFv1.42
    Now when I try to install this new recovery utility, I get the famous Backup Failed message, and the option to install the utility is greyed out and not selectable.
    I am pretty sure I am still on cupcake… don’t remember anything about donuts.
    How do I proceed? Can I install the latest CM mod without doing this recovery utility step, or do I need to figure out a way to install the recovery utility?

  • kany

    i followed each step here and on step #29 it says reboot i rebooted and when i was starting up it is stuck at screen T-Mobile G1 not doing anything it is been 40 min.s now

  • MichaelK

    At one point I was stuck at the same “back up failed” messages. I went a head and reinstalled the DREAIMG. Which set me back to the original factory version of the G1. Then I worked forward, cupcake rooting etc… If there’s no other way. you’ll need to find a method of getting the dreaimg onto the root of the SD card. Follow the instructions on cyanogens wiki page
    http://wiki.cyanogenmod.com/index.php/Full_Update_Guide_-_G1/Dream_Firmware_to_CyanogenMod

  • MrGibbage

    I’m just a little hesitant to do that. I have had root since week one when the G1 came out. I never had to downgrade or anything. I am worried that if I reflash with the stock image that I could never get my root back. But perhaps that is exactly what I need to do.

  • Wingnutt

    I am about to lose MY MIND!

    I had the latest update of Donut, and kept getting the backup failed message.
    As per what I head on the discussion here, I downgraded to 1.5

    NOW the recovery flasher doesent work!!! after the install, I have a LAUNCH and a DONE button.. the LAUNCH button is greyed out, and the app does not appear anywhere on the phone!

  • Wingnutt

    Now im stuck at RC29, I assume it will automatically update to RC30 then 33, or will it jump straight to 33?

    I cant find a way to force it to 30, all I can find is stuff on how to get it to 30 rooted, which I could care less about.

  • AndroidUsr

    @Wingnutt,
    You need to care abt rooting your G1. Root is the ONLY way we can MOD these phones. The ability to MOD is directly tied into obtaining root; it’s the exploit of a security hole in the Bluetooth Stack that allows us to obtain root, & thusly the MOD…
    I suggest you start over from the beginning, & go thru the steps methodically & patiently. Follow along here:

    http://wiki.cyanogenmod.com/index.php/Full_Update_Guide_-_G1/Dream/Magic32B_Firmware_to_CyanogenMod
    If you run into an issue, post back here w/ issue; provide details.

    AndroidUsr

  • Graham

    My phone stalls on the T-Mobile G1 screen also. Anyone know what I can do?

  • Alex

    Does anyone know what to do in both @Kany and @Graham’s situation? I got up to step #29 and after I hit reboot it got stuck on the green myTouch 3G screen. Any ideas?

  • abhiroopb

    Thanks for your help.

    I am still unable to root. Have documented my problem here: http://forum.xda-developers.com/showthread.php?p=5381441#post5381441

  • Seb

    Help! I’ve got an HTC Magic on Vodafone UK, and am desperate to get Cyanogen so it’s not such a poor phone, but I can’t seem to get beyond the Flash Recovery bit… When I try ‘Backup Recovery Image’, i get a fail, and when i bypass that and try to flash the cyanogen recovery, I get a fail. Has anyone got a simply step-by-step instruction for getting Cyanogen on the Magic? Please?

    thanks!! :)

  • Rigo89

    mytouch froze on step 30 ..its on that green screen that says “my touch 3g” idk what to do!!!! help

  • arcbod.26

    having a problem wit my android phone,ever since i formatted it am unable to get it started what do i do to get it started.

  • lidaf

    Im getting backup FAILED

  • http://stanford john

    duz this erase everything on your fone?!?!?!?!

  • b

    ryebye is 404… the rest of the net seems to have old versions. where to get a modern apk?

  • the file savior

    Give me your email, and I can do better than give you a link; I just happen to have the original DREAIMG.NBH rc29 flash image in a backup folder on my desktop…