How To: Flash a Custom Recovery Image on the HTC G1 / Dream

OBSOLETE: SIMPLY DOWNLOAD ROM MANAGER FROM THE MARKET AND SELECT FLASH RECOVERY TO FLASH A RECOVERY INSTEAD OF THIS PROCEDURE. THEN HEAD TO SECTION IV TO CONTINUE.

I. Before You Begin

1. You must have done our How To Root (AndRoot Method) procedure.

II. Setup ADB

1. Head over to our How To Setup ADB procedure, once done and you can see your phone’s serial number, come back to this procedure and continue.

III. Flash a Recovery Image

1. Download the custom recovery image for your phone and flash_image and save them to your computer.

G1/Dream
Roger’s Dream

Flash_image (Updated 09.24.10)

2. Copy the recovery image and flash_image to the C:\AndroidSDK\Tools folder you setup during the ADB setup procedure. (Its the same folder that has adb.exe in it).

3. Plug your phone in via USB cable and make sure USB debugging is still checked on from the ADB procedure. Do NOT mount the sd card, just leave it unmounted.

4. Open a command prompt on the computer by clicking on the Start menu and typing cmd and hitting enter.

5. In the command prompt type the following with hitting enter at the end of each line (if you get an error after the “adb push flash_image” line below, make sure you downloaded it and copied it into the tools folder of the AndroidSDK as instructed in steps 1 and 2 of this section):

cd\
cd c:\androidsdk\tools
adb push recovery.img /sdcard
adb push flash_image /sdcard
adb shell
su
mount

6. When you hit enter after typing in mount it will give you a list. Look in the list towards the bottom for a line that looks like “/dev/block//vold/179:1 /sdcard”. It may be slightly different but it will have /dev/block at the beginning and /sdcard at the end. We are going to now type mount [AndTheLineWeJustFoundThatLooksLikeTheOneAbove].

mount -o remount,exec /dev/block//vold/179:1 /sdcard

(Again keep in mind yours maybe be slightly different than mine here, make sure to change what you type here according to what you saw in the options after typing mount originally)

7. Then continue typing with hitting enter at the end of each line:

cd /sdcard
./flash_image recovery /sdcard/recovery.img

6. You should now have a custom recovery image! Turn off the phone and turn it back on by holding down Home and Power until the recovery screen comes up. Once it is up, head to the next procedure to load a ROM.

IV. Loading a Custom ROM

1. Head to our How To Load a Custom ROM procedure to continue.

227 thoughts on “How To: Flash a Custom Recovery Image on the HTC G1 / Dream”

  1. ok so i followed the steps but when i try into the command… adb push flash_image /sdcard it says cannot stat ‘flash_image’ : no such file or directory please help

      1. thank you so much… but now when i turn my phone off and then turn it on holding home and power i get a rainbow screen n i cant do anything

    1. Kd,

      Yes, that is bad lol
      You need to make sure you did the rooting procedure and have root access, it should pop up a superuser permission and ask you to allow it on the phone when you type su (I’m guessing that’s where you got the permission denied).

  2. yea when i did the first step it showed me the serial number, now i got another issue.. it says it cannot find the flash_image in the directory

  3. IIght thats my last comment here, i did evrything, evrything workd exept dat NOTHING pops up on my phone to ask me if im allowin the su to mount yes i did root my phone and all wat do i do now

    1. Kd,

      Did you root your phone using our How To Root linked at the top? Go back and do that, then once it is done, reboot the phone to make sure superuser permissions is in the app drawer when you’re done. Then come back to this one, it’ll only take 10 minutes…

  4. i did evry step, at the end of the commancd prompt it does the same thing that is does with yours it gives me the blanc phrase. Once i close my phone and press HOME and POWER nothing comes up.

    1. Bary,

      You need to keep holding home and power. Regardless of what you did in this procedure at LEAST an ! will come up (that’s the original recovery). Just make sure you turn off the phone and turn it back on by holding down home and power and KEEP holding it until something pops up.

  5. ive been pressin for 2-3 minutes and nothing comes up, the flash image link that u gave us doesnt work btw, so i downloaded another sites flash_image

  6. Just wondering why y’all changed the way you root the phone and the recovery image and flash is it better more stable idk I’m learning thanks for everything guys

  7. Hey I did all the steps right and everying wbnuit when i boot my phone and when I boot it I don’t get the new recovery image I get the one with a triangle and the phone. Please HELPP!!!

  8. I did everything right and followed everything all the steps now when I go to turn my phone back on holding the power and home button it never leaves teh tmobile g1 screen what seems to be the problem?

  9. I am getting a “out of memory” error when i click enter on the final step. is there anyone that can help me with this?

    DJ

  10. How do I make a backup of the original recovery image so that I can send my phone in for warranty repair? Do I use the method in “How to Unroot G1”?

  11. i seem to have set this up correctly as i am getting the phone listed after ‘adb devices’ but when i try ‘adb push recovery.img /sdcard’ (or with ‘flahs_image’) i get this error:

    “Failed to copy ‘recovery.img’ to ‘/sdcard’: Is a directory”.

    I know that last part “Is a directory” doesnt make sense but thats the line. The recovery.img and flash_image are both in the adb tools folder.

    Any help would be appreciated.

    1. that just means that you mounted your SD Card when you plugged in the USB cable. Reconnect and don’t mount the card. For further clarification, see step 3. 🙂

  12. do i use theflash_image in the description iy says its for HTC Evo Flash Image
    do i use it for my g1? thank you….p.s i could not get the link for g1 to work thanks again

  13. When i type mount -o remount,exec /dev/block/vold/179:1 /sdcard
    says mount: Operation not permitted. How can i solve this problem?

    1. I’m getting this same error. “Operation not permitted” right after trying the mount. Also there is a really long string after the “/sdcard” part – something like “vfat rw,dirsync,nosuid,nodev,noexec…….” etc. Am I supposed to include that part too when doing the mount command? I did follow the new root procedure and I have the superuser icon in my menu. am I supposed to do antying with that? How can I test if I really succeeded in rooting?

        1. So, do I unroot and reroot with the check mark uncheck for “Generate log in/sd card? But what about the other option for the “soft root” and then start this process all over again?

        2. So, do I unroot and reroot with the check mark uncheck for “Generate log in/sd card? But what about the other option for the “soft root” and then start this process all over again?

        3. I just want to say that I “solved” my problem. I decided to start over and reroot without the sd card checked AND I found on another site about RENAMING the SD card of “Removable Disk” on the computer to simply sdcard and all of my problems were solved. I did the home + power button and the image is there! 🙂 But nowhere do I see here on the page about simply renaming the removable disk unless I over read it but it’s done now and I’m not going to look for it. 🙂 Also, The ADB is renamed to android-sdk-windows. So you have to type cd c:android-sdk-windowstools and not the one on this site. I also copy and paste each line which also worked for me with another error I was having as I guess was mentioned about the font.

        4. I just want to say that I “solved” my problem. I decided to start over and reroot without the sd card checked AND I found on another site about RENAMING the SD card of “Removable Disk” on the computer to simply sdcard and all of my problems were solved. I did the home + power button and the image is there! 🙂 But nowhere do I see here on the page about simply renaming the removable disk unless I over read it but it’s done now and I’m not going to look for it. 🙂 Also, The ADB is renamed to android-sdk-windows. So you have to type cd c:android-sdk-windowstools and not the one on this site. I also copy and paste each line which also worked for me with another error I was having as I guess was mentioned about the font.

  14. thank you i have one more question i get to the end of the steps hit enter and it says flash_image: not found i have checked everything to makr sure i didnt mess up and as far as i no everything was right ant ideas where im goin wrong? thanks 4 the help

    1. Hi,
      yes I’ve been doing it on a mac.
      In step 5, you replace adb with “./adb”

      Then when you type su, you must authorize it in the pop up window on your phone.
      I’m stuck at the last step though.
      It keeps saying “permission denied”.

  15. According to the CyanogenMod site, I need to use DangerSPL to increase the partition size to hold their ROM. Do I run through your whole procedure and then return to “section III step 9” to install DangerSPL and then the CyanogenMod 6 ROM? Many Thanks! G1/DMA64/1.6

  16. Oops, my previous msg was suppose to be on the “How To Load a Custom ROM” page. Sorry, I trying real hard not to get confused…

  17. hi, when i type su, my phone doesnt show superuser permission, then i wait for like a mins. the cmd say permission denied. can anyone help me wif this problem?? thz =]]]

  18. I have root as i have checked in Terminal Emulator and get the # after typing su.
    I have completed all steps successfully but when I get to step 7 I get –
    ./flash-image: permission denied
    What would be the reason for this and how can I get beyond this step?
    Any advice would be greatly appreciated. thanks for the guide as well.

  19. what do i do if i restart my phone and i see the old tmobile recovery img. i tried re-downloading everything. and starting over but same result it every step works except when i reboot my phone in recovery, its old tmobile screen

  20. I have done everything right but when i finish flashing the last file and reboot the phone i get stuck on the android logo. What do i do to fix this?

    1. I don’t know if this will help anyone,but for the people getting the “permission denied” after typing “su”…. After typing in “su”, check your phone, it may be asking you to allow access. I could of saved myself 30 minutes if I would of used a little common sense….

  21. I am trying to flash my G1 using a Mac and I am getting “Permission denied when I try to entry “su” for super user when trying to flash a Custom Recovery Image.. Can anyone help me out?

  22. ok so i did the root, and got the su on as a app.. i copied the 2 files in the tools.. sdk folder, i did everything..it denies the last step..literally the last step…i don’t get it………..wut happen with the other method with spl etc that worked great

  23. I wont come furter the step 6.
    If ill type SU it says permission denied.
    I am superuser so i dont know what whent wrong does sombody haves a answer for this problem?

  24. Permission denied. For those who have issues with permission denied make sure your phone is awake and at home screen don’t let the screen shut off. Not sure if it will work with everyone but that did it for me.

  25. Ok I have followed all the steps and everything seemed to have run smoothly except my phone won’t boot to the recovery image. I only get the rainbow screen. Any ideas?

    1. okay did the same thing sat in front of the comp forever.( i work overnight and wasnt about to give up after f**king with this for hours instead of sleeping.) simple fix make sure you save the files in the tools folder exactly as written “flash_image” and “recovery.img” i had them label differently and that was the problem. hope thats it GOOD LUCK AND GOOD NIGHT FINALLY!

  26. Once completed the procedure, I was able to enter the recovery mode only the first time and did a nandroid backup. Then I restarted pressing home and power several times but I always got the triangle and phone screen.
    Any suggestion?
    Thanks

  27. i went through this and i get permission denied when i enter su in the adb shell. su works fine in the terminal program on the phone.

    1. for some reason i didn’t get the comments the first time i came to this page. i hit refresh and saw the solution in the comments, just have to keep the phone awake and give permission.

      it works yayyy!!!

  28. i went through this and i get permission denied when i enter su in the adb shell. su works fine in the terminal program on the phone.

    1. nvm i got all u have to is watch the video and put a space everywhere he does because in the instructions its not spaced right hope this helps someone

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.