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

  29. after typing adb shell it say device off line. im reading everyones comments and i’d hate to give up. ive tried over and over. please help

  30. after typing adb shell it say device off line. im reading everyones comments and i’d hate to give up. ive tried over and over. please help

  31. ok for all the people that say the flash doesn’t work. i just went through all the steps on my g1. the thing is attention to detail…good luck guys

  32. I am getting:
    [1] Segmentation fault su

    When i attempt to use the su command. I’ve redone with root twice, rebooted the phone and deleted and re installed the flash image and recovery. I am at a total loss. Anyone?

  33. it’s really works for my htc g1 brand-new.if the device says offline, i just unplugged and plugged again (several times happen)….anyway thank you very much,it’s helpfull

  34. I am trying to push images and when I hit enter I get a whole bunch of text. I place them in the tools folder and I use the current name for the sdk manager.

  35. I am trying to push images and when I hit enter I get a whole bunch of text. I place them in the tools folder and I use the current name for the sdk manager.

  36. when I type su, I am getting link image error. It says, link_image[1638]: 1340 could not load needed library ‘ libbinder.so’ for ‘su’ CANNOT LINK EXECUTABLE……………..How can I fix this?

      1. when I am doing the steps on the third step it keeps telling me that adb is not a valid prompt or something like that… what is going wrong? I know the G1 is outdated but i got it as a first android for my little brother and it is way too sluggish not to put a custom rom on it… plz help me im about to loose my 80 bucks I am going to throw this thing!!!!

  37. Help please!! when i try entering in su i get this message saying link_image [1638]: 1224 could not load needed library ‘libbinder.so’ for ‘su’ CANNOT LINK EXECUTABLE
    what should i do?!? please help!

    1. ya that seems to happen sometimes. has something to do with his one click app. try rerooting using one of the other methods on the site or report it to the app developer and ask him if he’s addressed the issue in his app yet

  38. hii… i used your root g1 tutorial (its working right) but when i try do at recovery image its still give me the same problem, same error with de libbinder.so, what more can i do?

  39. I´m getting a looong error when I write adb push recovery.img /sdcard. please help meeee!!! tried to download the files several times. I¨m sure that both of them are at the tools folder. what can I do

  40. hi, i just followed all the instructions and when i got to the ./flash_image recovery /sdcard/recovery.img and pressed enter it says that /flash_image: not found

    can somebody help me please?

  41. Just managed to get to the last step, and instead of a blank line i get:
    “./flash_image: permission denied” – which is strange as my phones properly routed and has superuser permissions available…

    Any ideas?

          1. keep trying, make sure your file is (recovery.img)
            keep trying soon or later it should take
            also try remounting sd card

          2. Bookoojoo, Hughes, and scott,

            Try this.

            Go to the androidsdk folder that you have on your computer. then go into the tools folder and look for a file named “flash.exe or flashi image.exe or something with flash.exe.

            then when you locate that file, put that into the root of the sd card and try again. 

            also root your phone through “superoneclick” it helps a lot.

            P.S. you can also flash this without a computer. just download the terminal emulator from the market. run it and type “su” so that you can gain super user permission. hope that help. 

  42. When I type
    mount -o remount,exec /dev/block//vold/179:1 /sdcard

    it repeats itself and does nothing else? Is something suppose to happen?

  43. When i got to type in adb push recovery.img/sdcard and i hit enter it just gives me a list of commands for adb and stuff i can do. It does not download it to the sdcard like it was shown in the video please help me thank you.

  44. When i got to type in adb push recovery.img/sdcard and i hit enter it just gives me a list of commands for adb and stuff i can do. It does not download it to the sdcard like it was shown in the video please help me thank you.

  45. i finished the last step and the it worked but when i pressed home and power it wouldn’t go to the recovery menu. Did I do something wrong?

  46. okay i really need help 🙁 after i type in adb push recovery.img/sdcard it starts to load this really long information of something. but i kept typing what i need to type and after i did the “su” part it said permission denied….whats going on?

  47. after i finished the last step and and ready to reboot it wont get past the first g1 screen when i hold down the home key.but wen i dont it starts up normally

  48. hi, why when I type “adb push recovery.img /sdcard” in cmd, don`t want to copy the files? cmd says:
    “C:AndroidSDKtools>adb push recovery.img /sdcard
    1033 KB/s (0 bytes in 4712448.004s)”
    Help me please!

    1. This may or may not help but I noticed that the phone can’t be in stand by/screen saver mode when entering ‘su’.

  49. hey wats going on… i have a question about the g1. i was trying to install android 2.2 and they told me i had to downgrade to 1.0 rc29 and then upgrade to cupcake…the thing is i get a error message every time…im really confused and i hate that im stuck on rc29….help plz

  50. wow man youre are the greatsted plaese sent me over youre msn i wana contact you man ones again i did it verry good.
    thanx bro youre amezing

  51. I copied the recovery.img to the tools folder and it says no such file or directory when typing adb push recovery.img /sdcard what do i do i followed the directions to the letter.

  52. Hello, I am using a T-mobile G1 (rooted, used AndRoot method) and when I try to go into the recovery image (try to flash a new rom), I always have to do the flash recovery image step.

  53. Hello, I am using a T-mobile G1 (rooted, used AndRoot method) and when I try to go into the recovery image, I always have to do the flash recovery image step.

  54. Hey, thanks for all the work. I am having trouble with the recover image zip. I can’t unzip it? Is there a special program I am suppose to have loaded on my pc in order to unzip it before copying it over to AndroidSDK folder? Please let me know. I did everything else. Thanks.

  55. LAST LINE!! So disappointing… When I type ‘./flash_image recovery /sdcard/recovery.img’ it says ‘error reading /sdcard/recovery.img: I/O error’ Is the recovery.img corrupt or something? Yelp!

  56. alrighty it finally worked for my only been trying a for about six hours, look if it doesnt work start from the start, and re root your phone with androot , follow steps exactly, you must use linda file manger also set your screen never to turn off when connected so you can allow the adb shell to access your phone, by pressing the correct button when superuser options pop up and ask if your want to allow the adb shell to acess your phone, also when you first put androot on your phone make sure that superuser app installed at the same time , if not reinstall androot, also make sure you type everything as is as per theunlockr shows up above in the command prompt or it obivously will not work properly like putting spaces where spaces are needed,
    Well that helped me , it may be the same for everyone else
    HTC Dream 4eva

  57. Can any one help me I can get the push on the recovery.img but when I get to push flach_image it keeps saying file not found what am I doing wrong????? everything seems to work up until this point…..?????

  58. i also get to the ./flash_image line and get permission denied i read all the posts problem doesnt seem to be adressed can u list some steps please adb works and phone rooted. also when i hold power and home buttons it simply freezes on htc dream opening screen no triangle or exclamation

  59. On the very last line step when you type ./flash_image recovery /sdcard/recovery.img it says ./flash_image: permission denied after I press enter. I’ve seen that I am not the only person with this problem, but there doesnt seem to be any solution in the comments section. As far as I know I’ve done everything exactly, and I honestly don’t know what I’m supposed to do now. Please help.

  60. when i put the adb devices in to get the code i get one but after it says device offline
    how do i change that
    Thank you

  61. I got it! You have to pay attention on the video because there are spaces that you do not notice while reading the text! i.e.
    adb push recovery.img /sdcard
    adb push flash_image /sdcard

    I could hardly notice that there was a space between recovery.img and /sdcard! this was messing me up!
    Also, on
    mount -o remount,exec /dev/block//vold/179:1 /sdcard
    I couldn’t see the space between mount and -o and the space after exec. This helped me out, I hope it helps more people!

  62. after i type in su, it says something like 
    Error Type 3
    error activity class {com.koushikdutta.superuser/com.koushikdutta.superuser.SuperuserRequestActivity} does not exist. Any ideas what could be wrong? perhaps superuser app isnt working correctly?

  63. Fakeemailnamegsndkfn

    In case anyone is still looking for the answer to “operation not permitted.” What you have to do is unroot it with androot and reroot it WITHOUT super user installed.

  64. Richharddeneenja

    after reading this over and over having trouble on the ./flash_image recovery_______ 
    when you push the “adb push recovery.img /sdcard” & “adb push flash_image /sdcard”

    make sure you SPACE after “.img” & “image”
    i think this is why everyone keeps getting not found on the last step 

  65. Elementfiretree

    hello my g1 will not go in to recovery mode i have a recovery image but nothing it just sits at the g1 screen i need help

  66. When I’m at the part where I have to find the “dev/block…” with sdcard at the end, It’s not coming up. Any suggestions?

  67. Hey guys it’s maybe just me but you don’t have to follow these instructions just go to the market and download Rom Manager and let it flash that recovery for you I did these steps before successfully but rom manager is wayyyyyy easier.

  68. Okay .. when ever i type “su” Nothing Pops-up on my phone screen though i have the super user thing … also whenever i try to open super user it always get halted and pops-up the force close window! … what should i do :'(

  69. i am having a serious promblem flash image is saying permission denied and i already have super user permission plz help

  70. 5 button’s on my g1 not working the send call ,the home, menu and the back also the trackball  can some one help me it’s heard to use the phone with out this buttons

  71. 5 button’s on my g1 not working the send call ,the home, menu and the
    back also the trackball  can some one help me it’s heard to use the
    phone with out this buttons  plz plz

    1. Do you have superuser installed on your phone? Ive had the same problem. Go to the market and download superuser then try again

  72. HELLOW !! it works fine until last command line where comes an error:

    flash_image : permission denied 

    i allready allowed in SuperUser and “remeber” option selected.

    Phone: T-mobile G1 , android 1.6 

    i tryied the ROMmanager way but after i press Flash Clockworkmod , it flashed, show me what version is and when i select from ROMmanager “Reboot into Recovery” it goes in Android System Recovery ( classic recovery mode )

    UNLOCKR !!! PLEASE HELP ME OUT AT LEAST ONE OF THAT PROBLEMS !!

  73. people, i spent about 8 hours and things did not work out for me, I was using Windows 64 Bit, therefore the day after I tried it on Windows XP 32 bit and bada bim bada booom it worked like a charm in less than 15 minutes. The instructions are perfect. Just follow them, I did not do anything different. 

  74. Hi

    I need to do mnt/sdcard instead of /sdcard for most of the steps but on the last step i don’t know what to do:./flash_image recovery /mnt/sdcard/recovery.imgerror scanning partitions: No such file or directory
    ./mnt/flash_image recovery [etc…]flash_image: not foundHelp please!

  75. I struggled with this procedure as well, and found that these tips are what got me through…

    Some of the steps work with the SD card mounted, others worked with it unmounted.

    SU permission is essential of course

    At the end, I could not get the ./flash_image recovery command to work.  I got either “permission denied” or “flash_image not found”.  I simply rebooted the phone, tried again, and it worked.

    Thanks for the great tutorial guys!

  76. after i type the cmd line:
    mount -o remount,exec /dev/block//vold/179:1 /sdcard 
    it just says operation not permitted, any suggestions?

  77. hi everyone… i have fixed the issue with the file not found problem.

    first go to my computer and click on the “c” drive…

    next look for the AndroidSDK folder
    go to tolls and copy the flash_image file and put it on your sd card…

    once complete, follow the steps above.

    start with…

    su
    mount

    and so on and so forth. this should fix the problem. if you need help email me at mubz92@yahoo.com

  78. I can not download the flash_image by saying that this method is obsolete and I have a g1 want to install the rom manager did not appear on the market as I have with Android 1.6

  79. been trying to install recovery on my G1 having major issues, and also the links up top there on the Video arent anywhere or atleast i cannot see them, please help, thanks!

    Louie

Leave a Reply

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