FORUMS

How a HTC Droid Eris Changed a Members Life

Rarely can a member say that Android development or XDA had a profound effect on … more

XDA Office Space: Frankenstein’s Perfect IM Client?

The portal’s decentralized XDA office lies in a Hangouts chatroom, where … more

Which IM Client on Android is best?

With so many different messengers to choose from, it can be tough to find the best one for you and … more

Android Factory Reset Security Flaw and More – XDA TV

Nvidia is releasing a 500Gb SHIELD TV Pro! That and much more news is … more
Post Reply Subscribe to Thread Email Thread

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

29th April 2014, 12:20 PM |#1  
EddyOS's Avatar
OP Recognized Contributor
Flag Liverpool, Merseyside
Thanks Meter: 3,665
 
More
*** 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/0B17...B3NWxoNnM/view (renamed to ruu.zip - not ruu.zip.zip!)
md5:4e03845aeab375746b4553e610047680
htc_fastboot.exe - https://drive.google.com/file/d/0B8L...dKVEdHX1U/view (can be left as it is)
md5: 7343C5BCEC64373F83D69BD074954759
TWRP - http://techerrata.com/file/twrp2/m8/...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/softwa...c-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!
Last edited by EddyOS; 29th April 2015 at 04:22 PM. Reason: Complete re-write of guide
The Following 86 Users Say Thank You to EddyOS For This Useful Post: [ View ]
 
 
29th April 2014, 12:20 PM |#2  
EddyOS's Avatar
OP Recognized Contributor
Flag Liverpool, Merseyside
Thanks Meter: 3,665
 
More
Reserved in case I need it
The Following 3 Users Say Thank You to EddyOS For This Useful Post: [ View ]
29th April 2014, 12:42 PM |#3  
exad's Avatar
Senior Member
Flag Montreal
Thanks Meter: 1,464
 
Donate to Me
More
To adapt this for every single m8 would be incredibly simple, I'm not sure why you would target such a small group? Nice guide never the less.

Also you always need to flash firmware files twice.

Sent from my HTC One_M8 using xda app-developers app
Last edited by exad; 29th April 2014 at 12:44 PM.
29th April 2014, 01:46 PM |#4  
EddyOS's Avatar
OP Recognized Contributor
Flag Liverpool, Merseyside
Thanks Meter: 3,665
 
More
Quote:
Originally Posted by exad

To adapt this for every single m8 would be incredibly simple, I'm not sure why you would target such a small group? Nice guide never the less.

Also you always need to flash firmware files twice.

Sent from my HTC One_M8 using xda app-developers app

Because there aren't any pre-packaged ZIPs for any other build - only Nandroids. Now, I'm sure someone could make a flashable ZIP out of a Nandroid but I don't have the time for that! Plus, you've then got to make sure the right FW package is available as well as the stock recovery. I also DIDN'T have to flash the FW package twice, it worked doing it once only but it does mention to do it again as a precaution

As I have an unbranded EU handset I did this guide - if anyone wants to use it as a template then please feel free to do so!
29th April 2014, 02:10 PM |#5  
EtherealRemnant's Avatar
Senior Member
Flag Denver, CO
Thanks Meter: 539
 
More
Quote:
Originally Posted by EddyOS

I also DIDN'T have to flash the FW package twice, it worked doing it once only but it does mention to do it again as a precaution

Any time hboot is flashed, you have to flash it twice for it to actually complete the full flash. There are no exceptions to the rule so if you did it once, you effectively didn't finish your firmware flash and run the risk of bricking your device instantly if you go S-ON to return it if the firmware was modified in any way over how it was stock. Please fix your guide before someone has modified their hboot to remove the red text and bricks their phone when they find the separate guide to go S-ON.
The Following User Says Thank You to EtherealRemnant For This Useful Post: [ View ]
29th April 2014, 02:23 PM |#6  
EddyOS's Avatar
OP Recognized Contributor
Flag Liverpool, Merseyside
Thanks Meter: 3,665
 
More
Quote:
Originally Posted by EtherealRemnant

Any time hboot is flashed, you have to flash it twice for it to actually complete the full flash. There are no exceptions to the rule so if you did it once, you effectively didn't finish your firmware flash and run the risk of bricking your device instantly if you go S-ON to return it if the firmware was modified in any way over how it was stock. Please fix your guide before someone has modified their hboot to remove the red text and bricks their phone when they find the separate guide to go S-ON.

It says it already!! I didn't flash it twice as I was already on the correct FW. I've made it bold so people will notice it

Quote:
Originally Posted by EddyOS

e. Type: fastboot flash zip firmware.zip and wait for process to complete. Sometimes flashing for the first time doesn't work, so flash firmware.zip again just to make sure.

Last edited by EddyOS; 29th April 2014 at 02:28 PM.
29th April 2014, 02:26 PM |#7  
EtherealRemnant's Avatar
Senior Member
Flag Denver, CO
Thanks Meter: 539
 
More
Quote:
Originally Posted by EddyOS

It says it already!! I didn't flash it twice as I was already on the correct FW

You're on the correct firmware but not everyone will be. Currently your guide sets people up for a brick should they follow it and then follow the procedure to go S-ON afterwards as many actually get rid of the red text. Its not optional to flash it twice like you make it sound, its mandatory. If you won't change the text, I'll report the thread because this will result in bricks, end of story.
29th April 2014, 02:32 PM |#8  
EddyOS's Avatar
OP Recognized Contributor
Flag Liverpool, Merseyside
Thanks Meter: 3,665
 
More
Quote:
Originally Posted by EtherealRemnant

You're on the correct firmware but not everyone will be. Currently your guide sets people up for a brick should they follow it and then follow the procedure to go S-ON afterwards as many actually get rid of the red text. Its not optional to flash it twice like you make it sound, its mandatory. If you won't change the text, I'll report the thread because this will result in bricks, end of story.

In which case blame @mike1986. as it was taken from his firmware thread. I'll 'correct' it to please you but I don't agree with it as EU users will already be on the right FW. Nowhere does this mention that you have to go back to S-ON as that's nothing to do with this guide. All this is for is going back to stock
29th April 2014, 02:34 PM |#9  
EddyOS's Avatar
OP Recognized Contributor
Flag Liverpool, Merseyside
Thanks Meter: 3,665
 
More
Text changed to make it a bit more obvious to do it twice, although this is different to flashing an RUU ZIP (where you HAVE to flash it twice as that's how the RUU ZIP works). Surely if it needed flashing twice it'd tell you to do it (as an RUU ZIP does)?
Last edited by EddyOS; 29th April 2014 at 02:40 PM.
The Following User Says Thank You to EddyOS For This Useful Post: [ View ]
29th April 2014, 02:43 PM |#10  
EtherealRemnant's Avatar
Senior Member
Flag Denver, CO
Thanks Meter: 539
 
More
Quote:
Originally Posted by EddyOS

In which case blame @mike1986. as it was taken from his firmware thread. I'll 'correct' it to please you but I don't agree with it as EU users will already be on the right FW. Nowhere does this mention that you have to go back to S-ON as that's nothing to do with this guide. All this is for is going back to stock

I can't believe mike doesn't have it right either but I checked his thread and sure enough, there it is. Hopefully he'll change it since you tagged him here.

Even if you are on EU firmware, if you modify hboot to get rid of the red text and you have an incomplete firmware flash, you will brick if you turn the secure flag back on to return the device for warranty/exchange. Most people who return to stock are doing so in order to return the device so it is just smart to assume that they may have changed their hboot at some point.

Quote:
Originally Posted by EddyOS

Text changed to make it a bit more obvious to do it twice

Thank you.

EDIT: Noticed your edit to your post. It doesn't say something like this:

FAILED (remote: 90 hboot pre-update! please flush image again immediately)

After you do the first command? I suppose its possible HTC changed it. I don't have a firmware zip for me to go back to my T-Mobile firmware or I would try it myself to see but every HTC I've ever had before, if you are flashing an image with the hboot in it you had to do it twice. I wonder if the hboot is actually removed from mike's image.
Last edited by EtherealRemnant; 29th April 2014 at 02:46 PM.
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes