[GUIDE] Return your European M8 to 100% Stock - S-OFF REQUIRED

Search This thread

BerndM14

Senior Member
Apr 8, 2014
1,454
543
Ok. So stock recovery is required for OTA as well?

As I understand it yes, perhaps @EddyOS could help more on that or correct me if I'm wrong on it. Though that's how I understand it

Then perform a nandroid backup, this will backup also the stock HTC recovery that is needed in combination with the stock nandroid backup to be able to recieve official HTC OTA's

http://xdaforums.com/showthread.php?t=2701376

Mr Hofs Collection of stock backups etc It's stated as above in the first post.
 
  • Like
Reactions: The1nonly1

b0gd4n

Senior Member
Jul 6, 2009
777
78
London
I thought I'd write this guide after doing it myself and with the lack of RUUs it may be of use to others...

This covers returning an unbranded, European One M8_UL to stock, running 1.54.401.5. It does NOT cover returning carrier-branded handsets back to stock, nor other country unbranded variants - only the EU model. It also doesn't cover adb/fastboot as you should really already know what you're doing with that if you're running a custom ROM.

Although I run 100% stock these days I wanted to be S-OFF so had to use the following to get back to 100% stock but keep S-OFF for future freedom

This guide will assume that you're using CID HTC__001 (which is my CID) because you need to reflash the FW but if you were already running on 1.54.401.5 BEFORE flashing a new ROM then it can be skipped so if you're S-ON you can still use this guide - just not the parts about resetting the unlocked/tamper flags. It also assumes you already have the latest TWRP recovery on your phone. I did this using 2.7.0.2 available here.

Other CIDs that will work are:

HTC__102
HTC__203
HTC__E11
HTC__405
HTC__Y13
HTC__304
HTC__A07
HTC__032
HTC__J15
HTC__016
HTC__M27
HTC__K18
HTC__A48
HTC__002

So lets begin...

1. Restore the phone back to stock

I used the odexed package provided by @mike1986., which is available to download here

Once downloaded, copy the file to your phone and flash as you would any other custom ROM in TWRP. Once complete, reboot the phone but when TWRP asks if you want to root it, select 'No'

2. Install SuperSU

To reset the 'unlocked' and 'tamper' flags, you need SU permissions so using the SuperSU package is ideal for this. Download it from here and flash it via recovery. Once installed, reboot the phone

3. Reset the 'tamper' flag (REQUIRES S-OFF)

To reset the tamper flag, follow this guide (thanks to @scotty1223)

4. Reset the 'unlocked' flag (REQUIRES S-OFF)

To reset the unlocked flag, follow this guide (again, thanks to @scotty1223)

5. Flash stock FW package

Now your phone is back to 100% stock, we need to get the stock recovery back on the phone. To do this, you have to flash the 1.54.401.5 FW package from here (again, thanks to @mike1986.). To flash this file, do the following:

a. Reboot phone into fastboot
b. Copy the FW file to your fastboot folder on your PC (if you don't have fastboot in your system path)
c. Rename the FW file firmware.zip (NOT firmware.zip.zip)
d. Type: fastboot oem rebootRUU and wait for device to reboot
e. Type: fastboot flash zip firmware.zip and wait for process to complete. Although you don't have to do this twice as you used to do with RUU ZIPs, it's STRONGLY recommended that you run this command a second time after the first has finished to make sure it 'takes' properly
f. Type: fastboot reboot

The phone will now reboot

6. Remove SuperSU

So, your phone should now be back to 100%, locked and have the stock recovery but you still have the SuperSU app in the app drawer. To remove this, open the app and go into the app settings and uninstall it. Once it's removed, reboot the phone to complete the process

7. All done!

Voila, you are now back to 100% stock but still S-OFF so you have the option in future to do anything you want!

Hey there.

I want to return my M8 to warranty repairs and therefore have to return to stock.

I have CID H3G_001, root, unlocked, and S-OFF.

I have found the stock H3G__001 nandroid backup and I understand that I have to flash that and so on.

What I do not understand is related to the S-OFF flag. Do I HAVE to make the phone S_ON to get warranty repair?
What happens if I make the phone S-ON? Am I not able to make it S-OFF again?

Thanks!
 

EddyOS

Senior Member
Jan 2, 2010
15,279
4,035
London
Hey there.

I want to return my M8 to warranty repairs and therefore have to return to stock.

I have CID H3G_001, root, unlocked, and S-OFF.

I have found the stock H3G__001 nandroid backup and I understand that I have to flash that and so on.

What I do not understand is related to the S-OFF flag. Do I HAVE to make the phone S_ON to get warranty repair?
What happens if I make the phone S-ON? Am I not able to make it S-OFF again?

Thanks!

You can leave it S-OFF, they don't seem to care/check it anyway!
 

EddyOS

Senior Member
Jan 2, 2010
15,279
4,035
London
ok, but if they were to check and it would be S-OFF, would it mean that the warranty would be void?

Also, what happens if I S-ON before sending? Does it mean that I cannot S-OFF again?

1. Some phones go out S-OFF so they shouldn't care
2. If you got S-OFF once you should be able to get it again. As you don't have an unbranded phone this guide doesn't fully apply as the firmware isn't for your device. I'd use the backup available and then flash the stock recovery, lock the bootloader and remove tampered if you need to but otherwise leave it S-OFF
 
  • Like
Reactions: b0gd4n

housry23

Senior Member
Sep 23, 2009
2,939
746
Springfield, OH
Hey there.

I want to return my M8 to warranty repairs and therefore have to return to stock.

I have CID H3G_001, root, unlocked, and S-OFF.

I have found the stock H3G__001 nandroid backup and I understand that I have to flash that and so on.

What I do not understand is related to the S-OFF flag. Do I HAVE to make the phone S_ON to get warranty repair?
What happens if I make the phone S-ON? Am I not able to make it S-OFF again?

Thanks!







You can leave it S-OFF, they don't seem to care/check it anyway!







ok, but if they were to check and it would be S-OFF, would it mean that the warranty would be void?

Also, what happens if I S-ON before sending? Does it mean that I cannot S-OFF again?







1. Some phones go out S-OFF so they shouldn't care
2. If you got S-OFF once you should be able to get it again. As you don't have an unbranded phone this guide doesn't fully apply as the firmware isn't for your device. I'd use the backup available and then flash the stock recovery, lock the bootloader and remove tampered if you need to but otherwise leave it S-OFF

I have some first hand knowledge on this. You should most certainly go back to s-on. I had some dead pixels and called HTC. They offered to replace my phone. I had to pay $19 for shipping both ways through HTC. I had to send my phone to them, then they would inspect it and send me a new phone. I returned to stock except I left it s-off. Well.... After they received my phone, I got an email saying in order for them to go on I would have to pay $140. To make a long story short, it was because of s-off. I did get them to replace it for free, but it took much lying and arguing.

Now... The problem is, getting s-on is not the easy. Well, it's easy to do... But it doesn't work every time from what I'm getting. So, try to go back to s-on if you can.

Sent from my One using Tapatalk
 
  • Like
Reactions: b0gd4n

housry23

Senior Member
Sep 23, 2009
2,939
746
Springfield, OH
Can you please elaborate (or link some topics) why it doesn't always work? This is the first time I hear this.

Thanks. :good:

Well I read it somewhere that the fastboot oem writesecureflag 3 is hit or miss. It may or may not work. I haven't tried and I haven't gotten my m8 back yet to test it. It's just not guaranteed to work. That's all I know. I don't remember where I read it. Might have been m7 forums.

Sent from my One using Tapatalk
 
  • Like
Reactions: Black Antitoon

EddyOS

Senior Member
Jan 2, 2010
15,279
4,035
London
Well I read it somewhere that the fastboot oem writesecureflag 3 is hit or miss. It may or may not work. I haven't tried and I haven't gotten my m8 back yet to test it. It's just not guaranteed to work. That's all I know. I don't remember where I read it. Might have been m7 forums.

Sent from my One using Tapatalk

It's not that it's hit and miss, it's that if you're not 100% stock it can brick the phone. As for going back to S-ON, I didn't when I sent my Sensation and Desire to HTC for repair, both were fixed and sent back FOC under the warranty. Might be different elsewhere but a hardware fault isn't caused by S-OFF
 
  • Like
Reactions: Black Antitoon

housry23

Senior Member
Sep 23, 2009
2,939
746
Springfield, OH
It's not that it's hit and miss, it's that if you're not 100% stock it can brick the phone. As for going back to S-ON, I didn't when I sent my Sensation and Desire to HTC for repair, both were fixed and sent back FOC under the warranty. Might be different elsewhere but a hardware fault isn't caused by S-OFF

No a hardware fault is not caused by s-off but it does void the warranty. I had to plead and beg them to replace my phone without charging me. S-off cannot cause dead pixels, but they didn't care. The person that inspected my phone took pictures of the bootloader with s-off. I think it depends on who inspects the phone. This happened just this week.

Sent from my OnePlus 7a
 

EddyOS

Senior Member
Jan 2, 2010
15,279
4,035
London
No a hardware fault is not caused by s-off but it does void the warranty. I had to plead and beg them to replace my phone without charging me. S-off cannot cause dead pixels, but they didn't care. The person that inspected my phone took pictures of the bootloader with s-off. I think it depends on who inspects the phone. This happened just this week.

Sent from my OnePlus 7a

Must be different in the US to the UK, our Laws protect the buyer and a software change that cannot cause a hardware fault cannot be used to void warranty. HTC have never had an issue with repairing my past phones and even if they did, the retailer has a duty to replace a device not working correctly. If you can set back to S-ON confidently then by all means do so, but you then take the risk of bricking the phone (and HTC would then probably replace it as it no longer turns on!)
 

housry23

Senior Member
Sep 23, 2009
2,939
746
Springfield, OH
Must be different in the US to the UK, our Laws protect the buyer and a software change that cannot cause a hardware fault cannot be used to void warranty. HTC have never had an issue with repairing my past phones and even if they did, the retailer has a duty to replace a device not working correctly. If you can set back to S-ON confidently then by all means do so, but you then take the risk of bricking the phone (and HTC would then probably replace it as it no longer turns on!)

Yes I've read that before. Must be nice! Your government cares about you more than ours for sure!
 

deeznuts

Senior Member
Sep 19, 2007
3,539
246
If your sending for repkaxment through a carrier no issues. I've sent phones back to AT&T with custom Rom still on and custom recovery and no issues. Now if ur sending back to HTC themselves, well that could be different as some users have pointed out. Luck of the draw I guess with HTC. With phone carriers though or third party warranty companies, I think they hardly check that stuff or care. Then again this was about 2 years ago, don't know if things have changed since?

If carrier then I'd try to at least have stock Rom and no root and stock recovery before sending.

Worst comes to worst throw phone in microwave for 30sec and its literally dead. Dead phones tell no tales ;)!
 

jureca

Senior Member
Feb 18, 2011
1,277
251
Murcia
Me too I tried it, I give SuperSU desistalar and reboot back out, I think there's only one way to remove SuperSU and have a RUU, but not removed.
 

EddyOS

Senior Member
Jan 2, 2010
15,279
4,035
London

Top Liked Posts

  • There are no posts matching your filters.
  • 108
    *** I HAVE SOLD MY M8 BUT I WILL TRY AND KEEP THIS UP-TO-DATE WHEN NEW RUUs COME OUT ***

    *** NEW GUIDE AS WE NOW HAVE AN RUU!!! ***

    This guide is for Windows-only. The reason for this is because the htc_fastboot file used is a Windows binary and there doesn't appear to be a version for Mac/Linux

    This guide will allow you to return your EU, unbranded M8_UL device to 100% stock (inc. locking the bootloader and removing the tampered flag) for resale purposes or to return to HTC. It does not cover carrier-branded handsets and does require you to be S-OFF but Step 3 can be done on an S-ON EU M8 so long as your bootloader is relocked and you match one of the CIDs listed below. A lot of this can be used to restore a US carrier M8 as the RUUs are available, though, but you'd have to get the relevant RUU.zip from the EXE (which is very easy)

    This process applies to the following CIDs:

    HTC__001
    HTC__102
    HTC__203
    HTC__E11
    HTC__405
    HTC__Y13
    HTC__304
    HTC__A07
    HTC__032
    HTC__J15
    HTC__016
    HTC__M27
    HTC__K18
    HTC__A48
    HTC__002

    You need the following files stored in your fastboot folder:

    4.16.401.10 RUU ZIP - https://drive.google.com/file/d/0B17smFr95pleU2NqcVB3NWxoNnM/view (renamed to ruu.zip - not ruu.zip.zip!)
    md5:4e03845aeab375746b4553e610047680
    htc_fastboot.exe - *** REMOVED DUE TO HUGE AMMOUNTS OF SPAM REQUESTS ***
    md5: 7343C5BCEC64373F83D69BD074954759
    TWRP - http://techerrata.com/file/twrp2/m8/openrecovery-twrp-2.8.4.0-m8.img (renamed to recovery.img) md5:
    e51c6ce8db0b7318ef31e1e7bd03c96e

    And you'll also need HTC Sync Manager - http://www.htc.com/uk/support/software/htc-sync-manager.aspx (install it for the drivers and then uninstall it but leave the drivers on your PC)

    All commands in bold are to be done in a command prompt window in your fastboot folder

    1. 'Lock' the bootloader and reset the tamper flag

    We know we can relock the bootloader by using the command 'fastboot oem lock', but it will show 'RELOCKED' on the bootloader and still show the phone has been unlocked in the past. With S-OFF we can set it back to 'LOCKED' ;). To do this, we need to use TWRP and adb shell

    Flash TWRP in the usual manner by connecting the phone to the PC whilst in the bootloader and flash by using the command fastboot flash recovery recovery.img. Once flashed, boot the phone into TWRP and connect to your PC and make sure the drivers are successfully installed. To confirm it's working type adb devices and it should be listed with your devices serial number. Assuming you can see the device, we can now use adb shell to change the flag from 'UNLOCKED' to 'LOCKED' by using the following commands:

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


    Once the command has finished, we can continue using adb shell to reset the tamper flag by using the following command:

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

    Once this has finished, we can exit out of adb shell by simply typing exit. Then reboot the phone into the bootloader through the menu in TWRP so we can confirm the flags are set back to stock.

    2. Change the CID (if required)

    Now we're in the bootloader and are 'LOCKED' and not listed as modified (but still S-OFF) it's best we reset the CID so moving forward things are easy. To do this, you just need to use fastboot oem writecid HTC__001, or whichever CID your device originally came with from the list at the beginning of this guide. Once you've reset the CID, reboot the bootloader to confirm the changes using fastboot reboot-bootloader

    3. Flash the RUU


    We are now at the point where we can flash the RUU and restore the phone to 100% stock. To do this, we first need to boot the phone into RUU mode using the command fastboot oem rebootRUU. Once in RUU mode, you'll see a silver HTC logo on the phone and that's it. At this point, we now use the HTC fastboot package to flash their RUU.zip file using the command htc_fastboot flash zip ruu.zip. This process will take a few minutes, and the phone will reboot a few times but once done it'll say complete. At this point, reboot the phone back to the bootloader using fastboot reboot-bootloader

    4. Factory reset the device
    *** OPTIONAL ***

    Having flashed the RUU, I always prefer to do a factory reset to make sure everything is in order. To do this, boot into the stock recovery and once at the black screen hold volume up and press power to get into the menu and then select 'wipe data/factory reset' using the volume buttons and use power to select the option.

    5. Reboot the phone

    Pretty obvious this - just select 'reboot system now' and you should be good to go!
    3
    Reserved in case I need it :)
    3
    flashed stock backup file 1.54.1540.9 / changed my cid to BS_US001/ flashed firmware 1.54.1540.9 / flashed stock recovery 1.54.1540.9 and if i go into recovery it shows me phone logo with red triangle is that fine ? and I'm still S-OFF and Unlocked will i receive OTA ?

    That's the stock recovery, press vol up and power to get into the menu ;)

    And yes, you'll get the OTA
    3
    You will need to have the stock recovery for OTA updates, but flashing the FW package restores the stock recovery so you're good to go

    Sent from my HTC One_M8 using XDA Premium 4 mobile app