[One (M7) Q&A, Help & Troubleshooting] nkk71:
CWM nandroid backup

(Windows7, Mac, Linux)

First off, placeholders in the below guide:

CID: H3G__001 should be substituted with your CID, I’m using H3G__001 just as an example

nandroid backup: “2013-mm-dd.hh.mm.ss” has to be replaced by the real name of the nandroid backup folder

Step 1: go back to Sense 5 Stock

(updated 6 February 2014 for different Operating Systems)

in bootloader/FASTBOOT USB, change your CID:

fastboot oem writecid HTC__001 (two underscores)

fastboot reboot-bootloader

-> and confirm CID is HTC__001

Download this: http://www.htc1guru.com/dld/ruu-zip...1-27_10-31-1131-05_release_310878_signed-zip/

if your MID is not PN0710000

in order not to mess around with changing MID:

for PN0711000: set CID to HTC__J15, and download this RUU: http://www.htc1guru.com/dld/ruu-zip...0-01_release_311663_signed_2_4_decrypted-zip/

for PN0712000: set CID to CWS__001, and download this RUU: http://www.htc1guru.com/dld/ruu-zip-m7_ul_jb_50_cingular-1-26-502-15-decrypted-zip/

for PN0713000: set CID to T-MOB010, and download this RUU: http://www.htc1guru.com/dld/ruu-zip...0-20-10-40-1150-04-release-324846-signed-zip/

for PN0714000: set CID to HTC__044, and download this RUU: http://www.htc1guru.com/dld/ruu-zip...0-13_10-33-1150-01_release_311678_signed-zip/

rename the downloaded file to ruu.zip (careful about .zip.zip in Windows), then in bootloader/FASTBOOT USB, flash it:

fastboot oem rebootRUU

fastboot flash zip ruu.zip

fastboot flash zip ruu.zip <- yes TWICE, the first one will report “failed flush again”, the second one will succeed.

fastboot reboot-bootloader

This will completely return you to 100% stock Sense 5, but European unbranded version (or whatever version the MID+CID ruu was made for).

Step 2: go back to H3G__001

fastboot oem writecid H3G__001 <- remember to replace this with

YOUR CID

fastboot reboot-bootloader

-> and confirm CID is back to H3G__001

Step 3: restore nandroid

fastboot boot CWM.img

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

adb devices

it should show your device serial number followed by "recovery" (if adb doesn't see your phone in Windows, please check FAQ #2 in first post, and fix drivers before continuing)

download this nandroid: http://www.htc1guru.com/dld/m7-cwm-nandroid-backup-cid-h3g__001-1-28-771-x-2013-04-09-zip/ <- this is just an example, remember to download the nandroid for

YOUR version

from here: http://www.htc1guru.com/downloads/stock-nandroid-downloads/

extract the zip on your PC, it will give you a folder called similar to "2013-mm-dd.hh.mm.ss" place it in your adb folder then push it:

adb push 2013-mm-dd.hh.mm.ss /data/media/clockworkmod/backup/2013-mm-dd.hh.mm.ss <- replace mm, dd etc. to what the download gave you

in recovery select RESTORE, it should show you the above backup, so select "2013-mm-dd.hh.mm.ss" and restore it.

You still need to get the preloaded stock apps (which get deleted when unlocking using HTCdec), so download this:

http://loadbalancing.modaco.com/download.php?file=one-1.28.401.7-preloaded-modaco-withoutmovie.zip (from this thread: http://xdaforums.com/showthread.php?t=2200628)

adb push one-1.28.401.7-preloaded-modaco-withoutmovie.zip /data/media/

in recovery, select "install zip" -> "choose zip" -> and install the above file

Step 4: get back stock recovery

the above nandroid may or may not contain stock recovery, but I doubt it does, so get one from here (find one as close as possible to your version): http://xdaforums.com/showthread.php?t=2463387

and rename it to stock_recovery.img (careful about .img.img in Windows)

now let's reboot to bootloader/FASTBOOT USB:

adb reboot bootloader

fastboot erase cache

fastboot flash recovery stock_recovery.img

fastboot erase cache

Step 5: let's get rid of TAMPERED (if it's there) and set you back to LOCKED (not relocked)

In bootloader/FASTBOOT USB, boot to CWM recovery:

fastboot boot CWM.img

-> you should now be in CWM recovery.

Method 1: using adb commands, more reliable, but be careful with the dd commands!!

I recommend you copy/paste the "echo | dd" commands!! (If you write to the wrong partition/offset you could have a brick)

C:\ADB3>[B][COLOR="Blue"]adb devices[/COLOR][/B]
List of devices attached
HT34xxxxxxxx recovery [I]<- you need to be in CWM recovery to
ensure [B]root[/B] privileges
i.e. an adb shell with [B]#[/B] as opposed to [B]$[/B][/I]

C:\ADB3>[B][COLOR="Blue"]adb shell[/COLOR][/B]

[I][SIZE="1"]Resetting TAMPERED[/SIZE][/I]
~ # [B][COLOR="Blue"]echo -ne '\x00' | dd of=/dev/block/mmcblk0p7 bs=1 seek=4265988[/COLOR][/B]
echo -ne '\x00' | dd of=/dev/block/mmcblk0p7 bs=1 seek=4265988
1+0 records in
1+0 records out
1 bytes (1B) copied, 0.009370 seconds, 106B/s

[I][SIZE="1"]Setting LOCKED[/SIZE][/I]
~ # [B][COLOR="Blue"]echo -ne '\x00\x00\x00\x00' | dd of=/dev/block/mmcblk0p3 bs=1 seek=33796[/COLOR][/B]
echo -ne '\x00\x00\x00\x00' | dd of=/dev/block/mmcblk0p3 bs=1 seek=33796
4+0 records in
4+0 records out
4 bytes (4B) copied, 0.007691 seconds, 520B/s

~ # [B][COLOR="Blue"]exit[/COLOR][/B]
exit

and continue with below instructions.

Method 2: Guru Bootloader Reset, more automated, but may freeze

adb push Guru_Bootloader_Reset_1.0.zip /data/media/

in recovery, "install zip" -> "choose zip" -> and select "Guru_Bootloader_Reset_1.0"

go through the installer and select "Remove TAMPERED" and "LOCK Bootloader"; once finished: continue with below instructions.

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: get your 1st OTA

finally (almost) to confirm everything is back to 100% stock, reboot your phone, and set up only basic stuff such as WiFi, check for software update and download & install the

1st one only

! (make sure it's either another 1.xx or 2.xx, do not use a 3.xx update, if you intend on going S-On)

Since recovery is not exactly your version, you may need to reboot your phone manually if it doesnt by itself: the progress bar stopped somewhere in the middle -> press and hold POWER + VOLDOWN, when it reboots keep holding VOLDOWN to get back to stock recovery and let it finish its business; repeat if it gets stuck again

After finishing the OTA, boot up your ROM, and check you

Settings->About

to confirm your new version, then reboot to bootloader and do a fastboot getvar all, and confirm firmware and hboot are also updated

Step 7: do a factory reset

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

to get rid of the nandroid and bootloader_reset from your internal storage

Step 8: if YOU decide to go S-On

(Note: this should only be done for warranty or selling the phone, it is not needed for OTAs)

fastboot oem writesecureflag 3

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

as far as I know, this was introduced in hboot 1.55

All done. :victory: you can now take any remaining OTAs.

Side note

: why is this procedure so long you may ask, then take a look here for a brief explanation: http://xdaforums.com/showpost.php?p=52430301&postcount=834