FORUMS
Remove All Ads from XDA

[HOW-TO] Safely Switch Back To Amon From Clockwork Recovery

16 posts
Thanks Meter: 0
 
By edge.thefly, Junior Member on 20th August 2010, 11:55 AM
Post Reply Email Thread
********************DISCLAIMER********************
XDA-Developers & Myself are in no way responsible for any loss of information or damages to your device that may result from from the use (or misuse) of this process, though the process itself should not cause any such problems I feel it necessary to reinforce this fact.
********************DISCLAIMER********************


-----Special Thanks-----
jcase
-For the methodology and providing the flash_boot and recovery image links in his eng bootloader thread-

Stick from IRC
-For his sacrifice and bringing this issue to our attention (R.I.P. sticks Eris)-

Suno and Mezy (also IRC)
-For being unwitting guinea pigs and verifying the process-
--------------------



Overview:
It has recently come to our attention that a version of clockwork recovery included in rom manager can and has (sorry stick) caused problems for Eris. Clockwork (or more specifically this clockwork) does not play nice with the Eris and in at least one case has resulted in a corrupted userdata partition resulting in a brick. This is not necessarily going to happen in all cases but the possibility is there and as such it is better to be safe than sorry. If you are using clockwork without issue but wish to switch back to Amon Ra this thread can also help you meet that end.

NOTE: Users who cannot use Amon RA recovery due to trackball issues should attempt the usb wiggle method. there is some sort of connection between the usb housing and the trackball down sensor that makes the trackball register a down movement when the usb gets rocked in a downward motion (extra note. be gentle)



What You Need:
Android SDK for adb - (alternatively this can be done PC-less but I will cover that later)
flash_image - www.multiupload.com/KS2JCAMGBH
recovery.img - www.multiupload.com/DXQVBXB93G
su - for root permissions
Astro or Root Explorer - (For PC-Less Only)
Terminal Emulator - (For PC-Less Only)
________________________________________________


This process is relatively straightforward and I'm going to cover both the adb method and the PC-Less method in case you for some reason can't get your device recognized by your system (or don't have access to one). I have also made this very detailed for inexperienced users.



The Process:

ADB Version-
1) Download both the flash_image & recovery.img files from the links above and place them in your android-sdk tools directory
2) Open a Command Prompt (or terminal) and navigate to the tools directory.
3) Connect your device (USB Debugging Must Be Enabled) and verify the PC can see the device - type:
Code:
adb devices
4) Push both flash_image & recovery.img to /data/local on your device:
Code:
adb push flash_image /data/local
adb push recovery.img /data/local
5) Change the permissions of flash_image:
Code:
adb shell chmod 777 /data/local/flash_image
6) Flash the recovery image to recovery:
Code:
adb shell 
su    /*this is for those who do not get dropped into a root shell automatically remember $ = user # = root */
/data/local/flash_image recovery /data/local/recovery.img
7) Give it a few seconds to run (just give it 10 or so seconds to be safe)
8) Issue the following to reboot the device into recovery mode to verify the flash took:
Code:
adb reboot recovery

PC-Less Version-
1) Download both files to your sdcard.
2) Use Astro or Root Explorer to move both of the files to /data/local (if you run into a read only error use this command in terminal emulator and try again)
NOTE: Root Explorer users can hit the rw/ro toggle button.
Code:
su
mount -o remount,rw /
If for what ever reason you either can't get Root Explorer and ASTRO is blocking you from navigating outside your SD go to terminal emulator and issue the commands:
Code:
su
mv /sdcard/download/flash_image /data/local
3) Open terminal emulator and issue this command to set permissions:
Code:
su
chmod 777 /data/local/flash_image
4) Still in terminal emulator flash the recovery image to recovery:
Code:
/data/local/flash_image recovery /data/local/recovery.img
5) When the prompt returns issue the command:
Code:
reboot recovery


Verification:
If you completed either method you should be greeted by a green text recovery menu. If so congrats Amon RA has blessed you with it's presence. go ahead and reboot system or flash a rom if you like.


If This was Helpful I only ask that you become an active member and contribute to the community in any way possible. The OpenSource community is what it is because of people like you giving freely of themselves for the benefit of the whole.
 
 
20th August 2010, 12:10 PM |#2  
tenzomonk's Avatar
Senior Member
Thanks Meter: 35
 
Donate to Me
More
good stuff!

i've never used clockwork... and from my observations... GOOD!

in any case... this should help many users (i personally only recommend Amon).
20th August 2010, 12:50 PM |#3  
midnight assassin's Avatar
Senior Member
Flag NY
Thanks Meter: 124
 
More
What was the version the caused the issue? can't you also flash amons from clockwork in rom mgr then delete rom mgr? or would that not work? thank you.
20th August 2010, 12:58 PM |#4  
edge.thefly's Avatar
OP Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by midnight assassin

What was the version the caused the issue? can't you also flash amons for clockwork in rom mgr then delete rom mgr? or would that not work? thank you.

Not sure of the exact version as I don't personally use rom manager (kinda a manual guy) but I think it has been fixed in the most recent release. As for using Rom Manager to reflash I can't say for sure either but this method is pretty simple and already resolved two cases. I believe stick may have tried it he was in IRC with us for hours and we were bouncing everything we could think of at him but he got sig verification failure in a flash using it not knowing the issue and corrupted his userdata partition.

If there are any more questions I will have to answer them when I wake up because I'm nearly sleeping in my chair right now
20th August 2010, 01:22 PM |#5  
midnight assassin's Avatar
Senior Member
Flag NY
Thanks Meter: 124
 
More
thanks for the answer and putting this together. I know there are a lot of noobs like myself around here lately who may benefit from this and the time you put into it. thanks for makin it simple.
20th August 2010, 03:09 PM |#6  
homewmt's Avatar
Senior Member
Flag Pennsylvania
Thanks Meter: 2
 
More
Thanks for the great post.

I just have to say theres an easier/alternate way to do it

1)download rom manager.
2)at the bottom of rom manager click flash alternate recovery.

[PC WAY]
As pointed out by bftb0 the below method will only work for those on HBOOT 1.49.2000 S-OFF bootloader. (those who flashed the original root rom)
1) download amon's recovery from this thread http://forum.xda-developers.com/showthread.php?t=648025
2) (if you don't already have the android sdk, download it) If your in Windows fastboot is included in the android sdk, if your in mac or linux go here http://developer.htc.com/adp.html and scroll down a bit, click download and move fastboot to your /sdk/tools folder.
3) with your phone connected to your computer and off hold the power and send buttons at the same time until fastboot comes up on the screen.
4) open cmd/terminal and cd to your /sdk/tools folder, and type in "adb flash recovery <path to amon's recovery>"(if your in linux or mac type ./ in front of fastboot).
5)reboot your phone.

I personally use clockwork recovery and have had no problems, though I do not suggest it for anyone. (unless your trackball is as messed up as mine is, I can't even scroll down in amon's recovery)
20th August 2010, 07:56 PM |#7  
Senior Member
Thanks Meter: 1,048
 
More
A couple of comments.

Stick's phone

A corrupted "userdata" (/data mount point) alone might prevent the OS from booting, but that should not effect the ability to start the phone in HBOOT, FASTBOOT, or RUU (oem-78) mode. I didn't sit in on the IRC, so maybe I'm missing something, but there really are only three things which will completely brick the phone:

- screwing up a flash of the (512 kB) bootloader
- screwing up the NVRAM area
- (maybe) screwing up the misc partition

You can screw the pooch in /boot, /recovery, /system, and /data (aka "userdata") - even all four of them at the same time, if you please - and your phone should still not be bricked.

If the bootloader can not be started (in any mode), then that is absolutely a bricked device; OTOH, if you can start up the bootloader in HBOOT mode, the only thing that would prevent you from re-flashing the Leak-V3/"Official" PB00IMG.ZIP file is corruption of either the /misc partition or NVRAM. None of the dev ROMs touch those areas though. So, it is very strange that someone using any custom recovery would cause corruption of those partitions. Is Stick really bricked?

I once corrupted my /system partition which caused it to be unmountable (in Amon_RA) by doing something dumb (twice!) - but re-flashing the entire ROM (HBOOT+PB00IMG.ZIP) overcame that and gave me an earlier starting point from which to re-root and recover via Nand. There is evidence, from looking at the string data contained within the bootloader that it knows how to recreate the partition tables in flash memory - presumably this would be needed if HTC shipped a ROM which needed more space in the /system or /data partitions than existed in prior ROMs. Whether it does that for normal PB00IMG.ZIP-style ROM flashing, I can't say - but there are hints that the HTC bootloader knows how to deal with flash memory in which the entire partition table has been destroyed.

PC-based method
Step #6 in the first set of instructions will not work for rooted (dev) ROMs which do not start adbd as root (that is, "adb shell" from the PC does not launch a root shell). Most dev ROMs do that, so perhaps this is a nit-picking point. If "su" is available in the ROM, prefixing the command with "su" should work, though - just as in the PC-less example.

Use of fastboot
homewmt should probably edit his post to add the disclaimer that using fastboot for flashing of recovery will only work for folks who gained root by flashing the "Root-ROM" (or post-installing it after root was gained), which gave them the 1.49.2000 S-OFF bootloader. None of the other bootloaders will let fastboot do this. I think it is important to mention this because a lot of the new rooters are using either the "One-Click" or "Dummies" (AF) methods to install a custom recovery - and so they never touch their bootloaders.


bftb0
20th August 2010, 09:14 PM |#8  
kzoodroid's Avatar
Senior Member
Flag Kalamazoo
Thanks Meter: 266
 
More
So as long as you can get the boot loader up (power + volume down) then you can still use the 2.1 RUU (for those with HBoot s-on) to get the phone back working?

I think people assume that since the moded recovery image is fried that means the phone is bricked since you can't get into recovery on the phone to restore a backup.

Myself I've been using Clockwork Mod Recovery for 3 months without any problems and I've flashed a lot of ROMS and restored a lot of backups. Both using the recovery console and ROM Manager. I'll never go back to Amon's as I see no point and Koush is at least updating Clockwork on a regular basis.
20th August 2010, 09:47 PM |#9  
edge.thefly's Avatar
OP Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by bftb0

A couple of comments.

Stick's phone

A corrupted "userdata" (/data mount point) alone might prevent the OS from booting, but that should not effect the ability to start the phone in HBOOT, FASTBOOT, or RUU (oem-78) mode. I didn't sit in on the IRC, so maybe I'm missing something, but there really are only three things which will completely brick the phone:

- screwing up a flash of the (512 kB) bootloader
- screwing up the NVRAM area
- (maybe) screwing up the misc partition

You can screw the pooch in /boot, /recovery, /system, and /data (aka "userdata") - even all four of them at the same time, if you please - and your phone should still not be bricked.

If the bootloader can not be started (in any mode), then that is absolutely a bricked device; OTOH, if you can start up the bootloader in HBOOT mode, the only thing that would prevent you from re-flashing the Leak-V3/"Official" PB00IMG.ZIP file is corruption of either the /misc partition or NVRAM. None of the dev ROMs touch those areas though. So, it is very strange that someone using any custom recovery would cause corruption of those partitions. Is Stick really bricked?

I once corrupted my /system partition which caused it to be unmountable (in Amon_RA) by doing something dumb (twice!) - but re-flashing the entire ROM (HBOOT+PB00IMG.ZIP) overcame that and gave me an earlier starting point from which to re-root and recover via Nand. There is evidence, from looking at the string data contained within the bootloader that it knows how to recreate the partition tables in flash memory - presumably this would be needed if HTC shipped a ROM which needed more space in the /system or /data partitions than existed in prior ROMs. Whether it does that for normal PB00IMG.ZIP-style ROM flashing, I can't say - but there are hints that the HTC bootloader knows how to deal with flash memory in which the entire partition table has been destroyed.

Yes stick is really bricked. He had access to the recovery but got a sig failure which terminally corrupted his userdata partition and the only option available to him was fastboot which would throw a sig failure at any attempt to flash over (even tried PB00IMG and RUU at the end)

NOTE: Good catch on #6 I edited the OP to drop into a shell then su in.


Quote:
Originally Posted by kzoodroid

So as long as you can get the boot loader up (power + volume down) then you can still use the 2.1 RUU (for those with HBoot s-on) to get the phone back working?

This is inadvisable as stick tried the RUU which is what killed off his ability to enter hboot
20th August 2010, 10:35 PM |#10  
Senior Member
Thanks Meter: 1,048
 
More
Quote:
Originally Posted by edge.thefly

Yes stick is really bricked. He had access to the recovery but got a sig failure which terminally corrupted his userdata partition and the only option available to him was fastboot which would throw a sig failure at any attempt to flash over (even tried PB00IMG and RUU at the end)

That is truly bizarre. I don't know what Clockwork does for checks, but Amon_RA performs (in the verification step) the equivalent of a "jarsigner --verify" operation: it computes the SHA1 hash of every last file in the .zip archive, and compares those sigs to the manifest. If even a single file is wrong, it won't proceed to the install, but just bombs out on a verification failure. The upshot of that is - in the Amon_RA (or stock recovery update.zip) case - it is literally impossible to install a corrupted ROM file.

In the case of HBOOT and PB00IMG.ZIP installs, a "whole-archive" signature is performed - the individual images are not inspected, but that doesn't matter: if you touch a single bit anywhere, even in the .zip file directory, that verification step will also fail.

So - in both of those examples, the only way to burn something wrong onto the phone is if the files get corrupted internally to the phone, after they have already passed signature checks - or if they are read off the SD card differently between the verification pass and the install pass!

Do you know if Stick has a S-OFF bootloader? (i have a tricky idea, if so) I suspect he doesn't, because if fastboot passes a privilege check, I don't think there are ever any sig checks performed by the phone when the bootloader is in FASTBOOT mode - all you have to do is have a S-OFF bootloader, and you can write total crap to the phone.

bftb0
20th August 2010, 10:39 PM |#11  
edge.thefly's Avatar
OP Junior Member
Thanks Meter: 0
 
More
I'm almost certain he had S-ON but hes not around right now so I can't verify.

I should also note that while he can still power on the device he only has fastboot access it wont even get into bootloader or recovery at this point.
Post Reply Subscribe to Thread

Tags
amon, clockwork, eris, recovery, rom manager

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes