[One (M7) Q&A, Help & Troubleshooting] Danny201281:
Use this guide at your own risk I will except no responsibility if you brick your device using this guide or any of the files linked in it. Always check Md5 values of files you have downloaded before flashing them to your device. This Guide and the files contained in it are intended for returning to stock on a H3G Branded M7_ul only. S-OFF is required to complete this procedure. For all other types of M7_ul Please see [MENTION=2605798]nkk71[/MENTION] guide here [GUIDE] [02-MAR-2014] nkk71's SuperGUIDE to returning 100% back to stock

Return to 100% Stock For H3G UK M7_ul

Download and prepare all files

Download this: https://www.androidfilehost.com/?fid=23329332407584993 <<<Rename this to ruu.zip

Download this: https://www.dropbox.com/s/82kt3edku0j2sup/cwm.img?dl=0 <<<Leave this as cwm.img

Download 2.24.771.3 Stock reset. Flashes with custom recovery.

http://www.htc1guru.com/dld/guru_reset_m7_2-24-771-3-zip/ <<<Rename this to reset.zip

Download 2.24.771.3.zip firmware here

https://www.dropbox.com/s/9t5ifymw16kjljq/2.24.771.3.zip?dl=0 <<<Rename this to firmware.zip

Put all these renamed files into your adb/fastboot folder.

Step 1: go back to Sense 5 Stock

You already have correct cid HTC__001 for the RUU so well use it to return to complete WWE Stock Software

Boot your phone to the bootloader and connect fastbootusb, Now in the fastboot command line type

fastboot oem rebootRUU

case sensitive^^^^^^

Your phone will reboot to a black screen with silver HTC logo. This is ruu mode we can now flash the RUU.

fastboot flash zip ruu.zip

The first flash is just a pre-update. The screen will go off and then return to ruu mode. Flash the zip again immediately.

fastboot flash zip ruu.zip

The second flash will flash the full ruu, the progress bar on the screen will not reach 100% this is normal ;) as long as the command line has finished it's output it's done.

fastboot reboot-bootloader

This will completely return you to 100% stock Sense 5, but European unbranded version

Step 2: Reset CID to H3G__001 <--- "__" = 2x Underscores

fastboot oem writecid H3G__001
fastboot reboot-bootloader

-> and confirm CID is back to H3G__001

Step 3: restore H3G Stock Rom + Recovery

To install the reset.zip we need a custom recovery, we dont want to flash a custom recovery so we can just boot one temporerily. This is only possible now we have hboot 1.44.

fastboot boot cwm.img

you should now be in CWM recovery; verify adb is working, by using:

adb devices

it should show an output of your device serial number followed by "recovery"

Push the reset.zip with adb

adb push reset.zip /sdcard

The push will take several minutes and the command window will seem unresponsive until the push completes. Once the push is done install the reset.zip using the clockworkmod recovery menu. In the aroma installer you will be presented with some options.

Stock recovery <<<<Yes

Stock Radio <<<<Yes

Root <<<<No

Once the install is complete

adb reboot bootloader

Step 4: Remove TAMPERED (if it's there) and set bootloader to LOCKED (not relocked)

In bootloader/FASTBOOT USB, boot to CWM recovery:

fastboot boot cwm.img

you should now be in CWM recovery; verify adb is working, by using:

adb devices

adb shell

Reset Tampered – Strongly Recommend you Copy and Paste this command

echo -ne '\x00' | dd of=/dev/block/mmcblk0p7 bs=1 seek=4265988

Reset Locked – Strongly Recommend you Copy and Paste this command

echo -ne '\x00\x00\x00\x00' | dd of=/dev/block/mmcblk0p3 bs=1 seek=33796

exit

Since you're still in CWM, go ahead and:

-> "wipe cache"

-> "advanced" -> "wipe dalvik"

then

adb reboot bootloader

and confirm no TAMPERED and LOCKED status

Step 6: Restore Official H3G Firmware

Boot your phone to the bootloader and connect fastbootusb, Now in the fastboot command line type

fastboot oem rebootRUU

case sensitive

Your phone will reboot to a black screen with silver HTC logo. This is ruu mode we can now flash the firmware.

fastboot flash zip firmware.zip

The first flash is just a pre-update. The screen will go off and then return to ruu mode. Flash the zip again immediately.

fastboot flash zip firmware.zip

The second flash will flash the firmware, the progress bar on the screen will not reach 100% this is normal ;) as long as the command line has finished it's output it's done.

fastboot reboot-bootloader

Now reboot the phone from the bootloader menu Setup the basics but DO NOT except any ota updates at this point. If your returning for warranty you need to set the phone back to s-on this must be done before you update to hboot 1.55 or you risk Tampered flag returning.

Step 7: do a factory reset and return to s-on

Go to Settings -> Backup & reset -> Reset phone (at the bottom select Erase all date) -> OK

Once thats complete reboot the phone to the bootloader connect fastboot usb then

fastboot oem writesecureflag 3

reboot 3 times and make sure it doesnt say "tamper detected - rebooting" and then shows TAMPERED again

That's it you can reboot the phone and install any remaining ota updates if you want. But you are now ready to return the device for repair :)