[One (M7) Q&A, Help & Troubleshooting] stovie_steve:
Hi All,

I have merely followed the instructions of other devs here to get my phone back to complete stock O2. I believe this guide could work for other carrier based models as well

Mods - Feel free to post this wherever or make any changes.

These are the steps I took to get back to S-ON, reset the ***TAMPERED*** flag and lock the bootloader. The reason why I post this is because I had several issues getting back to stock, and this is for anyone who is having the same issues

I had several scary messages when going back to S-ON when I thought I was completely stock, which included the "Security Warning" message in bootloader when running fastboot oem writesecureflag 3. I also had a message when booting up the stock ROM in 3.62.206.1 saying "TAMPER DETECTED - REBOOTING after trying fastboot oem writesecureflag 3. Once in bootloader, the tampered message re-appeared and I was S-ON and LOCKED. After running all the steps, I have been able to reboot several times and factory reset without the ***TAMPERED*** reappearing

Step 1: Getting S-off

If you are using bootloader 1.44 - Use Revone http://xdaforums.com/showthread.php?t=2314582

For bootloaders 1.5x you should download the Sunshine app at http://theroot.ninja/

The closer you are to stock ROM/stock kernel the better. To S-off it will cost you a mere $25, but it works in 5 mins and no need for computers/adb commands

Step 2: Remove ***TAMPERED***

After getting S-OFF, reset the ***TAMPERED*** flag and lock the bootloader using the following commands from these posts http://xdaforums.com/showthread.php?p=46183050#post46183050 and http://xdaforums.com/showthread.php?t=2477792 (credit to scotty1223)

To LOCK the Bootloader

To reset the TAMPER in bootloader

Step 3: Downgrade your Hboot to 1.44

Download the Hboot 1.44 from http://www.htc1guru.com/dld/1-29-401-12_hboot_1-44-zip/

Before flashing, The android-info.txt file needs modified by clicking into the file (not extracting it) and changing the model ID to whatever your model is. This can be checked by running the command fastboot getvar all and checking the model ID number

Now flash the Hboot. To do this, boot to bootloader screen using the command adb reboot-bootloader

Type the following commands:

fastboot oem rebootRUU

fastboot flash zip 1.29.401.12_hboot_1.44.zip

After it finishes, execute the command again to complete the flash:

fastboot flash zip 1.29.401.12_hboot_1.44.zip

Fastboot reboot

Step 4: Run an earlier RUU from 1.29.xxx.xx

We need to run and earlier RUU first. For now, change CID to HTC__032

Download RUU_M7_UL_JB_50_HTC_Europe_1.28.401.7_Radio_4A.13. 3231.27_10.31.1131.05_release_310878_signed from thanks to crushalot, http://d-h.st/Gt8. This will reset the phone back to complete stock, but not stock for the original CID O2___001. Once the RUU installs, reboot into bootloader and run the following command

fastboot oem writecid O2___001.

Check your bootloader and you should see the phone is still S-OFF and the CID is now for O2.

Step 5: Getting S-OFF again

This is if for some reason the phone has gone back to S-ON. To be honest, I did this step anyways just to be safe. Download, push and flash revone using the commands on the toolkit and ensure that the phone is not ***TAMPERED***

Using Revone, Unlock the bootloader - adb reboot bootloader to check it is unlocked

Step 6: Restoring an earlier backup

Download M7 CWM Nandroid Backup CID O2__102 1.27.206.1 2013-03-30 from crushalot's page on XDA and extract the file to the PC until you have a folder with a date on it and time (2013-03-11.17.58.27)

Make a new folder in your HTC one called clockworkmod. Inside here place a new folder called backup (all lower case). Place the backup here

Also, download http://xdaforums.com/showthread.php?t=2200628 and place onto your SD Card. Once you flash the nandroid backup, go ahead and flash this. It will fix the missing preload apps (calculator, flashlight etc) which happens when unlocking the bootloader, and if these apps are missing can cause future OTA's to fail

Download CWM recovery and rename to CWMTG.img and place in your adb folder. You can also download Hassoon's Toolkit and copy the recovery from there if you like. At this point, ensure your bootloader is UNLOCKED.

From the fasboot menu, type the following

Fastboot boot CWMTG.img

This will boot into the recovery without installing it. Restore the nandroid backup you downloaded earlier and install the preload fix. Reboot

Step 7: Restoring stock recovery, Locking the Bootloader and install updates via OTA

Download the stock recovery for O2 from here http://d-h.st/l1q and flash via fastboot

Once booted up, lock the bootloader using Revone and remove tampered (run the command anyway even if it doesn't say ***TAMPERED***. Check for OTA - The one I got was for 2.24.206.1

Step 8: Returning to S-ON

Verify that the bootloader is LOCKED, not ***TAMPERED*** and hboot is 1.54 with the OS confirming your firmware

Type the command: Fastboot oem writesecureflag 3

Enjoy complete stock and continue with the OTA's

If I helped in any way just click thanks!