[GUIDE] How to extract RUU & manually flash rom.zip HTC One M7

Search This thread

webslasher

Senior Member
Jul 4, 2011
289
48
Malang
Sunshine is the only way to achieve s-off on 1.57+

ok... its a little bit confusing, you are aware that sunshine is the only method available to s-off hboot 1.57+ but you are looking to achieve s-off without sunshine... So you are developing your own exploit?

i know that sunshine is the only way to S-OFF if the HBOOT version is 1.57. And i was looking for a way to downgrade to earlier version of HBOOT, so i could use other exploits that used to work.

downgrading without S-OFF was doable on other HTC devices i owned, so i thought there could be a way.
 

alray

Inactive Recognized Contributor
May 22, 2012
8,932
3,593
i know that sunshine is the only way to S-OFF if the HBOOT version is 1.57. And i was looking for a way to downgrade to earlier version of HBOOT, so i could use other exploits that used to work.

downgrading without S-OFF was doable on other HTC devices i owned, so i thought there could be a way.

oh I understand now ;)
 
was there ever a solution to the guys who had a *tampered* and "relocked" bootloaders?

I'm having a problem with mine as well.

**Tampered**
**Relocked**
M7_U PVT SHIP S-ON RH
HBOOT-1.57.0000
RADIO-4T.28.3218.04
OPENDSP-V32.120.274.0909
OS-1.27.401.00
EMMC-BOOT 2048MB
DEC 12 2014,19:52:21.0


(bootloader) version: 0.5
(bootloader) version-bootloader: 1.57.0000
(bootloader) version-baseband: 4T.28.3218.04
(bootloader) version-cpld: None
(bootloader) version-microp: None
(bootloader) version-main: 1.27.401.00
(bootloader) version-misc: PVT SHIP S-ON
(bootloader) serialno: HT36JW915374
(bootloader) imei:
(bootloader) meid: 00000000000000
(bootloader) product: m7_u
(bootloader) platform: HBOOT-8064
(bootloader) modelid: PN0711000
(bootloader) cidnum: HTC_001
(bootloader) battery-status: good
(bootloader) battery-voltage: 4250mV
(bootloader) partition-layout: Generic
(bootloader) security: on
(bootloader) build-mode: SHIP
(bootloader) boot-mode: FASTBOOT
(bootloader) commitno-bootloader: dirty-6d8a0b9b
(bootloader) hbootpreupdate: 11
 

mukulmhembrom

New member
Oct 2, 2015
1
0
Please Help

Hi there, Thanks for your helpful information. I found and downloaded "PN07IMG_M7_U_L50_SENSE60_MR_hTC_Asia_WWE_7.21.707.121_Radio_4T.35.3218.16_10.33Q.1718.01D_release_431111_signed.zip" for my HTC One M7. My phn details are as follows:

(bootloader) version: 0.5
(bootloader) version-bootloader: 1.61.0000
(bootloader) version-baseband: 4T.35.3218.16
(bootloader) version-cpld: None
(bootloader) version-microp: None
(bootloader) version-main: 7.21.707.135
(bootloader) version-misc: PVT SHIP S-ON
(bootloader) meid: 00000000000000
(bootloader) product: m7_u
(bootloader) platform: HBOOT-8064
(bootloader) modelid: PN0711000
(bootloader) cidnum: HTC__038
(bootloader) battery-status: good
(bootloader) battery-voltage: 3721mV
(bootloader) partition-layout: Generic
(bootloader) security: on
(bootloader) build-mode: SHIP
(bootloader) boot-mode: FASTBOOT
(bootloader) commitno-bootloader: dirty-0e2a13e5
(bootloader) hbootpreupdate: 11
(bootloader) gencheckpt: 0

As per your instruction, I checked the MID and CID which matched exactly. I performed the steps enumerated by you. But I faced the following issue:

fastboot oem rebootRUU - the process was successful
First time flash was failed, as told by you, as my firmware was firmware than the RUU. But CMD is not allowing me to do the same command again. It says "sending 'zip'.......(50277 KB)" and then nothing happens. This is what I am getting:

C:\Users\Mukul Mrinal\Downloads\fastboot>htc_fastboot flash zip RUU.zip
sending 'zip'... (50277 KB) OKAY
sending time = 3.401 secs
writing 'zip'... (bootloader) adopting the signature contained in this image..
(bootloader) signature checking...
(bootloader) rom parsing start ...
(bootloader) rom parsing finish ...
(bootloader) zip header checking...
(bootloader) zip info parsing...
(bootloader) checking model ID...
(bootloader) checking custom ID...
(bootloader) checking main version...
(bootloader) checking hboot version...
(bootloader) start image[hboot] unzipping for pre-update check...
(bootloader) start image[hboot] flushing...
(bootloader) signature checking...
(bootloader) [RUU]WP,hboot,0
(bootloader) [RUU]WP,hboot,99
(bootloader) [RUU]WP,hboot,100
(bootloader) ...... Successful
FAIL90 hboot pre-update! please flush image again immediately
FAILED (remote: 90 hboot pre-update! please flush image again immediately)
For "hboot-preupdate" response, restart the same procedure for device FA36AW91
51...
sending 'zip'... (50277 KB)

What should I do now. Please help
 
Last edited:

alray

Inactive Recognized Contributor
May 22, 2012
8,932
3,593
Hi there, Thanks for your helpful information. I found and downloaded "PN07IMG_M7_U_L50_SENSE60_MR_hTC_Asia_WWE_7.21.707.121_Radio_4T.35.3218.16_10.33Q.1718.01D_release_431111_signed.zip" for my HTC One M7. My phn details are as follows:

(bootloader) version: 0.5
(bootloader) version-bootloader: 1.61.0000
(bootloader) version-baseband: 4T.35.3218.16
(bootloader) version-cpld: None
(bootloader) version-microp: None
(bootloader) version-main: 7.21.707.135
(bootloader) version-misc: PVT SHIP S-ON
removed
removed
(bootloader) meid: 00000000000000
(bootloader) product: m7_u
(bootloader) platform: HBOOT-8064
(bootloader) modelid: PN0711000
(bootloader) cidnum: HTC__038
(bootloader) battery-status: good
(bootloader) battery-voltage: 3721mV
(bootloader) partition-layout: Generic
(bootloader) security: on
(bootloader) build-mode: SHIP
(bootloader) boot-mode: FASTBOOT
(bootloader) commitno-bootloader: dirty-0e2a13e5
(bootloader) hbootpreupdate: 11
(bootloader) gencheckpt: 0

As per your instruction, I checked the MID and CID which matched exactly. I performed the steps enumerated by you. But I faced the following issue:

fastboot oem rebootRUU - the process was successful
First time flash was failed, as told by you, as my firmware was firmware than the RUU. But CMD is not allowing me to do the same command again. It says "sending 'zip'.......(50277 KB)" and then nothing happens. This is what I am getting:

C:\Users\Mukul Mrinal\Downloads\fastboot>htc_fastboot flash zip RUU.zip
sending 'zip'... (50277 KB) OKAY
sending time = 3.401 secs
writing 'zip'... (bootloader) adopting the signature contained in this image..
(bootloader) signature checking...
(bootloader) rom parsing start ...
(bootloader) rom parsing finish ...
(bootloader) zip header checking...
(bootloader) zip info parsing...
(bootloader) checking model ID...
(bootloader) checking custom ID...
(bootloader) checking main version...
(bootloader) checking hboot version...
(bootloader) start image[hboot] unzipping for pre-update check...
(bootloader) start image[hboot] flushing...
(bootloader) signature checking...
(bootloader) [RUU]WP,hboot,0
(bootloader) [RUU]WP,hboot,99
(bootloader) [RUU]WP,hboot,100
(bootloader) ...... Successful
FAIL90 hboot pre-update! please flush image again immediately
FAILED (remote: 90 hboot pre-update! please flush image again immediately)
For "hboot-preupdate" response, restart the same procedure for device FA36AW91
51...
sending 'zip'... (50277 KB)

What should I do now. Please help

First if the phone is S-ON you can't flash a RUU version that is older than what currently installed on your phone (downgrading requires s-off)
see last FAQ of this post to know what you can or can't flash depending your phone status (s-on/off - unlocked/locked)

2nd, to flash a 7.xx.xxx.x RUU (lollipop ruu), you must use htc_fastboot.exe, not the regular fastboot.exe
Explained in this post

Btw never post your IMEI and SERIALNO. Edit your post to remove these 2 numbers.
 

alray

Inactive Recognized Contributor
May 22, 2012
8,932
3,593
I need help please. I relocked htc m7 now i cant turn it on. its stuck in bootloader. Its was in a custom rom. please help me to go back to previous rom or to stock rom

If you relock the booloader with custom software installed, it will not boot. Unlock the bootloader again or flash a ruu on your phone.
 
  • Like
Reactions: kolithakasun

Django64

Member
Aug 22, 2010
32
0
Port of Spain
fast rom.zip

Hello I know this is an old thread but I am hoping someone can help me with this problem I am having, i am trying to flash my M7at&t PN0712000 cidnum: CWS__001 manualy by the command prompt
I have all my files in a folder on C:\Android-adb
but when I do the fastboot command to install the rom zip I am getting this error message,
"C:\Android-adb>fastboot flash zip C:/Android-adb/rom.zip
load_file: could not allocate 1556101543 bytes
error: cannot load 'C:/Android-adb/rom.zip'"
can someone tell me what I am doing wrong, thanks very much advance
 

EuphoriaBR

Member
Mar 3, 2015
21
4
Campinas
Hello I know this is an old thread but I am hoping someone can help me with this problem I am having, i am trying to flash my M7at&t PN0712000 cidnum: CWS__001 manualy by the command prompt
I have all my files in a folder on C:\Android-adb
but when I do the fastboot command to install the rom zip I am getting this error message,
"C:\Android-adb>fastboot flash zip C:/Android-adb/rom.zip
load_file: could not allocate 1556101543 bytes
error: cannot load 'C:/Android-adb/rom.zip'"
can someone tell me what I am doing wrong, thanks very much advance

The filename/location is wrong.

Try this:
Code:
fastboot flash zip rom.zip
 
Last edited:

c5satellite2

Senior Member
Mar 2, 2012
2,751
1,044
c:\ c:/ backslash forwardslash who cares these days!

LOL! Didn't even need the full path if it was in the same folder. I'd call that a compound path slash error

Nice catch either way, you beat me to it

Sent from my HTC One M8 using XDA Free mobile crap app
 
Last edited:
  • Like
Reactions: EuphoriaBR
Hy

Please i need help here. I received one HTC ONE Mini2 i think from Germany but dont have language em Portuguese PT PT.
I search for a rom but i cant find and i don´t know for shure what is the best rom.

My htc is:
:\mini-sdk>fastboot getvar all
bootloader) version: 0.5
bootloader) version-bootloader: 3.19.0.000
bootloader) version-baseband: 1.101.1102.1
bootloader) version-cpld: None
bootloader) version-microp: None
bootloader) version-main: 2.19.401.2
bootloader) version-misc: PVT SHIP S-ON
bootloader) serialno: MB429WR01253
bootloader) imei: 351574067707884
bootloader) imei2: Not Support
bootloader) meid: 00000000000000
bootloader) product: mem_ul
bootloader) platform: hTCBmsm8226
bootloader) modelid: 0P8B20000
bootloader) cidnum: HTC__102
bootloader) battery-status: good
bootloader) battery-voltage: 0mV
bootloader) partition-layout: Generic
bootloader) security: on
bootloader) build-mode: SHIP
bootloader) boot-mode: RUU
bootloader) commitno-bootloader: be7179e5
bootloader) hbootpreupdate: 11
bootloader) gencheckpt: 0

Please can you help me find the correct rom for my phone?
Thanks in advance

Sorry for my english
 

MaE_sTrO

Member
Feb 2, 2016
36
9
i really need help over her :
writing 'zip'... (bootloader) adopting the signature contained in this image...
(bootloader) signature checking...
(bootloader) rom parsing start ...
(bootloader) rom parsing finish ...
(bootloader) zip header checking...
(bootloader) zip info parsing...
FAIL99 unknown fail
FAILED (remote: 99 unknown fail)
what should i do now !!!
Plz help
 
Last edited:

iZan86

New member
Feb 19, 2016
1
0
Hey guys,

First of all thanks for the guide.

I was trying to follow the steps on returning my GPE version of HTC M7 (which was originally an unlocked sense one) back to the latest Sense based firmware from HTC (unlocked/developer) which is found in the ROM Download page in HTC US site (I'm not allowed to paste URLs to my comment since I'm new)

I extracted the rom.zip as you've mentioned and checked with the CID/MID which were BS_001 and PN0712000 respectively and changed mine accordingly (I didn't add superCID though)

I was using the commands on a Mac

Once I gave the flash command in fastboot, I got the following error

target reported max download size of 1526722560 bytes
Invalid sparse file format at header magi
sending sparse 'zip' (1477883 KB)...
OKAY [ 69.989s]
writing 'zip'...
(bootloader) zip header checking...
(bootloader) shift signature_size for header checking...
FAILED (remote: 32 header error)
finished. total time: 70.180s


After reading through the steps again, I couldn't find any issue with my steps. Any idea on what's the error in this?

Thanks in advance.

My M7 is with Unlocked bootloader and S-OFF with the Hboot 1.54
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 33
    So, you may have made a bad flash, having trouble to S-OFF or just want to go back to 100% stock ROM and recovery. In that case, the easiest solution is to run your RUU (ROM Update Utility). But unlike the conventional method, this guide is about extracting the rom.zip from your RUU for a faster and more comprehensive installation. The extracted rom.zip will also allow the possibility to decrypt the RUU in order to get access to all the individual files inside the encrypted archive. So, if you want to flash, for example, only the stock recovery, you can do it without having to flash the entire RUU ROM, which will restore the phone's entire software.

    Note: Your HTC One can be either S-ON or S-OFF in order to successfully flash RUU rom.zip. But if your device is S-OFF, you do not need to re/lock your bootloader.

    Follow the instructions in the given order to avoid any hiccups or possible bricking of your device:
    1. You will need to know your HTC One's MID and CID. These codes will allow you to find the required RUU for your phone.
    You need adb and fastboot. Go to your Bootloader. Select Fastboot. Connect your HTC One with its original USB cable to your PC. Do:
    Code:
    fastboot getvar all
    and you should see a list of important information about your device. In particular, note the modelid (MID) and cidnum (CID). If you get nothing, there is an issue with the USB connection between your phone and PC.
    2. Find the correct RUU. Here's a thread: http://xdaforums.com/showthread.php?t=2428276 to find the correct RUU from the filename but more importantly, make sure that both the MID and CID match exactly with your device. You also need to pay attention if you need the M7 UL or M7 U version, which is in the filename of the RUU. If you can't find your RUU from that site, just google or search on XDA. However, not all HTC One variants have RUUs. But if you are already S-OFF, you can change your MID and CID, which will allow you to use any RUU: http://xdaforums.com/showthread.php?t=2322820
    3. Extract the RUU and grab the rom.zip file. This is the most important file you need from the RUU and afterwards you can delete the RUU exe if you want. To get the rom.zip from your RUU exe file, you just need to run the RUU exe file once, and then when the window is ready and waiting for you to press on the "Next" button, just leave it open and go to your temp folder. I'm using Windows XP SP3 32-bit and my temp folder is located at this path: C:\Documents and Settings\Administrator\Local Settings\Temp
    Now, you will see several files and folders. Sort everything in that temp folder based on "Date Modified" with the most recent folder showing up above all other folders. This is the folder you want. The folder name will be bunch of letters and numbers. Inside that folder you will find several files, but what you need is rom.zip and android-info.txt. Copy both these files and paste them somewhere safe on your hard drive. The android-info.txt contains crucial information about the compatibility of that RUU for your phone. Here's the android-info.txt extracted from my RUU exe:
    Code:
    modelid: PN0711000
    cidnum: HTC__001
    cidnum: HTC__J15
    cidnum: HTC__A48
    cidnum: HTC__M27
    mainver: 1.29.401.2
    btype:1
    aareport:1
    DelCache:1
    hbootpreupdate:3
    You can then verify that you have the correct RUU if the modelid matches that of your phone and if you can see your cidnum in that list. If either (or both) of the modelid or cidnum does not match that of your phone, the RUU process will fail. The mainver is the firmware that is going to be flashed onto your phone.
    For easy reference, create a new folder and name it exactly like the RUU exe file and put the rom.zip and android-info.txt in there so you won't have trouble identifying that rom.zip file later if you need to flash it again. Now, you can close the RUU installation window and all the files in that temp folder containing rom.zip will be instantly erased. Note that if you open the rom.zip with Winzip/Winrar, you will see a list of all the files but if you try to extract or double-click to open any of these files, you will get an error saying that the file is corrupt. This warning is only due to the files being encrypted by HTC, since the RUU is an official release and is digitally signed. To access those encrypted files, you will need to decrypt them on Linux.
    4. Go to your bootloader. Do:
    Code:
    fastboot oem rebootRUU
    This will reboot your HTC One and you will see a black screen with a silver HTC logo.
    Now, you will need to access the rom.zip file and flash it. I have copied my rom.zip to my adb folder located at: C:/mini-sdk/rom.zip
    So, i type:
    Code:
    fastboot flash zip C:/mini-sdk/rom.zip
    Don't touch anything during the flash process. It will start and after some time, you will see FAILED error. Don't worry, it's the file preparation process if you have firmware higher than that of the RUU. Just do the same command again and the flash process will complete successfully this time. Look at the Command Prompt to know when the flash is complete. At the same time if you look at your phone, you will notice a green progress bar. When the flashing is complete on the Command Prompt, you will notice that the green bar is stuck at about 95%. This is normal. It's just a bug in the progress bar - what matters is the output from the Command Prompt window.
    5. Then, you reboot. Do:
    Code:
    fastboot reboot
    This will restart your phone. Let it boot up. It might take a little longer for the first boot up sequence. You will then have completely stock software (firmware & ROM). Go to your bootloader and check. Your S-ON/OFF and Bootloader lock/unlock are unchanged from before the RUU rom.zip flashing procedure. You can now also receive OTA updates.

    I hope this has been helpful. Just press the THANKS button! :good:
    6
    If you're S-OFF you do NOT need to relock the bootloader to flash an RUU - just putting that out there :)
    2
    Hello I know this is an old thread but I am hoping someone can help me with this problem I am having, i am trying to flash my M7at&t PN0712000 cidnum: CWS__001 manualy by the command prompt
    I have all my files in a folder on C:\Android-adb
    but when I do the fastboot command to install the rom zip I am getting this error message,
    "C:\Android-adb>fastboot flash zip C:/Android-adb/rom.zip
    load_file: could not allocate 1556101543 bytes
    error: cannot load 'C:/Android-adb/rom.zip'"
    can someone tell me what I am doing wrong, thanks very much advance

    The filename/location is wrong.

    Try this:
    Code:
    fastboot flash zip rom.zip
    2
    Bro I m on bootloop how will I now update my Filmfare version futher just help me to recover from boot loop please:silly:

    You only need to boot in ruu mode to update the firmware.

    IF your bootloader is unlocked, re-lock it:
    Code:
    fastboot oem lock
    fastboot erase cache
    fastboot reboot-bootloader

    Code:
    fastboot oem rebootRUU
    fastboot flash zip firmware.zip
    fastboot flash zip firmware.zip
    fastboot reboot-bootloader

    then flash the ruu:
    Code:
    htc_fastboot oem rebootRUU
    htc_fastboot flash zip ruu.zip
    htc_fastboot reboot

    7.21.707.105 firmware:
    https://www.androidfilehost.com/?fid=95916177934556097

    7.21.707.105 ruu and htc_fastboot:
    http://xdaforums.com/htc-one/general/lollipop-ruu-zip-small-collection-t3053944

    if you want your phone to be s-off, better to do it now because it will be harder to do after updating.

    ---------- Post added at 06:42 AM ---------- Previous post was at 06:40 AM ----------

    can this method be used to downgrade bootloader version?

    You must have s-off to downgrade hboot.

    If yes, zip the desired hboot with the appropriate android-info.txt together and flash in ruuu mode.
    1
    You will need a Windows PC to flash any lollipop ruu.zip because it must be flashed using htc_fastboot.exe (.exe = Windows only) because the fastboot version from the sdk-tools can't handle a 1.5gb file. This will solve your first problem
    Second problem to come, you need at least hboot 1.57 and the version-main to be at least 6.xx.xxx.x to flash a Lillpop (7.xx.xxx.x RUU) so you'll have to update your firmware before flashing the RUU. Flash this (Sorry I had to omit your link so that I could post. This is my first post.) and then flash your 7.xx.1540.xx RUU.




    Hey All. Hey Alray I hope you are still monitoring this thread and can help me. I have had my One M7 AT&T variant for just about two years now and don't ask me why but I juuuust decided to update it. This all started with me trying to update it to the official RUU 7.23.502.4 from HTC's website. It kept failing with a 158 error message. It was completely stock 4.1.2 JB locked bootloader, unrooted and S-On. I managed to run the RUU 3.17.502.3 exe successfully, which the phone is still running. Next I tried to run the RUU 4.18.502.7 and got a 155 unknown error. Same error message also when I tried to run the RUU 7.23.502.4 exe. I have been trying to flash the rom.zip files for the KitKat and Lollipop RUUs via fastboot which keep failing with the same "Invalid sparse file format at header magi" error. However since I saw your advice that you have to use htc_fastboot to flash the large rom.zip files from htc, I tried using it with the extracted rom.zip, android-info.txt and htc_fastboot files from the KitKat 4.18.502.7 RUU but I now have a new error :eek: (See below):

    C:\Users\bobby\Downloads\AndroidDT\sdk\platform-tools>htc_fastboot flash zip rom
    .zip
    sending 'zip'... (42217 KB) OKAY
    writing 'zip'... (bootloader) adopting the signature contained in this image...
    (bootloader) signature checking...
    (bootloader) rom parsing start ...
    (bootloader) rom parsing finish ...
    (bootloader) zip header checking...
    (bootloader) zip info parsing...
    (bootloader) Read zipped android_info fail
    FAILED (status read failed (Too many links))
    Execution time is 10(s)

    Just for clarification here is my current device info:
    C:\Users\bobby\Downloads\AndroidDT\sdk\platform-tools>fastboot getvar all
    (bootloader) version: 0.5
    (bootloader) version-bootloader: 1.55.0000
    (bootloader) version-baseband: 4A.19.3263.13
    (bootloader) version-cpld: None
    (bootloader) version-microp: None
    (bootloader) version-main: 3.17.502.3
    (bootloader) version-misc: PVT SHIP S-ON
    (bootloader) serialno: (omitted)
    (bootloader) imei: (omitted)
    (bootloader) meid: 00000000000000
    (bootloader) product: m7_ul
    (bootloader) platform: HBOOT-8064
    (bootloader) modelid: PN0712000
    (bootloader) cidnum: CWS__001
    (bootloader) battery-status: good
    (bootloader) battery-voltage: 4047mV
    (bootloader) partition-layout: Generic
    (bootloader) security: on
    (bootloader) build-mode: SHIP
    (bootloader) boot-mode: FASTBOOT
    (bootloader) commitno-bootloader: dirty-2da61e5e88
    (bootloader) hbootpreupdate: 11
    (bootloader) gencheckpt: 0
    all: Done!
    finished. total time: 0.049s

    Can you advise me on what to do next please? :fingers-crossed:
    You need at least hboot 1.57 (version-main 6.xx.502.x) to flash a 7.xx.502.x ruu. Best way imo is with s-off so you can convert to another version and get rid of the AT&T software and receive ota updates (dev edition or unlocked wwe)

    Sent from my HTC One using XDA Labs