[DEV] ClockworkMod 5.5.0.4 [UPDATED: Can't get to CWM? Here's the fix!]

Search This thread

thecubed

Inactive Recognized Developer
Aug 19, 2008
1,046
10,458
Austin, TX
Howdy y'all!

I just compiled a proper version of ClockworkMod recovery 5.5.0.4 off of the ICS branch of CyanogenMod.

It supports backing up boot images (I have heard that the image that is being flashed now doesn't support backing that up), and in the near future will support recovery chargemode.

This repository will hopefully contain in the near future a semi-working copy of CyanogenMod 9 also, but there's no guarantees on that one :)

So, without further ado:

What is this?
This is ClockworkMod Recovery 5.5.0.4 and the files necessary to build it yourself.

How do I use it?
You must first be unlocked with HTCDev.com (there is an excellent guide over there, just click on the Unlock Bootloader button and it'll walk you through)

Once you're unlocked, download the prebuilt image below, and do the following (in the same directory you used to unlock your phone):
Code:
fastboot flash recovery <path/to/prebuilt-image-you-downloaded.img>
You need to replace the stuff in brackets with the path to the img file you downloaded from here...

Alternate Installation Method (ph39img)
Much easier installation once unlocked with HTCDev...
Simply download the ph39img.zip I have linked to in the downloads section, and put it on your external SD card.
Reboot your phone into HBOOT, and allow the update. Then you've got clockwork installed super easy, no computer needed!

How is this different from the ClockworkMod image that's floating around here?

Truth be told, I haven't tried the other version yet-- but I have been told that it doesn't back up boot.img, and has a few other bugs.

Also, this version has /sdcard mapped to the external SD card as opposed to the internal SD card. This is a safety feature to prevent losing backups in case your device becomes inaccessible. All backups should be to an external storage medium (even on your desktop, it's a good practice to not backup your hdd to the same device :) )

I'm sure mine has bugs too, but I'm posting the source so y'all can laugh at me :)


Changelog
recovery-take1 : initial release

recovery-beta2 : now supporting charge mode in all forms just like stock recovery, and a few behind-the-scenes tweaks :)

Tips and Tricks (what works, and what doesn't)
Please read the following-- the HTCDev unlock comes with it's own disadvantages and risks...

  • The HTCDev unlock adds the word "**UNLOCKED**" to your HBOOT screen. Even if you put your phone to stock with a RUU and re-lock the phone, your phone will show "**RELOCKED**" when booted to the bootloader.
    At this time, I am unsure if AT&T will refuse warranty claims if they see that text. Just remember: if you unlock, there may not be any way back to complete stock any time soon.
  • Another disadvantage of the HTCDev unlock: ClockworkMod recovery CANNOT flash kernels. You must use JoeyKrim's kernel flasher ( http://xdaforums.com/showthread.php?p=20926830 )or fastboot to flash kernels. This includes Nandroid backups.
    If you back up your phone and apply a new ROM and kernel, you will have to fastboot flash the old boot.img back or use JoeyKrim's kernel flasher before switching ROMs.
  • If you flash a ROM, make sure to read the instructions with the ROM. Every ROM developer has a different method of flashing the kernel-- some come with a script to run, and others just give you the files to flash. Please read what they have to say before posting here with a complaint :)
  • Not seeing your rom .zips on your SD card, or having trouble restoring a backup?
    This version of ClockworkMod has the external SD card set as primary. This is to avoid the problem of "my phone died, and I can't access my backups".
    To solve this issue, simply put your ROMs or whatnot on your external SD card. In the future, I may look into how hard it is to add a internal/external SD switcher to clockwork, but for now the safest default is the external SD.
    Sorry about that!
  • Some rom.zip's don't work...
    This may be because they're using an old version of the update-binary in their .zip file. Contact your ROM maintainer and ask for an updated version :)
    If you are a ROM developer, here's the updated "update-binary". Drop it in your META-INF/com/google/android directory in your ZIP and update your format() commands properly...
  • HELP! I CANT GET INTO RECOVERY! *new!
    If you find yourself unable to get into CWM (i.e. the screen flashes some text, then reboots immediately), just boot to fastboot (hboot -> fastboot), then issue "fastboot erase cache" on your PC.
    Then you should be able to boot into ClockworkMod. After you're in there, make sure to format /cache to fix the problem.
    This issue will be fixed soon, I'll add some intelligence to the kernel to not bother rebooting to fsck a partition if it's marked 'dirty' or unmountable. Stock recovery is supposed to fsck the partitions if they're dirty/broken, but CWM doesn't bother, and the kernel gets easily confused.

How can I contact (chastise, praise, call names) you?

On IRC (Freenode) you'll find me hanging out in #htc-holiday when I'm available.
Just say my name "IOMonster" (or "IOMonster_desk") and if I'm around I'll answer.

I also will sometimes respond to PM's on XDA, but XDA's forum has a bad habbit of not emailing me when I get a new PM...

Standard "it might not work" clause

This software hasn't been thoroughly tested, and it might not work.
It might not backup things correctly, and it might not restore them right.
Please don't trust this software with anything sensitive or life-alteringly important.
I'd hate to say "I told you so!" :)

That's not to say this software doesn't work, it's just the standard disclaimer.

Donation Information
I love to develop. I don't do this for money, I do it just for the "thanks".

Please don't feel obligated to donate, but if you feel like it, you can click the button below to donate a small amount to me. Alternatively, consider donating to a charity of your choice-- there are so many good causes out there that could use your donation.
Thank you in advance!

Credits / Thank You's
  • IanWizard-cloud (testing, moral support :) )
  • Pirateghost (much needed debugging, testing, and flashing his phone no less than 20 times!)
  • joeykrim
  • toastcfh
  • fattire
  • BananaCakes (for getting clockwork built in the first place and enabling so many mods on day 1 of unlock!)
  • ..and lots of others!

Thanks for giving this looong post a read! :)
Good luck!
 
Last edited:

travisxcore

Senior Member
Sep 29, 2010
178
38
Google Pixel 2 XL
Google Pixel 5
Shoot I'll give it a shot. Flashing now. Will edit this post after its been tested. :)

Edit: Short glance review, I know a lot of this is already stated/known but just posting it anyways :p

So firstly, I'm still getting no confirmation when I flash images (whether it be recovery or kernal) but again, I think thats from me using a VM to do all the work.

Still boots into recovery when plugged in.

Maybe I'm just being an idoit, but I couldn't get out of the keytest, had to hold power button which booted the rom.

Of course the usb mount and such works.

Will try backup later when I'm not short on downtime.
 
Last edited:

joeykrim

Inactive Recognized Developer
Jan 9, 2009
1,978
1,311
Coming from the HTC EVO 3D land with the HTC unlock method for the last 6 months .. the following tips have been very helpful.

HTC Unlock method only allows kernel write access while in two modes, fastboot and standard android mode. HTC unlock method does NOT allow a kernel to be flashed from standard recovery mode. This includes a ROM .zip with a kernel inside. The ROM will load, but the kernel will not from standard recovery mode.

The ONLY way to flash a kernel whether by performing a full nandroid restore including the kernel or flashing a ROM with a kernel inside, is to use the following command to load the custom recovery:
fastboot boot <destination of recovery.img>
example on windows: fastboot boot c:\downloads\cwm-recovery.img

Everything else will work in the standard custom recovery mode EXCEPT the ability to flash a kernel. To flash a kernel through the custom recovery, fastboot mode must be used per HTC's unlock method.
 

Meercy

Senior Member
Mar 24, 2011
56
0
Tenn
well it most definetly worked. i jus downloaded the zip file and was able to back up my settings. Only problem i have is. ( which is a similiar problem i had before this. if i powered off the phone and plug it to charge it would automatically restart the phone.) When i power off now and plug it in to charge. It automatically goes to the clockworkmod set up. none the less my phone works and i have backed it up. But i still was wondering wat could cause these problems ?
 
W

Wild Child

Guest
Great start for this....from what i was told theres drivers needed in the recovery for it to charge while device is off and fastboot is unchecked...device charges while fastboot is checked and device is off....

WC
 

Pirateghost

Inactive Recognized Developer
Jul 24, 2010
11,696
8,703
androidninjas.com
for the new recovery, we will need to be using a new update-binary and when flashing a rom, your updater-script must contain 4 arguments in the format line, like this:

Code:
format("ext4", "EMMC", "/dev/block/mmcblk0p29", "0");

inside the attached zip you will find the update-binary

if you dont know what update-binary and updater-script is, then this isnt for you and you needn't concern yourself with it.
 

Attachments

  • update-binary.zip
    147.5 KB · Views: 370

drewdatrip

Senior Member
Mar 2, 2011
802
98
Socal
There seems to be some issues pertaining to this CWM and flashing Telstra_boot image and attempting to install Run Runner ROM.

After flashing boot.img and attempting to wipe and isntall the rom i got an aborted error 1. After rebooting back into recov i was stuck at the HTC boot screen

The only way i could get back and working was relocking and flashing the RUU

Drew
 

Pirateghost

Inactive Recognized Developer
Jul 24, 2010
11,696
8,703
androidninjas.com
There seems to be some issues pertaining to this CWM and flashing Telstra_boot image and attempting to install Run Runner ROM.

After flashing boot.img and attempting to wipe and isntall the rom i got an aborted error 1. After rebooting back into recov i was stuck at the HTC boot screen

The only way i could get back and working was relocking and flashing the RUU

Drew

Did you not download the fix I provided in the Rom thread? This recovery works fine with the updated binary.

Sent from my HTC PH39100
 

mobb315

Senior Member
Mar 18, 2009
227
16
Question has the flash able zip been updated so it will now work to flash rooms or is it the rom zip scripts that needed updating? Can I place this zip on my SD card and overwrite the old version ( if that's what was in fact wrong)

Sent from my HTC PH39100 using Tapatalk
 

HackitZ

Senior Member
Jul 19, 2009
946
278
North of the Border
www.hackitz.ca
I have a raider from rogers and tried putting the PH39IMG zip on my htc sd drive and get an error about wrong img (or something to that effect).

So is this for the at&t vivid only?

as I still have cwm from the original raider thread for rogers, bell, fido from here.

and this appears to be updated and backing up to the ext-sd, which is much better.:)
 
Last edited:

Pirateghost

Inactive Recognized Developer
Jul 24, 2010
11,696
8,703
androidninjas.com
I have a raider from rogers and tried putting the PH39IMG zip on my htc sd drive and get an error about wrong img (or something to that effect).

So is this for the at&t vivid only?

as I still have cwm from the original raider thread for rogers, bell, fido from here.

and this appears to be updated and backing up to the ext-sd, which is much better.:)

no, just fastboot flash the new recovery img. the PH39 method isnt working right now for some reason.
 
  • Like
Reactions: HackitZ

HackitZ

Senior Member
Jul 19, 2009
946
278
North of the Border
www.hackitz.ca
Thanks will try now.


no, just fastboot flash the new recovery img. the PH39 method isnt working right now for some reason.


---------- Post added at 09:01 PM ---------- Previous post was at 08:29 PM ----------

Worked like a charm, just finished my first nandroid backup as well.

off we go to start testing out a rom.....

wooo hoooo!:D


no, just fastboot flash the new recovery img. the PH39 method isnt working right now for some reason.
 
Last edited:

HackitZ

Senior Member
Jul 19, 2009
946
278
North of the Border
www.hackitz.ca
ok i have a question, after using the phone for a full day know (still stock).

I have noticed I'm unable to keep my connection to rogers for data only.
I have checked and the apn is right.
I have cleared dalvic cache and fixed permissions.

Still when im away from wifi and using data, most of the time i have no connection.

Now before i updated to this version of cwm i had no issue's with my data connection.

anyone else having an issue with a raider on rogers?

Thanks
 

Top Liked Posts

  • There are no posts matching your filters.
  • 33
    Howdy y'all!

    I just compiled a proper version of ClockworkMod recovery 5.5.0.4 off of the ICS branch of CyanogenMod.

    It supports backing up boot images (I have heard that the image that is being flashed now doesn't support backing that up), and in the near future will support recovery chargemode.

    This repository will hopefully contain in the near future a semi-working copy of CyanogenMod 9 also, but there's no guarantees on that one :)

    So, without further ado:

    What is this?
    This is ClockworkMod Recovery 5.5.0.4 and the files necessary to build it yourself.

    How do I use it?
    You must first be unlocked with HTCDev.com (there is an excellent guide over there, just click on the Unlock Bootloader button and it'll walk you through)

    Once you're unlocked, download the prebuilt image below, and do the following (in the same directory you used to unlock your phone):
    Code:
    fastboot flash recovery <path/to/prebuilt-image-you-downloaded.img>
    You need to replace the stuff in brackets with the path to the img file you downloaded from here...

    Alternate Installation Method (ph39img)
    Much easier installation once unlocked with HTCDev...
    Simply download the ph39img.zip I have linked to in the downloads section, and put it on your external SD card.
    Reboot your phone into HBOOT, and allow the update. Then you've got clockwork installed super easy, no computer needed!

    How is this different from the ClockworkMod image that's floating around here?

    Truth be told, I haven't tried the other version yet-- but I have been told that it doesn't back up boot.img, and has a few other bugs.

    Also, this version has /sdcard mapped to the external SD card as opposed to the internal SD card. This is a safety feature to prevent losing backups in case your device becomes inaccessible. All backups should be to an external storage medium (even on your desktop, it's a good practice to not backup your hdd to the same device :) )

    I'm sure mine has bugs too, but I'm posting the source so y'all can laugh at me :)


    Changelog
    recovery-take1 : initial release

    recovery-beta2 : now supporting charge mode in all forms just like stock recovery, and a few behind-the-scenes tweaks :)

    Tips and Tricks (what works, and what doesn't)
    Please read the following-- the HTCDev unlock comes with it's own disadvantages and risks...

    • The HTCDev unlock adds the word "**UNLOCKED**" to your HBOOT screen. Even if you put your phone to stock with a RUU and re-lock the phone, your phone will show "**RELOCKED**" when booted to the bootloader.
      At this time, I am unsure if AT&T will refuse warranty claims if they see that text. Just remember: if you unlock, there may not be any way back to complete stock any time soon.
    • Another disadvantage of the HTCDev unlock: ClockworkMod recovery CANNOT flash kernels. You must use JoeyKrim's kernel flasher ( http://xdaforums.com/showthread.php?p=20926830 )or fastboot to flash kernels. This includes Nandroid backups.
      If you back up your phone and apply a new ROM and kernel, you will have to fastboot flash the old boot.img back or use JoeyKrim's kernel flasher before switching ROMs.
    • If you flash a ROM, make sure to read the instructions with the ROM. Every ROM developer has a different method of flashing the kernel-- some come with a script to run, and others just give you the files to flash. Please read what they have to say before posting here with a complaint :)
    • Not seeing your rom .zips on your SD card, or having trouble restoring a backup?
      This version of ClockworkMod has the external SD card set as primary. This is to avoid the problem of "my phone died, and I can't access my backups".
      To solve this issue, simply put your ROMs or whatnot on your external SD card. In the future, I may look into how hard it is to add a internal/external SD switcher to clockwork, but for now the safest default is the external SD.
      Sorry about that!
    • Some rom.zip's don't work...
      This may be because they're using an old version of the update-binary in their .zip file. Contact your ROM maintainer and ask for an updated version :)
      If you are a ROM developer, here's the updated "update-binary". Drop it in your META-INF/com/google/android directory in your ZIP and update your format() commands properly...
    • HELP! I CANT GET INTO RECOVERY! *new!
      If you find yourself unable to get into CWM (i.e. the screen flashes some text, then reboots immediately), just boot to fastboot (hboot -> fastboot), then issue "fastboot erase cache" on your PC.
      Then you should be able to boot into ClockworkMod. After you're in there, make sure to format /cache to fix the problem.
      This issue will be fixed soon, I'll add some intelligence to the kernel to not bother rebooting to fsck a partition if it's marked 'dirty' or unmountable. Stock recovery is supposed to fsck the partitions if they're dirty/broken, but CWM doesn't bother, and the kernel gets easily confused.

    How can I contact (chastise, praise, call names) you?

    On IRC (Freenode) you'll find me hanging out in #htc-holiday when I'm available.
    Just say my name "IOMonster" (or "IOMonster_desk") and if I'm around I'll answer.

    I also will sometimes respond to PM's on XDA, but XDA's forum has a bad habbit of not emailing me when I get a new PM...

    Standard "it might not work" clause

    This software hasn't been thoroughly tested, and it might not work.
    It might not backup things correctly, and it might not restore them right.
    Please don't trust this software with anything sensitive or life-alteringly important.
    I'd hate to say "I told you so!" :)

    That's not to say this software doesn't work, it's just the standard disclaimer.

    Donation Information
    I love to develop. I don't do this for money, I do it just for the "thanks".

    Please don't feel obligated to donate, but if you feel like it, you can click the button below to donate a small amount to me. Alternatively, consider donating to a charity of your choice-- there are so many good causes out there that could use your donation.
    Thank you in advance!

    Credits / Thank You's
    • IanWizard-cloud (testing, moral support :) )
    • Pirateghost (much needed debugging, testing, and flashing his phone no less than 20 times!)
    • joeykrim
    • toastcfh
    • fattire
    • BananaCakes (for getting clockwork built in the first place and enabling so many mods on day 1 of unlock!)
    • ..and lots of others!

    Thanks for giving this looong post a read! :)
    Good luck!
    5
    Added links for Chargemode enabled recoveries :)
    5
    Heads up: new version supporting chargemode is on it's way :)

    AAAND, I think I may have a solution to be able to flash boot.img (aka Kernels) from recovery. It's a bit of a convoluted solution, but it will work, and should be fairly easy for the user to deal with.

    I'll post a link to the new version (and change the title of the thread) after i've got a few verifications that the recovery chargemode does indeed work 100% as expected.
    4
    THANKS FOR THIS!!!

    I was going crazy w/o the power-off battery charging screen!

    Was it difficult to add in?

    Not too bad, just took a little bit of thinking as for how to properly add it into the makefiles for recovery.

    Now I'm on to my next milestone: restoring/flashing kernels from within recovery.

    HTC actually has a method for doing this properly, it's called "write_firmware_image", and it's how HTC flashes boot.img and modem updates from within recovery. There's no real magic to it, but the process is as follows:

    In the updater-script, a ROM developer calls:
    Code:
    write_firmware_image("PACKAGE:firmware.zip", zip);
    which takes a PG36IMG.zip style file, and writes it DIRECTLY to /cache, destroying the filesystem of /cache in the process...

    After the zip is written directly to /cache, recovery sets a flag in the MISC partition saying "update-zip" then reboots.

    The phone then reboots to hboot and seamlessly applies the update, then reboots back to recovery so that recovery can format /cache to get a working EXT4 filesystem back in there.

    Here's the snag: HTC isn't using any standard for the way they use the MISC partition. Normally, you'd have a partition that the first few hundred bytes or so were dedicated to "bootloader commands", but on ours-- our MISC partition contains our CID and some board flags there. Even better, it would appear that the partition is write protected by hboot.

    Anyway, I'm taking some time out from working on CyanogenMod 9 to get this going, since it's the #1 requested feature so far.

    Also, in case anyone's interested, I mapped out the partitions on our phone: http://pastebin.com/iyBnjRRa .

    Hopefully I'll have an update here soon...
    4
    Hey, I updated the first post with instructions for anyone who can't get into recovery.

    The simple gist is to just boot to fastboot, and run "fastboot erase cache", then format /cache from recovery.

    Easy fix!

    I'll make a build of CWM that doesn't care soon... I smell a CM9 or CM7 release soon though, and it should be included there :)