Jump to content

Welcome to CyanogenMod

Welcome to our forum. Like most online communities you must register to post, but don't worry this is a simple free process that requires minimal information for you to signup. Be a part of the CyanogenMod Forum by signing in or creating an account. You can even sign in with your Facebook or Twitter account.
  • Start new topics and reply to others
  • Subscribe to topics and forums to get automatic updates
  • Get your own profile and make new friends
  • Download files attached to the forum.
  • Customize your experience here
  • Share your CyanogenMod experience!
Guest Message by DevFuse
 

[RECOVERY][FIXED] Unable to reboot to recovery


  • Please log in to reply
174 replies to this topic

#1 Skrki

Skrki
  • Moderators
  • 623 posts
  • Country:rs
  • Device Model:MT3G 32B / Desire Z
  • MOD Version:CM6.1 2708 port / CM7 nightly 263
  • Recovery Image:Stock

Posted 04 June 2010 - 04:29 PM

Dear users,

I thought I'd post this to save us all the recent trouble, many have experienced - lost recoveries.

Scenario A:
    As you all know, the new ROM manager application is out for a while now, and many users have tried it, with more or less success. While I think it's a great idea to have an all-in-one and easy-to-use tool for ROM switching/recovery flashing, it has proven to impose a somewhat serious problem on the latest CyanogenMod 5.0.x Eclair build.

    To be perfectly clear, the application itself has no problems, it isn't faulty nor malicious, but combined with the (in)famous low memory issue, it has proven to fail in flashing your recovery, leaving you with no recovery at all. Why? Because it flashes your device using flash_image script in the live system, and because of the issue mentioned above, this script will often fail. A little more insight can be found here.
Scenario B:
    If you have manually tried to flash the recovery, using flash_image, and rebooted to nothing but your nice splash1, that means the flash failed, too. :(

DO NOT USE ROM MANAGER TO FLASH YOUR RECOVERY.
DO NOT USE flash_image SCRIPT TO FLASH YOUR RECOVERY IN THE LIVE SYSTEM.

Cyanogen's warning came a while back, but many failed to notice it.
Rest assured though it's being worked on.

Quote

If you are currently facing this problem, here is a set of solutions that has worked. If your desired method of choice fails, do try another one. All options known to me, are listed bellow. Please note, I have not done this. I have no problems with my recovery. Use the links in this post, many user comments speak in favor (or against?) these methods. I only know that fastboot method works 100%.

Solution 1. - Fastboot
    Prerequisites:
    • Dream/G1 devices with DangerSPL, all other devices (MT3G 32A/32B)  with an engineering SPL (S-OFF in HBOOT mode).
    • Users with SDK tools set up.
    How to:
    • Reboot to bootloader holding Back+Power or Vol.down+Power or whatever combination applies to your device.
    • Attach your device to a USB port and open up a Terminal/Command prompt of choice
    • Navigate to the folder where your recovery image is, then flash it like so:

      fastboot flash recovery recovery_of_choice.img
      
    • Reboot to recovery to verify your work.
Solution 2. "The Bash assault" - the basic approach
    Prerequisites:
    • All devices running CyanogenMod 5.0.x
    • Lots of patience.
    WARNING: This should and will work, but you have to keep trying!!!

    How to:
Solution 3. "The Bash assault" - a smarter approach
    Prerequisites:
    • Same as above, only sometimes it requires a lot less patience.
    CREDITS:
    How to:
    • Create a script on your sdcard. Enter Firerat's code bellow, and save it.
    • Put the recovery image on the root of your sdcard.
    • Run the script like this:
      $su
      #sh /sdcard/my_script_name
      
    • The script code:
      (Pasted again because redundancy is a good thing, and cache is... well, cache)

      Firerat said:

      this would 'spam' it until it succeeds

      #!/system/bin/sh
      test=1
      while [ "$test" = "1" ];do
      	flash_image recovery /sdcard/recovery.img
      	test=`echo $?`
      done
      echo "we got there in the end....." 
      
    • Reboot to recovery and verify your work
Solution 4. Using the built-in ROM capability at boot time (advanced and not recommended)
    Prerequisites:
    • All devices running CyanogenMod 5.0.x
    How to:
    • Follow the advice given in this XDA post, and use the script Firerat provides.
Other solutions

Thanks goes out to everyone, for their useful tips, scripts, information....

With regards,
Yours truly

P.S. If you have another solution, feel free to post it here.

#2 PsychoI3oy

PsychoI3oy

    STFU, RTFW.

  • Moderators
  • 469 posts
  • Country:us
  • Device Model:G2
  • MOD Version:7.1.x
  • Recovery Image:ClockworkMod

Posted 04 June 2010 - 04:43 PM

zinx had a good solution yesterday on IRC that goes a little something like this

adb shell into the phone and run

stop

this will stop the Dalvik runtime (your screen will go black, everything will die, etc.) freeing up gobs and gobs of ram

from there, flash_image shouldn't have any problem allocating the required 32 contiguous pages of memory to flash without having to try repeatedly.


after that, run 'reboot recovery' to see if it worked (or you could try 'start' to restart the runtime, but that'd be kinda silly).

more from zinx:
<zinx> PsychoI3oy: yeah but you may need to erase_image first and there may be some other weirdo problems where most of it may flash, but out of the first 131072 bytes, only the first 2048 bytes might flash..
<zinx> PsychoI3oy: dunno wtf that's about
<zinx> PsychoI3oy: you can also link them to http://zenthought.or...age_2048_static and mention that an erase_image may or may not be required before using it

#3 -Stevo-

-Stevo-
  • Members
  • 1,297 posts
  • LocationSalt Lake City, Utah
  • Country:us
  • Device Model:HTC Vision G2
  • MOD Version:CM7.0.0-RCX
  • Recovery Image:ClockworkMod

Posted 04 June 2010 - 04:54 PM

pin this pretty please, I'd love to not have to repeat myself in multiple threads.

Awesome, concise, all good methods listed. Thanks zinx for that little tip, reproduced the low memory error, adb stop, erase_image, flash_image, done.

#4 Skrki

Skrki
  • Moderators
  • 623 posts
  • Country:rs
  • Device Model:MT3G 32B / Desire Z
  • MOD Version:CM6.1 2708 port / CM7 nightly 263
  • Recovery Image:Stock

Posted 04 June 2010 - 06:50 PM

Thank you both for your responses!

I'm especially glad Psycho's post came in first, so I don't have to edit the OP, and go get some sleep instead. I might stick it in there later though... +1 for spreading the word.
Awesome tip, @Zinx! I mean the nerve, and the genius, to kill the poor Android like that! I laughed out loud, lol (then had to explain my woman why... I don't think she got it :unsure: )

Stevo... I felt your pain, honestly, reading some of the latest repeats. Needless to say, it was inspiring. You officially don't have to repeat yourself ever again, at least not on this issue, and not in this forum ;) +1 for testing/reproducing

#5 -Stevo-

-Stevo-
  • Members
  • 1,297 posts
  • LocationSalt Lake City, Utah
  • Country:us
  • Device Model:HTC Vision G2
  • MOD Version:CM7.0.0-RCX
  • Recovery Image:ClockworkMod

Posted 04 June 2010 - 07:02 PM

I have something for all of you:
Attached File  flashrecoveryscript.zip   2.54K   368 downloads


Flash this zip from recovery and you will now have an easy option for flashing recovery in terminal, you will need to rename the recovery image you downloaded to recovery.img and place in the root of your sdcard, then in terminal run:

flashrecovery

expect errors mtd errors and in some cases if you are real low on memory you can see a bit of a freeze. Be Patient. there will be a message and a prompt to reboot if you wish when the script has finished.

I was planning on putting this together before the great forum crash, and although i've been going through the cached google pages, i completely forgot that firerat and i's discussion had led to his nifty little script to help out. so thanks for the reminder skrki.

Also, this is another option, albeit useless (and bulky) if you just use the easier method above. the only difference is that you will not need to download any recovery images seperately. This kit contains ra-recovery 1.7.0 images for the magic/mt3g dream/rogers-dream. the images and scripts are placed on your sdcard for easy removal, so 25 mb of free space is required. like my other simplified scripts just follow the simple prompts and you *should* have a new working recovery.

Flash Recovery Kit

The above recovery kit gives you two commands in terminal:

flashrecovery - See above
recflash - options for device type/brand.


Let me know if there are any issues. i tested all the scripts on my device with sucess on all (couldn't verify the 32A recovery or the Rogers ones BOOT but that's cause i'm on a 32B magic. all recovery images at least FLASHED correctly.

-----------------------------------------------------------------------------------------------------
Attached File  recflash.png   17.85K   363 downloads
Script only - Attached File  flashrecoveryscript.zip   2.54K   368 downloads
Kit - http://www.mediafire...php?zmjdm3m52mt
-----------------------------------------------------------------------------------------------------

And it has now occured to me that unless you already have a working recovery image these will do you no good. so installation for the flash recovery script is as follows:

Download the above flashrecoveryscript.zip (3kb)

Extract the file flashrecovery from the /bin folder. place this file on your sdcard root and open terminal:

su
mount -o remount,rw /system
cp -f /sdcard/flashrecovery /system/bin
chmod 755 /system/bin/flashrecovery
mount -o remount,ro /system

Then when ready

flashrecovery


#6 Babaki

Babaki
  • Donators
  • 154 posts
  • Twitter:@babaki1
  • LocationNJ
  • Country:us
  • Device Model:N1
  • MOD Version:7.1
  • Recovery Image:Amon_RA

Posted 04 June 2010 - 08:46 PM

it actually work with rom manager though. ive tested it multiple times and it works every time. if you flash an older version of the clockwork recovery, say 2 revisions back, then flash the "alternative" amon_ra recovery, it will flash successfully. it works every time for me.

#7 -Stevo-

-Stevo-
  • Members
  • 1,297 posts
  • LocationSalt Lake City, Utah
  • Country:us
  • Device Model:HTC Vision G2
  • MOD Version:CM7.0.0-RCX
  • Recovery Image:ClockworkMod

Posted 04 June 2010 - 08:49 PM

View PostBabaki, on 04 June 2010 - 08:46 PM, said:

it actually work with rom manager though. ive tested it multiple times and it works every time. if you flash an older version of the clockwork recovery, say 2 revisions back, then flash the "alternative" amon_ra recovery, it will flash successfully. it works every time for me.

eh, me too, but some people have ZERO luck with rom manager. there are many contributing factors as well, free memory, swap, background processes etc. so depending on your setup you may have the memory required to flash the recovery images. I usually do, i have to turn some things off in order to replicate the mtd errors during install so my regular setup works fine, this is for those who can't get recovery working with the normal methods.

#8 mypaq

mypaq
  • Members
  • 88 posts
  • Country:uk
  • Device Model:|2|
  • MOD Version:cynagoen6.0 rc1
  • Recovery Image:ClockworkMod

Posted 05 June 2010 - 10:26 AM

View PostBabaki, on 04 June 2010 - 08:46 PM, said:

it actually work with rom manager though. ive tested it multiple times and it works every time. if you flash an older version of the clockwork recovery, say 2 revisions back, then flash the "alternative" amon_ra recovery, it will flash successfully. it works every time for me.

Great tip Babaki. I went to rom manager uesd a old clockwork recovery 1.8.0.5 then to Ra Recovery v1.7.0 and it works ok for me.

#9 Zacthespack

Zacthespack
  • Members
  • 6 posts
  • Device Model:|2|
  • MOD Version:5.0.7
  • Recovery Image:Amon_RA

Posted 05 June 2010 - 10:46 PM

i have fallen into this problem again :( ( yes i know im a dumb ass and shouldn't have tried flashing using the rom manger).
I have tried every one of the possible way to fix it and nothing works :(
The script from section 3 gives me a syntax error 'end of file unexpected (expecting "do")' can someone give me a copy of the script that works?
the 'flashrecoveryscript' also does not work for me, simply spams with mem errors then when asked to restart after that i can not boot into recovery.
Fastboot also fails giving a error.

Can anyone help me?

#10 Skrki

Skrki
  • Moderators
  • 623 posts
  • Country:rs
  • Device Model:MT3G 32B / Desire Z
  • MOD Version:CM6.1 2708 port / CM7 nightly 263
  • Recovery Image:Stock

Posted 05 June 2010 - 11:44 PM

View PostZacthespack, on 05 June 2010 - 10:46 PM, said:

i have fallen into this problem again :( ( yes i know im a dumb ass and shouldn't have tried flashing using the rom manger).
I have tried every one of the possible way to fix it and nothing works :(
The script from section 3 gives me a syntax error 'end of file unexpected (expecting "do")' can someone give me a copy of the script that works?
the 'flashrecoveryscript' also does not work for me, simply spams with mem errors then when asked to restart after that i can not boot into recovery.
Fastboot also fails giving a error.

Can anyone help me?

Have you tried Babaki's method? Three posts above yours...
Zinx's method? Second post...
As for the bash assault.. the methodology does say it needs patience. You may have to try it multiple times (even if it says it succeeded).

#11 Zacthespack

Zacthespack
  • Members
  • 6 posts
  • Device Model:|2|
  • MOD Version:5.0.7
  • Recovery Image:Amon_RA

Posted 06 June 2010 - 08:00 AM

View Postskrki, on 05 June 2010 - 11:44 PM, said:

Have you tried Babaki's method? Three posts above yours...
Zinx's method? Second post...
As for the bash assault.. the methodology does say it needs patience. You may have to try it multiple times (even if it says it succeeded).

i tried to do babaki's method but it didnt work, however for some reason the rom manger wants the flash the 'H' version when my phone is a 32B google branded so needed the 'G' version of the recovery.

for zinx's method, i tried to do this but when i run 'stop' in adb nothing seems to happen

i will just keep trying the bash assault until it works i guess

#12 smashman42

smashman42
  • Donators
  • 165 posts
  • Twitter:smashman42
  • LocationTownsville, Queensland, Australia
  • Country:au
  • Device Model:LG Optimus 2X P990
  • MOD Version:Cm10 Nightlies
  • Recovery Image:ClockworkMod

Posted 06 June 2010 - 12:07 PM

If rom manager asks if you have a Mytouch3G, Magic or G1/Dream, if you have a 32B magic choose Mytouch3G

#13 magicJW

magicJW
  • Members
  • 1 posts
  • Device Model:|2|
  • MOD Version:5.0.7
  • Recovery Image:Cyanogen

Posted 06 June 2010 - 03:12 PM

View Postsmashman42, on 06 June 2010 - 12:07 PM, said:

If rom manager asks if you have a Mytouch3G, Magic or G1/Dream, if you have a 32B magic choose Mytouch3G
That't it. All other fixes don't work for me. Simply update to last and choose myTouch3G (SAPHIRE PVT32B-SHIP S-PON / HBOOT 1.33.0007 / CPLD-10 / RADIO-2.22.19.261 /31.07). Thks for this tip. I looking more than 5hours for a solution.

#14 Zacthespack

Zacthespack
  • Members
  • 6 posts
  • Device Model:|2|
  • MOD Version:5.0.7
  • Recovery Image:Amon_RA

Posted 06 June 2010 - 05:20 PM

View Postsmashman42, on 06 June 2010 - 12:07 PM, said:

If rom manager asks if you have a Mytouch3G, Magic or G1/Dream, if you have a 32B magic choose Mytouch3G

-_- i feel so so dum right now lol, changed to mytouch3G and it worked right away, thanks so much guys :)

#15 Skrki

Skrki
  • Moderators
  • 623 posts
  • Country:rs
  • Device Model:MT3G 32B / Desire Z
  • MOD Version:CM6.1 2708 port / CM7 nightly 263
  • Recovery Image:Stock

Posted 07 June 2010 - 11:32 AM

Another "Thank you" to all who gave us more useful tips!

All the methods found in this thread so far, are now linked to in the OP under "Other solutions".


#16 jfritzs2

jfritzs2
  • Members
  • 5 posts
  • Twitter:jordanfritzsche
  • Device Model:|2|
  • MOD Version:CyanogenMod 5.0.7
  • Recovery Image:Amon_RA

Posted 07 June 2010 - 06:20 PM

View PostBabaki, on 04 June 2010 - 08:46 PM, said:

it actually work with rom manager though. ive tested it multiple times and it works every time. if you flash an older version of the clockwork recovery, say 2 revisions back, then flash the "alternative" amon_ra recovery, it will flash successfully. it works every time for me.


View Postmypaq, on 05 June 2010 - 10:26 AM, said:

Great tip Babaki. I went to rom manager uesd a old clockwork recovery 1.8.0.5 then to Ra Recovery v1.7.0 and it works ok for me.

Yep, this was the solution for me!  It worked after a ton of other tries, I am now happy again!

#17 Jimmy13

Jimmy13

    Karma Police

  • Donators
  • 62 posts
  • LocationHouston, TX
  • Country:us
  • Device Model:Tmobile G2
  • MOD Version:CM7 nightly 263
  • Recovery Image:ClockworkMod

Posted 08 June 2010 - 05:08 AM

View Postjfritzs2, on 07 June 2010 - 06:20 PM, said:

Yep, this was the solution for me!  It worked after a ton of other tries, I am now happy again!
This also worked for me. I have crashed this twice now.

Once I did it trying to install clockwork recovery manager with the app on 5.0.7-DStest7.

The second I tried to flash the recovery with droid explorer to upgrade to Amon-RA recovery 1.7.0G cyan.

Both times I had to download auto memory manager and set it to aggressive and kill apps manually.

Then I would flash the recovery to the previous version ending in .5 the I would flash the Amon_RA recovery.

I now have the latest Amon_RA though it was a stressful venture.

MT3G 32b
5.0.7 DS stable (about to try 5.0.8 test2)
Newest radio
Amon_ra 1.7.0G

p.s. if anyone can tell me how to get fastboot working on windows7 x64 let me know. I'm still sorta a noob sry. :)

#18 Skrki

Skrki
  • Moderators
  • 623 posts
  • Country:rs
  • Device Model:MT3G 32B / Desire Z
  • MOD Version:CM6.1 2708 port / CM7 nightly 263
  • Recovery Image:Stock

Posted 08 June 2010 - 05:50 AM

View PostJimmy13, on 08 June 2010 - 05:08 AM, said:

p.s. if anyone can tell me how to get fastboot working on windows7 x64 let me know. I'm still sorta a noob sry. :)
Hi,
Please see:
http://wiki.cyanogen...oid_sdk#Windows

#19 Underhill Labs

Underhill Labs
  • Members
  • 2 posts
  • Twitter:pirateschool
  • Device Model:|2|
  • MOD Version:5.0.7 stable
  • Recovery Image:Amon_RA

Posted 08 June 2010 - 09:10 PM

The directions were a bit unclear for me above how to use fastboot:

1. you are running 'fastboot' from your desktop, not from the terminal on your phone.  I've never run fastboot before, so when I read the above directions, I rebooted into fastboot mode and looked for a way to drop into a command prompt.  So, this leads to 2:

2. You need to download a fatsboot binary, or compile one from the android source
    (the ubuntu binary for fastboot is located here: http://android-dls.c.../linux/fastboot)

3. You must run fastboot as su, otherwise it will maddeningly silently fail:
'sudo fastboot flash recovery recovery_of_choice.img'
(I tried this over and over until I found an old topic that mentioned you need to use fastboot as root. Once I sudo'd it finally worked.)

#20 jrimi

jrimi
  • Donators
  • 8 posts
  • Country:us
  • Device Model:|2|
  • MOD Version:Cyanogen 6 RC2
  • Recovery Image:Amon_RA

Posted 08 June 2010 - 09:20 PM

Alright everyone, i feel that the solution i chose worked just great. I went into the market from my phone and downloaded ROM Manager(Free Version), then after it installed i opened it and all the way at the bottom there is and option to flash alternate recovery(RA Recovery v 1.7.0G) or All ClockworkMod Recoveries, so i chose flash alternate recovery and it took maybe 5 minutes top to finish working and the i powered off and booted into recovery and RA Recovery v1.7 was on there. I dont know if i got lucky or something, but thats what worked for me, it was very easy and free, so i would reccomend it.