S-OFF is gone, CyanogenMod is installed -> How to S-OFF? SunShine ain't working!

BloodySword

Member
Nov 26, 2014
39
2
0
Hi there,

I need to upgrade the bootloader in order to upgrade my Cyanogenmod.
But the problem is, that I lost S-OFF, I don't know when it happened...
Sunshine doesn't, work, it requires stock ROM.
The other thing is, that I can't flash stock ROM for the same reason!

How do I fix this issue? ._.

Thank you!
 

dopy25

Senior Member
Feb 21, 2009
1,103
416
0
Fresno
Hi there,

I need to upgrade the bootloader in order to upgrade my Cyanogenmod.
But the problem is, that I lost S-OFF, I don't know when it happened...
Sunshine doesn't, work, it requires stock ROM.
The other thing is, that I can't flash stock ROM for the same reason!

How do I fix this issue? ._.

Thank you!
You don't need S-OFF to flash a stock ROM. Flash the latest FW, run the RUU. You only need to relock the BL before running the RUU. If you have used Sunshine in the past (purchased it for your device) it should recognize that and you should be able to use it again on the same device without purchasing it again.

1) LOCK BL (not s-on, just relock) Steps are in the FW thread.
2) Flash FW zip (again, steps in FW thread)
2) Run RUU (steps in the RUU thread)
3) Reboot into ROM, install Sunshine, use it.
4) install whatever you want.
 

BloodySword

Member
Nov 26, 2014
39
2
0
Thanks for trying to help me but I can't even flash the latest HTC firmware because my bootloader is too old (3.18, expected is 3.19)... :(

I didn't use SunShine back then, I used the HTC Developer Unlock...

Looks really bad for this device. It was replaced with an OPO3 anyway but I would like to give it to a poor friend for free. Without the doze bug!

Good Night from Germany :)
 

BloodySword

Member
Nov 26, 2014
39
2
0
You don't need S-OFF to flash a stock ROM. Flash the latest FW, run the RUU. You only need to relock the BL before running the RUU. If you have used Sunshine in the past (purchased it for your device) it should recognize that and you should be able to use it again on the same device without purchasing it again.

1) LOCK BL (not s-on, just relock) Steps are in the FW thread.
2) Flash FW zip (again, steps in FW thread)
2) Run RUU (steps in the RUU thread)
3) Reboot into ROM, install Sunshine, use it.
4) install whatever you want.
Wait! Does flashing the HTC firmware also flashes the bootloader?
If yes, that could be a way out of this problem!
I will try it later.
Thanks!

Edit:
NOTHING WORKS!!
I flashed SuperSU 2000 times and I get no S-OFF!
WHY?? I just want to upgrade the freaking HBOOT so that I can flash the new CWM13!!!
Why do they even require a new bootloader version. The 3.18 was fine until now. Why did they abandon it????
I am realy mad!

Edit2:
fastboot oem lock failed, too! Unknown error... So, nothing works on this device!
 
Last edited:

reckless76

New member
Aug 14, 2016
2
1
0
I was in the same boat as you, and finally managed to get the boot loader updated and CM13 installed. All while S-ON.

I can't post links yet, but look up thread ID 2701376 on XDA. It has everything you need.
You only need to get to where you can get the OTA updates. So, you'll need a nandroid, and the stock recovery. I didn't even need to re-lock the boot loader. Good luck.
 
  • Like
Reactions: BloodySword

BloodySword

Member
Nov 26, 2014
39
2
0
I was in the same boat as you, and finally managed to get the boot loader updated and CM13 installed. All while S-ON.

I can't post links yet, but look up thread ID 2701376 on XDA. It has everything you need.
You only need to get to where you can get the OTA updates. So, you'll need a nandroid, and the stock recovery. I didn't even need to re-lock the boot loader. Good luck.
Hey. Ugh, I will give it a try this weekend. Wish me luck. :D Thanks!
This device is meant as a gift to a friend who cannot afford any usable phone...
But I don't wanna give it away with the doze bug. I hope it is fixed in the latest CM13 builts.
 

redpoint73

Recognized Contributor
Oct 24, 2007
15,259
6,946
113
Thanks for trying to help me but I can't even flash the latest HTC firmware because my bootloader is too old (3.18, expected is 3.19)... :(

I didn't use SunShine back then, I used the HTC Developer Unlock...

Looks really bad for this device. It was replaced with an OPO3 anyway but I would like to give it to a poor friend for free. Without the doze bug!
There's nothing wrong with the device, its likely perfectly fine to be updated, if done properly. The main issue is pilot error; as it appears you have a poor understanding of the processes and terms.

There is no limitation that prohibits updating firmware, if your hboot is older (3.18). Its more likely you are simply trying to flash the wrong firmware (not correct CID, MID).

HTCDev.com bootloader unlock is not the same thing as s-off. If you didn't use Sunshine to s-off (or Firewater when it worked, but that was before Dec 2014), then you never had s-off. But as described, you don't need s-off to flash custom ROMs (all you need in an unlocked bootloader) and you don't need s-off to flash the proper signed firmware.

Need more info on the device to properly advise. Do fastboot getvar all, and post the results (delete IMEI and serial number before posting).

Also, what firmware are you trying to flash (exact file name)?

---------- Post added at 10:53 AM ---------- Previous post was at 10:01 AM ----------

Wait! Does flashing the HTC firmware also flashes the bootloader?
If yes, that could be a way out of this problem!
Yes, firmware contains hboot, along with a number of other partitions you need to update (since they are outdated) like radio, media, WiFi, Bluetooth etc.

That is the whole point of the suggestion of flashing the firmware.


NOTHING WORKS!!
I flashed SuperSU 2000 times and I get no S-OFF!
Not sure what you are saying here. SuperSU in itself just give you root, not s-off.

Or do you mean, that rooting the current ROM doesn't allow Sunshine to s-off the device? If so, its not what you typed, and that makes it confusing. Also, if you are still talking about CM, its already rooted, and you don't need to root it with SuperSU (and doing so often creates more problems).

Also, Sense ROMs (preferabley stock, or stockish - only certain custom ROM Sense ROMs will work) are best for Sunshine compatibility (and rooted).



WHY?? I just want to upgrade the freaking HBOOT so that I can flash the new CWM13!!!
Why do they even require a new bootloader version. The 3.18 was fine until now. Why did they abandon it????
Why? Because outdated hboots are known to cause issues on newer ROMs. In addition, older firmware (not just hboot) may cause issues on newer ROMs as well. So its highly advised to keep all firmware updated, not just hboot.
 
  • Like
Reactions: BloodySword

BloodySword

Member
Nov 26, 2014
39
2
0
There's nothing wrong with the device, its likely perfectly fine to be updated, if done properly. The main issue is pilot error; as it appears you have a poor understanding of the processes and terms.
I must admit, I thought SuperSU and root makes me able to also unlock the special areas on the eMMC like HBOOT, RADIO etc.
There is no limitation that prohibits updating firmware, if your hboot is older (3.18). Its more likely you are simply trying to flash the wrong firmware (not correct CID, MID).

HTCDev.com bootloader unlock is not the same thing as s-off.
Aha! That explains it!
If you didn't use Sunshine to s-off (or Firewater when it worked, but that was before Dec 2014), then you never had s-off. But as described, you don't need s-off to flash custom ROMs (all you need in an unlocked bootloader) and you don't need s-off to flash the proper signed firmware.
Is there a way to S-OFF it with the current state of the device? Variables further below. I would rather like to have S-OFF, so I can flash HBOOT, RADIO, etc manually anytime I need it.
Need more info on the device to properly advise. Do fastboot getvar all, and post the results (delete IMEI and serial number before posting).

Also, what firmware are you trying to flash (exact file name)?
This is what I want to flash in the end:
http://download.cyanogenmod.org/get/jenkins/174461/cm-13.0-20160815-NIGHTLY-m8.zip
The HTC firmware is deleted from my HDD.
Yes, firmware contains hboot, along with a number of other partitions you need to update (since they are outdated) like radio, media, WiFi, Bluetooth etc.

That is the whole point of the suggestion of flashing the firmware.

Not sure what you are saying here. SuperSU in itself just give you root, not s-off.

Or do you mean, that rooting the current ROM doesn't allow Sunshine to s-off the device? If so, its not what you typed, and that makes it confusing. Also, if you are still talking about CM, its already rooted, and you don't need to root it with SuperSU (and doing so often creates more problems).
Sure? CM itself in its fresh installed form was NOT rootet for me, because Xposed didn't work... It didn't even install before I rooted the ROM.
Also, Sense ROMs (preferabley stock, or stockish - only certain custom ROM Sense ROMs will work) are best for Sunshine compatibility (and rooted).

Why? Because outdated hboots are known to cause issues on newer ROMs. In addition, older firmware (not just hboot) may cause issues on newer ROMs as well. So its highly advised to keep all firmware updated, not just hboot.
Ah okay.

So here are the vars:

Code:
(bootloader) version: 0.5
(bootloader) version-bootloader: 3.18.0.0000
(bootloader) version-baseband: INVALID_VER_INFO
(bootloader) version-cpld: None
(bootloader) version-microp: None
(bootloader) version-main:
(bootloader) version-misc: PVT SHIP S-ON
(bootloader) serialno: <CENSORED>
(bootloader) imei: <CENSORED>
(bootloader) imei2: Not Support
(bootloader) meid: 00000000000000
(bootloader) product: m8_ul
(bootloader) platform: hTCBmsm8974
(bootloader) modelid: <CENSORED>
(bootloader) cidnum: HTC__102
(bootloader) battery-status: good
(bootloader) battery-voltage: 0mV
(bootloader) partition-layout: Generic
(bootloader) security: on
(bootloader) build-mode: SHIP
(bootloader) boot-mode: FASTBOOT
(bootloader) commitno-bootloader: 5e4b24e4
(bootloader) hbootpreupdate: 11
(bootloader) gencheckpt: 0
all: Done!
So, what firmware can I flash via TWRP? Or MUST it be done via adb push?
 
Last edited:

redpoint73

Recognized Contributor
Oct 24, 2007
15,259
6,946
113
Is there a way to S-OFF it with the current state of the device?
You need to be on stock ROM (or close to stock, some Sense custom ROMs work, with root, in order to use Sunshine.

Sure? CM itself in its fresh installed form was NOT rootet for me, because Xposed didn't work... It didn't even install before I rooted the ROM.
Yes, I'm absolutely sure that CM comes pre-rooted. Its a common mistake to think its not rooted, as you need to "enable" root in Settings. Do so by going into Settings>Developer's Options, and toggle root "on". If no Developer's Options in Settings, go to About>Software information, and tap Build Number 7 times, and you will see a message that "you are now a developer" (seriously, not joking, it says that!) and the Dev Options will appear in Settings.

You made some error posting getvar output (my comments in red):
(bootloader) serialno: DELETE THIS
(bootloader) modelid: <CENSORED> Don't censor this
There was no need to censor modelid (MID) as its not personal info, and thousands of phones have the same MID. Yours is probably 0P6B10000 (or it may display with one less zero, can't remember).

Serial number on the other hand, is unique to your device, and should be removed (as I previously instructed).

So, what firmware can I flash via TWRP? Or MUST it be done via adb push?
No, it can't be flashed in recovery. And not with adb push. Its flashed with fastboot.

You can flash the stock firmware (full wipe) 6.12.401.4 from here (includes instructions to flash with fastboot): http://forum.xda-developers.com/htc-one-m8/development/progress-fuu-m8-t2813792


Alternately, you may choose to RUU back to full stock (in order to run sunshine s-off). File and instructions here: http://forum.xda-developers.com/showpost.php?p=64926626&postcount=6&nocache=1&z=2525208588331338

Then unlock the bootloader again, flash TWRP 3.0.2, and flash SuperSU 2.76 to root. Then you can run sunshine app ($25 US) to s-off the device.

In either case (flash stock firmware or install RUU) backup any personal data from the phone that you want to keep. Either route will wipe your data.
 
Last edited:
  • Like
Reactions: BloodySword

BloodySword

Member
Nov 26, 2014
39
2
0
Ugh.. I ran over three times and I didn't see serialno? Give me a break. I need more sleep...
I then thought modelid is the same... :D
The MID you guessed is correct. ;)
I censored the serialno in the post above.

So Variant A is when I just want to upgrade to the latest CM, just flash the firmware with fastboot, then immediately after CM again?
Variant B would also be alright, too. The device can be wiped, I have already migrated to stock OnePlus3 with O2OS3.
 

redpoint73

Recognized Contributor
Oct 24, 2007
15,259
6,946
113
I then thought modelid is the same... :D
The MID you guessed is correct. ;)
Not as much a guess, as a result of some prior knowledge about the CIDs and MIDs (or call it detective work, if you will).

The MID identifies if its the Euro version, which in this case I can also determine from the CID.

But its good of you to confirm, as sometimes the MID can be modified by a previous owner or vendor. Or CIDs can also be the same for other versions (such as dual SIM - although in that case the product name would be different from "m8_ul" - so another clue there).

Not the same as serial number, which is unique to your individual M8.

So Variant A is when I just want to upgrade to the latest CM, just flash the firmware with fastboot, then immediately after CM again?
Variant B would also be alright, too.
Basically, yes.

Method A (relock bootloader, flash signed firmware) would be best if you want to then install CM, but stay s-on.

Method B (relock bootloader, RUU) would probably be best if you want full stock Marshmallow Sense (for instance to s-off).



I have already migrated to stock OnePlus3 with O2OS3.
How you liking that phone? I'm actually pretty curious about it as an upgrade, also.

Obviously, any current "flagship" phone is going to be a significant CPU/GPU upgrade, as well as a lot more RAM in the case of the OnePlus3. And the displays and camera modules in general have come a long way in 2 years. But how is the speaker sound quality compared to the M8? That is really my main concern with the OnePlus3, since sound is important to me. And that is one area where HTC is still striving to be provide a superior experience with the HTC 10 (although of course its much more expensive).

I know the OnePlus 3 just has a single bottom facing speaker, and its not going to match stereo front-facing Boomsound on the M8. But is the sound at least decent and passable; or a big downgrade?

I usually don't like to go off topic like this. But given the age of our beloved M8, I'd say its pretty fair game, as many of us are probably looking to upgrade soon (or have already).
 
Last edited:
  • Like
Reactions: BloodySword

BloodySword

Member
Nov 26, 2014
39
2
0
Not as much a guess, as a result of some prior knowledge about the CIDs and MIDs (or call it detective work, if you will).

The MID identifies if its the Euro version, which in this case I can also determine from the CID.

But its good of you to confirm, as sometimes the MID can be modified by a previous owner or vendor. Or CIDs can also be the same for other versions (such as dual SIM - although in that case the product name would be different from "m8_ul" - so another clue there).

Not the same as serial number, which is unique to your individual M8.
So just logic in the end. :D
Method A (relock bootloader, flash signed firmware) would be best if you want to then install CM, but stay s-on.

Method B (relock bootloader, RUU) would probably be best if you want full stock Marshmallow Sense (for instance to s-off).
Relock bootloader. I'm feeling sick... This is what also failed last time.
Code:
fastboot oem relock
threw an unknown error or file missing. :crying:
Then the device was basically bricked, it only booted into fastboot with a security warning. If it occurs again, I will post a log. Will happen Saturday or Sunday as I am back to work after hospital amusement... Not related to this phone. ;)

Offtopic

>> One Plus 3
How you liking that phone? I'm actually pretty curious about it as an upgrade, also.
Obviously, any current "flagship" phone is going to be a significant CPU/GPU upgrade, as well as a lot more RAM in the case of the OnePlus3. And the displays and camera modules in general have come a long way in 2 years. But how is the speaker sound quality compared to the M8? That is really my main concern with the OnePlus3, since sound is important to me. And that is one area where HTC is still striving to be provide a superior experience with the HTC 10 (although of course its much more expensive).
I know the OnePlus 3 just has a single bottom facing speaker, and its not going to match stereo front-facing Boomsound on the M8. But is the sound at least decent and passable; or a big downgrade?
I usually don't like to go off topic like this. But given the age of our beloved M8, I'd say its pretty fair game, as many of us are probably looking to upgrade soon (or have already).
The speaker itself is very loud and can deliver loud sound without distortion, but little at full volume. Much better as the ones in m8. However, the low frequencies are not as defined as with HTC's BoomSound(TM) technology.

In fact, the speaker is so loud and efficient at the mid-range and highs, that notification and ringtone volume level 1 is too loud for work. The only workarounds are low volume sound files for notification or vibration-only mode, which is bit annoying.

Besides that, the display is very bright and very readable in the sun. However, it also suffers from pen-tile fly screen issues. In everyday life it is no big deal but it's noticable. For VR applications I imagine this is very bad. :( I hope they go for S-IPS and 100% AdobeRGB in the OnePlus 4 next time... Not a fan of Scamscum Displays.

I first had the dark grey one, but it has dust between the glass and the AMOLED!! I then ordered the new available soft gold version and did a return RMA. I am currently waiting for the results and refund.

The processor is very fast and the 6GB ram are really a step forward.

However, Oxygen OS still suffers from the "doze" bug, some push notifications are postponed or only fetched when waking the device up. The last update should fix it, but it just got better instead of fully resolved... I hope they will fix this soon.

Oxygen OS doesn't have many ringtones built-in, I miss the Google stock ones. But I grabbed them from CyanogenMod out of my m8 and put them on the internal UFS. :D :victory:

OTA updates are fast and reliable, too.
/Offtopic
 
Last edited:
  • Like
Reactions: redpoint73

BloodySword

Member
Nov 26, 2014
39
2
0
Code:
C:\adb>fastboot oem lock
...
(bootloader) [PGFS] partition_update_pgfs: pg1fs_security
(bootloader) Lock successfully...
(bootloader) deinit_lcd
(bootloader) mipi display off
(bootloader) mdp_clock_off
(bootloader) turn off fd8c2308 failed 1 times. Try again...
(bootloader) disable_mmss_clk done
(bootloader) pll1_disable done
(bootloader) TZ_HTC_SVC_DISABLE ret = -1610744452 (0x9FFDFD7C)
(bootloader) [CRITICAL] SPMI write command failure:                     cmd_id = 0, error
(bootloader) = 4
(bootloader) [CRITICAL] SPMI write command failure:                     cmd_id = 0, error
(bootloader) = 4
(bootloader) [INFO] Rebooting device
FAILED (status read failed (Invalid argument))
finished. total time: 1.178s
Failed. Sticks in fastboot until I unlock again using HTC-DEV. :crying:
 

redpoint73

Recognized Contributor
Oct 24, 2007
15,259
6,946
113
That is exactly what is supposed to happen. The phone won't boot after being relocked, that is normal and intended.

Flash the RUU, or the firmware I linked previously, using fastboot (whichever method you prefer).

After RUU or firmware, you should see the OS number changed to 6.12.401.4, and hboot should be 3.19.
 
Last edited:
  • Like
Reactions: BloodySword

BloodySword

Member
Nov 26, 2014
39
2
0
Failed.
MD5 sum was correct after download.

Code:
C:\adb>fastboot flash zip fw.zip
target reported max download size of 1830477824 bytes
sending 'zip' (82794 KB)...
OKAY [  3.470s]
writing 'zip'...
(bootloader) signature checking...
FAILED (remote: signature verify fail)
finished. total time: 7.643s
Edit:
Tried:
stock 6.12.401.4 International

Also tried:
M8_6.12.1540.4_DevEd_FullStock
 
Last edited:

ckpv5

Recognized Contributor
Feb 11, 2008
14,359
18,290
0
Kuala Lumpur
Failed.
MD5 sum was correct after download.

Code:
C:\adb>fastboot flash zip fw.zip
target reported max download size of 1830477824 bytes
sending 'zip' (82794 KB)...
OKAY [  3.470s]
writing 'zip'...
(bootloader) signature checking...
FAILED (remote: signature verify fail)
finished. total time: 7.643s
Edit:
Tried:
stock 6.12.401.4 International

Also tried:
M8_6.12.1540.4_DevEd_FullStock
That's a big size firmware .... you can't flash unsigned firmware on S-On device.

Get the htc signed 6.12.401.4 firmware in post #5 on my backup thread linked in my signature.
 
  • Like
Reactions: redpoint73
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone