Fixing some misconceptions about S-off

Indirect

Senior Member
Mar 25, 2011
2,346
2,996
0
Florida
Alright, because there is constant stupidity regarding the bootloader security state for HTC devices. I feel that I can clarify and help remove some myths and misconceptions.

Let's start with the most important one:

What is S-off?

S-off is us turning off the security flag stored in the NV RAM of our device. This allows us to flash unsigned files (zips and images) to our device. The difference is stated below of why you need a zip vs an image.

S-off is not root either. Root is just a binary stored in /system and just doesnt get removed if the device has s-off. S-off just means integrity of file system / partitions aren't checked on the device. So this means the two are exclusive of each other from a user standpoint.

HTC IS JUST GOING TO TURN S-ON AND RUIN IT FOR EVERYBODY!

No, they aren't. For a few good reasons, one of which is their own engineers have s-off to begin with.
The @secuflag (S-on/S-off) is there to verify hboots and other various image files on the device to begin with. When we have s-off on a newer device but idiot user decides to turn s-on for whatever reason and we have a modified hboot? The device will brick because you broke its chain of trust. It thought you were friends but you slept with it's girlfriend or whatever. Now if HTC were to suddenly turn s-on, this would break chains of trust for those who used something like Moonshine with a patched hboot. It was their OTA that caused it. They are then held liable for it and they have to fix it under warranty. You know how much that costs them? Imagine giving 1000's of people new phones because you singlehandedly broke them all. Good job dude.

Not only that, they cant turn S-on by just updating images on the device. It's stored in the NV-RAM. They would need an entirely different method than just flashing through recovery.

Next point is:
S-off means you can flash whatever you want using fastboot flash.

Now because s-off processes before gave us patched hboots, we didnt know any better. This is all wrong. fastboot flash barely works on newer phones unless dev unlocked. Now that not all s-off's give a patched hboot it's good to know the following. The only way to install something with a locked bootloader but s-off, is to use flash zip. This means that you dont just "fastboot flash recovery" or boot.img. You need to create a zip with android-info.txt and whatever files your flashing. With the lock placed on devices, unless you htc dev unlock or flash a modified hboot, it wont allow you to flash because the dev unlock is a different part than what flashes the zips.

More info about patched / eng hboots:
Now that we've seen what we lose without a patched hboot, what does it add exactly? Well, a patched or engineering hboot allows you to fastboot flash pretty much every partition on the device with an unsigned image directly (such as fastboot flash hboot hboot.img or fastboot flash splash1 splash1.img) without giving you a not allowed or command error. The reason these are useful is because it saves time. I really dont want to always have to build a zip so I always use patched hboots. They also give you access to more commands as well which I can't remember off the top of my head. These are all commands mainly used by HTC engineers and software testers.


Final point that I can think of (may add more):

That green progress bar needs to be full when fastboot flashing a zip. While it's a pretty green bar and looks very useful...for whatever reason, htc has decided to make it wrongly report progress when in use. This can lead to users freaking out and just leaving their phone in RUU mode for however until someone tells them they're idiots for it. this progress bar means literally nothing and my favorite quote about it is: "Progress bar is like tits on a snake. Interesting but pointless." Ignore the progress bar. If the command line says the zip finished, just fastboot reboot or reboot-bootloader. It will help you finish whatever the heck you're trying to do.
 
Last edited:

barondebxl

Senior Member
Jul 8, 2011
7,857
2,028
0
San Diego, CA
+1 on that green progress bar, when I removed the red writing on the splash screen I saw the progress bar not don't but in command prompt it said finished so I said whatever and just rebooted :D

Sent from my HTC One using Tapatalk 2
 

bnapy

Member
Jun 8, 2010
27
0
0
Question, let's say I have s-off and flash the superuser app and all the required busybox files... Can I use root required apps like titanium backup and wireless tether?

I only ask because I've been hesitatent to root. I just don't want to Dev unlock via HTC and officially void my warranty. The sealed in battery has me extremely paranoid as its generally the first thing I've had to replace with previous HTC devices.

This leads me to the following question, if the response to the first was no... Is there a way to use root apps without using the HTC Dev tool

Please note: I'm not a developer and this was not clear to me in the write up.
 

bnapy

Member
Jun 8, 2010
27
0
0
You don't need s-off to root.

You do need to root to use apps that require root access.
You've stated the obvious...but thanks for the response!

I just want to know if we can get root without going through HTC, or if it will be possible in the near future thanks to the s-off development. It's my understanding that you do not need root to get s-off.
 

budeone

Senior Member
Aug 16, 2010
3,697
2,039
0
Lombard IL
www.thewindowscenter.com

tws101

Senior Member
Nov 19, 2009
162
18
0
As described in this thread an Android-info.txt file can be used to fastboot flash update.zip where the contents of the zip are TWRP and the .txt file.

I am S-OFF Locked on 1.31 stock

I want to flash TWRP via the method described above. (Or alternatively the superuser apk)

I have a img file of TWRP.

I need an Android-info.txt file that will work. Where is an example of this file so I can attempt this? Does anyone have a link?
 
R

Rirere

Guest
That green progress bar needs to be full when fastboot flashing a zip. While it's a pretty green bar and looks very useful...for whatever reason, htc has decided to make it wrongly report progress when in use. This can lead to users freaking out and just leaving their phone in RUU mode for however until someone tells them they're idiots for it. this progress bar means literally nothing and my favorite quote about it is: "Progress bar is like tits on a snake. Interesting but pointless." Ignore the progress bar. If the command line says the zip finished, just fastboot reboot or reboot-bootloader. It will help you finish whatever the heck you're trying to do.
I don't know about "tits on a snake," but many progress bars I've seen are both uninteresting and pointless. They do generally serve their purpose of keeping impatient/inexperienced users from hammering away at things they don't understand and inadvertently breaking them.
 

PillowMetal

Senior Member
Aug 18, 2010
156
76
0
Layton, UT
swaynesworld.net
I need an Android-info.txt file that will work. Where is an example of this file so I can attempt this? Does anyone have a link?
Here is the version straight from the 1.31..651.2 OTA firmware.zip. Although you may not need the "btype" or "aareport" lines. I have flashed TWRP in the past without those lines included.
 

Attachments

regaw_leinad

Inactive Recognized Developer
Jan 30, 2010
3,667
3,784
0
Seattle, WA
www.regawmod.com
As described in this thread an Android-info.txt file can be used to fastboot flash update.zip where the contents of the zip are TWRP and the .txt file.

I am S-OFF Locked on 1.31 stock

I want to flash TWRP via the method described above. (Or alternatively the superuser apk)

I have a img file of TWRP.

I need an Android-info.txt file that will work. Where is an example of this file so I can attempt this? Does anyone have a link?
Here is the version straight from the 1.31..651.2 OTA firmware.zip. Although you may not need the "btype" or "aareport" lines. I have flashed TWRP in the past without those lines included.
Another misconception about S-OFF is that you need a "valid android-info.txt" when flashing from fastboot. When you're S-OFF, the bootloader completely disregards that file. All you need is to make a zip with whatever you want flashed, and then add any android-info.txt file in there. The default one that I include in the plugin template for my Bootloader Customizer is actually completely empty and it works fine as well. As long as there is a file (irregardless of file size) in the zip named android-info.txt, you'll be able to flash it fine, just as long as you ARE S-OFF.
 

PillowMetal

Senior Member
Aug 18, 2010
156
76
0
Layton, UT
swaynesworld.net
As long as there is a file (irregardless of file size) in the zip named android-info.txt, you'll be able to flash it fine, just as long as you ARE S-OFF.
Just to follow up, I discovered that at least with the Sprint HTC One, you need the following three lines at a minimum when flashing from rebootRUU or you will get an error stating:

FAILED (remote: 24 parsing android-info fail)

Code:
modelid: PN0720000
cidnum: SPCS_001
mainver: 1.29.651.10
So it looks like S-OFF validation of android_info.txt has stiffened up since the EVO 4G LTE days.
 

regaw_leinad

Inactive Recognized Developer
Jan 30, 2010
3,667
3,784
0
Seattle, WA
www.regawmod.com
Just to follow up, I discovered that at least with the Sprint HTC One, you need the following three lines at a minimum when flashing from rebootRUU or you will get an error stating:

FAILED (remote: 24 parsing android-info fail)

Code:
modelid: PN0720000
cidnum: SPCS_001
mainver: 1.29.651.10
So it looks like S-OFF validation of android_info.txt has stiffened up since the EVO 4G LTE days.
Ah, you don't have a bootloader that allows fastboot flashing? That must be why. If you were flashing straight from the hboot, you don't need it. Didn't realize you guys had to use RUU mode.
 

PillowMetal

Senior Member
Aug 18, 2010
156
76
0
Layton, UT
swaynesworld.net
Didn't realize you guys had to use RUU mode.
I would LOVE to be able to flash from hboot, it was so convenient and didn't require a computer. But alas, no SD Card on the Sprint variant, so no hboot flashing.

It has been said that we can use USB-OTG to perform the hboot flashing, but I have yet to get a known compatible and working USB drive to be recognized or even looked at when starting up the bootloader, although the drive works fine when rebooted to system or even recovery. It just doesn't search for external mounts like the old EVO 4G LTE hboot did on startup.

There's a thread for the small number of us who care and wan't to do this, but can't...

http://forum.xda-developers.com/showthread.php?t=2320252

And specifically, my experiences trying to get it to work.

http://forum.xda-developers.com/showpost.php?p=44444102&postcount=9
http://forum.xda-developers.com/showpost.php?p=44494480&postcount=11

Any insight or things you can share regarding this would be greatly appreciated.
 

regaw_leinad

Inactive Recognized Developer
Jan 30, 2010
3,667
3,784
0
Seattle, WA
www.regawmod.com
I would LOVE to be able to flash from hboot, it was so convenient and didn't require a computer. But alas, no SD Card on the Sprint variant, so no hboot flashing.

It has been said that we can use USB-OTG to perform the hboot flashing, but I have yet to get a known compatible and working USB drive to be recognized or even looked at when starting up the bootloader, although the drive works fine when rebooted to system or even recovery. It just doesn't search for external mounts like the old EVO 4G LTE hboot did on startup.

There's a thread for the small number of us who care and wan't to do this, but can't...

http://forum.xda-developers.com/showthread.php?t=2320252

And specifically, my experiences trying to get it to work.

http://forum.xda-developers.com/showpost.php?p=44444102&postcount=9
http://forum.xda-developers.com/showpost.php?p=44494480&postcount=11

Any insight or things you can share regarding this would be greatly appreciated.
You know, it might depend on the type of drive, and it might depend on the file system your drive is formatted to. I have 0 experience using USB-OTG, so I'm probably not the best one to ask unfortunately :( But if you do get it working, be sure to make a guide or something! Try playing around with different formatting of your drive possibly
 

PillowMetal

Senior Member
Aug 18, 2010
156
76
0
Layton, UT
swaynesworld.net
You know, it might depend on the type of drive, and it might depend on the file system your drive is formatted to. I have 0 experience using USB-OTG, so I'm probably not the best one to ask unfortunately :( But if you do get it working, be sure to make a guide or something! Try playing around with different formatting of your drive possibly
Ah, never thought of trying different formatting, there are different allocation unit sizes I could use... thanks! I will definitely make a guide if I get this resolved because it is driving me crazy, so I'm sure there are others too.