[HTC Sensation] arabology:
TO DE-BRAND OR REINSTALL STOCK ROM (Changes to Stock S-off, Removes Root and clockwork)

Reinstall your original stock ROM you had (e.g Vodafone, Tmous, Asian, European unbranded etc. if you are changing back to S-ON)

1. Backup all User Data and Apps (Titanium backup Recommended) SKIP THIS STEP IF YOU WANT TO WIPE EVERYTHING

2. Use the SUPERCID method above. (Confirmed to work)

3. If you cannot get superCID to work. Follow this by Alexp999. HERE: any problems PM ME and i will help

Your phone bootloader will read "PYRAMID PVT SHIP S-OFF RL" after this, Root and clockwork will have been removed now

STEP 5 - CHANGING BACK TO S-ON - PROCEED WITH CAUTION. ONLY DO THIS IF YOU ABSOLUTELY HAVE TO. BEWARE THERE IS A RISK OF BRICKING READ BEFORE GOING TO STEP 1.

YOU MUST Follow this correctly otherwise you could semi-brick your device (Semi bricks recovery by re-flashing RUU). If you follow it correctly YOU WILL GET S-ON SUCCESSFULLY -confirmed by other users

I cannot be held responsible if anything goes wrong but i will help in every situation. 2 unrecoverable bricks so far. 1 due to not flashing RUU

First time i did this with a custom ROM installed - semi-bricked my device (couldn't boot due to security warning as S-on doesn't work with custom roms), restored it using RUU.exe

Second time after S-off i took the following steps and successfully went back to S-ON without any problems and booted up into stock rom.

Confirmed to work by several others as well as myself

1. Follow Step 4 above to get SuperCID - Skip if you already have it

2. Restore your official stock Rom: Just click here to download an Official Rom RESTORE STOCK EVEN IF YOU JUST RESTORED IT RECENTLY OR ARE ALREADY ON STOCK ROM. This is to ensure nothing gets changed in stock for S-on to be successful

So if you are already on a stock ROM or you just went back to stock ROM, i don't care, restore the stock ROM again using the RUU.exe if you don't want to be bricked!

Connect to your phone in charging mode. click the "RUU_pyramid_*****.exe" file you downloaded and follow on screen instructions.

3. Make sure when you download the RUU. download the same or similiar RUU version as your phone came with (e.g. Tmous or EU or Asian etc). As long as you install a stock rom similiar to what you had you should be ok. FAILURE TO DO THIS MAY BRICK YOUR PHONE.

4. Switch your phone on now and let it boot for the first time and just skip through the welcome screen.

5. Go back to Step 4 - SUPERCID and go through 1 to 7 to get to the fastboot bootloader. (so just do what you did before, put adb files in local disk, adb reboot bootloader etc)

6. enter the command "fastboot oem writesecureflag 3" (Thanks Dazweeja)

7. Reboot into bootloader using "fastboot reboot-bootloader" or remove & reinsert the battery and press power on while keeping hold of volume down.

8. Bootloader should now read Pyramid PVT Ship S-ON RL.

9. Remove and reinsert the battery. Press power on as normal

You should now have S-on back and you can return your device or do whatever it is covered again under warranty.

10. IF IT DOESN'T REBOOT and bootloader says ***Security Warning**

Remove and re-insert the battery and go back into bootloader and holding Volume Down +power button select fastboot

11. Run RUU_Pyramid_***.exe to reflash stock rom. (the one u just downloaded in step 1) and then reboot. It should work now

info from here: http://xdaforums.com/showthread.php?t=1192300