How to Unroot the HTC Sensation 4G

So you need to sell your HTC Sensation 4G or send it in for warranty? Here’s how to unroot it, get a stock recovery, and put S back on so that it is exactly as it was when you took it out of the box.

I. Before You Begin

1. This will give you a stock ROM, stock recovery and bootloader.

2. Only real reason to unroot, is if you want to turn the phone in for warranty purposes, or if you want to sell it (and the person buying doesn’t want it rooted).

II. Setup ADB

1. Head to our how to setup ADB procedure and setup ADB so you can see your phone’s serial number. Once you can see the serial number in command prompt, then you can return here to continue.

How To Setup ADB

III. Use the RUU to Unroot and Put Your Device Back to Stock

1. Download the official RUU from the thread linked below. MAKE SURE YOU CHOOSE THE CORRECT ONE FOR YOUR DEVICE!

Sensation 4G RUU (For T-Mobile US choose the TMOUS version with the highest number, indicating it is the latest version for T-Mobile USA).

2. Make sure USB debugging is still on from when you did the Setup ADB procedure by going to Settings > Applications > Development > Should have a check next to USB Debugging.

3. Plug your device in via USB to your computer.

4. Right click the RUU .exe file and select run as administrator (if you dont have that open just select Open).

5. Follow the RUU’s instructions to flash the stock firmware.

6. After the device reboots and is still plugged in via USB cable to the computer, open the command prompt by clicking on the Start menu and then typing in cmd and hitting enter in the search field.

7. In the command prompt, type the following with hitting enter at the end of each line:

cd c:\androidsdk\platform-tools     (if you followed our adb procedure then that is the exact name, if not then you need to put in the folder where adb is located for you on your computer. i.e. c:\[nameofsdkfolder\platform-tools\)

adb reboot-bootloader

fastboot oem writesecureflag 3

fastboot reboot-bootloader

8. After you type the last line, you should see S-On at the top of the bootloader screen. If so, you are all set.

Thanks to Alphadog32 for the RUU and original procedure.

Join 90k others & subscribe to my weekly, not annoying newsletter for more tech!

* indicates required
  • P1mp2412

    Its not working for me. When i run the RUU it doesnt reboot into bootloader and it gives me an error [155] unknown error. I am using tmous .29 RUU

    • Garagepunk65

      I could not get any of the TMOUS versions to work either. Thought it was because I had wiped CID to 11111. I re-wrote the correct T-Mobile US CID (T-MOB010), but still no luck getting the stock ROM to take.  Finally went in CWM, restored my original backup I made, and it worked perfectly after that.  I was able to reflash OEM ROM 1.45, then went into adb and turned S back On and now my sensation is set to go back to T-mobile for warranty service tomorrow. Thank you so much for your guide, it was insanely helpful! If you didn’t make a backup of your stock rom before you flashed, this won’t help you.  But then you should always make back ups before flashing, right?

      • makhnooth kahba

        in order to get passed the error 155, start the ruu while the phone is already in fastboot.

        • Caitlin

          Thanks, Makhnooth, for that awesome idea! I was having troubles getting passed [155], and after doing this I could finally get it to work.

    • farzan

      awsome dude, had the same problem error 155 , did the rru in fastboot mode, all worked ok , thanks heaps

  • Marc.Cunning

    after “fastboot oem writesecureflag 3″it tells me “fastboot is not recongnized as an internal or external command. operable program or batch.” wat did i do wrong?

  • Airniiikez

    when i do the cd c:AndroidSDKplatform-tools it says “The system cannot find the path specified.” i followed the adb tut an worked fine i did noticed theres nothing in my platform folder tho can any one help

  • Airniiikez

    fastboot is not recognized as an internal or external command

  • ShadowofDante download fastboot and put it in c:AndroidSDKplatform-tools

  • Indiferenc

    and this will put it right back to stock? wil sense 3.0 and all the bloatware that came with it?

    • ShadowofDante

      yes it will

  • Lainemac

    I did as posted but I need to get back to stock hboot. I am currently on revolutionary 

  • Nathan Haws

    The ruu is telling me there is a usb connection error…error code 170

  • Fur

    fastboot is not recognized any help?

  • Kin

    I cannot go to bootloader.
    after typing adb reboot-bootloader
    it reboot then back to SENSE.

    • Makhnooth kahba

      thats because the newest addition of the sdk does not include fastboot. try to download the older version of the sdk, or download fastboot itself and put it in the platform-tools folder.

  • Pingback: Anonymous()

  • Mreilly82

    worked just like you said, thanks!

  • Mhkritzinger

    Hello everyone!

    I just like to ask a question. How do you know what RUU to download??!! I got my Sensation in South Africa and it was not Vodafone branded or anything! The build number was 1.45.401.3 so should I take the RUU with that build number??

    Thanks for an awesome site!

    • HI, yeah I too am from SA and on MTN and have the exact same issue. please help someone, I need to unroot to return my HTC sensation urgently for hardware repairs

  • Ameer Farhan

    Hi. Sorry for the bother.  Sorry for being stupid. How can I go back to S-OFF?

  • Boris

    I have a problem.
    I’ve unlocked my sensation using htc dev, so now is s-on unlocked.
    I want to get it stock, but when i try the relock option in the hboot it says “relocked” and not “locked” as it used to.
    I tried to run stock ruu but it stuck on error 155.
    what can i do to make it stock again.

  • bart

    i did this and after i typed in ”fastboot reboot-bootloader” my phone turned off and it won’t turn on anymore. please help

  • Igor

    It happened the same to me. Have you found any solution?

  • aedan

    RUU_Pyramid_LE_Voda-Hutch_AU_1.73.862.3_Radio_10.58.9035.00U_10.15.9035.02_2_release_222667_signed.exe has been removed anyone out there have it? and willing to share?

  • Hardeep

    It worked for me
    Thanks very much.

  • arajac

    does this work on HTC sensation.

  • edwreybax

    Everything works well with my HTC Sensation 4g T-Mobile… thanks a lot!

  • dean

    THANK YOU!!!

  • CoreO

    Thanks sooo much for the help. Was able to relock my phone. GOD Bless 😉

  • jason

    right now my phone is like in a bootloop in the fastbook. i restart it and about a second later it goes right back to fastboop. please help

  • Ruben

    Works like a charm!! thank you so much!!

  • Joy

    It worked like charm!

  • JON

    how can i get the freaking file hurry pliz

  • Darren

    I did it and my Sensation 4G will not turn back on either after the last ”fastboot reboot-bootloader” command. Has anyone else had this problem and found a solution?

  • Komzi Tomato

    Hey, sorry, my Computer wont recognize the RUU exe file I’v downloaded D: Any help will be nice 🙂

  • RPaterson

    Thanks a ton, worked like a charm!

  • avonb3ar


  • Tara

    I am trying to reroot my htc sensation 4g and it isnt going well. I followed all these instructions and both RUU that I tired wont open. Can someone please help me?

  • robert martin

    hmmmm. My device isn’t listed, does that mean it can’t be done?

  • Awesome! Worked perfectly thank you very much.

  • cassie

    I upgraded from stock to 4.0 IceCreamSandwich through the phones actual software update (i didnt root it). Can I still follow this process to revert it back to factory default? Or do I need to root it first and then follow this guide?

  • z


  • anmol


    HTC SENSE (3.0)


    I need help to unroot my DEVICE to original RUU. I bought this second hand device
    unlocked and rooted. Please help me selecting correct RUU. I live in INDIA and my device is T-MOBILE version.

  • Aaron

    sorry i tried doing this everything was going great but when i type in fastboot writesecure 3 it just says waiting for device what does this mean?

  • Docbean

    I tried it with the most current version in fastboot and it gave me an security failed and update fail. I have also tried an older version of the RUU for Tmobile US and it still doesn’t work. Please help!

    • Docbean

      Error 155 [UNKNOWN ERROR] it also says please use the correct ROM update utility and try again.
      The security fail and update fail is listed on the phone. When I reboot the phone it goes right back into rooted rom i installed.

      • Make sure you are using the RUU for your specific device. If it stil isn’t working, what version of Android is your device on? It might be newer than the RUU version and that’s why it won’t flash.

        • Docbean

          I used the most recent TMOUS, file and when i went to install it, it had the same build number as the as my current phone, that i unlocked using elegancia ICS _tmous. I tried different RUU, and the same error happened. Not sure if there is any other way around it.

  • ramzy

    how about the words where it says locked and when you gain s-off it writes a different word instead of locked so would this process make my device say locked and by the the way im htcdev unlocked