yashsingh1/xdaforums huggingface dataset:
[One (M8) General] theycallmerayj:
Any way to do this through terminal emulator? I have issues with my m8 and usb doesn't work so can't adb commands
[One (M8) General] E_n_T:
So if i use this i will still be able to flash stuff since im s-off right?

Skickat från min HTC One_M8 via Tapatalk
[One (M8) General] scotty1223:
I would recommend using a pc,but you can use terminal emulator.

Enter su then paste the same command

.

Not all adb projects will work on te,so it would be worth your effort to get your adb/pc issues resolved.

Yes( but to use fstboot flash you have to be unlocked)
[One (M8) General] E_n_T:
I see. No biggie tho then. If i need to return phone for some reason repair or so i just relock bootloader and act dumb. :)

Skickat från min HTC One_M8 via Tapatalk
[One (M8) General] renn9420:
Just performed on my M8 and got the Google Drive promo. Thanks to all that put their time in this. Greatly appreciated.
[One (M8) General] Behold_this:
You can go back to s-on via a fastboot command ( though as others have mentioned it there really is no reason to ) and you can get rid of the red warning when booting the phone by flashing a secure boot.img eg stock boot.img.
[One (M8) General] EddyOS:
Here's a fun one. How can we remove SuperSU once we have 'locked' the bootloader? I'm back to 100% stock but still have SuperSU in the app drawer...
[One (M8) General] Captain_Throwback:
There's a setting in the app to do that.
[One (M8) General] EddyOS:
So there is, good job that man!

---------- Post added at 06:59 PM ---------- Previous post was at 06:31 PM ----------

Is it meant to remove the su binary as well? Trying to run an app that usually works and it's saying I'm rooted when I'm not...
[One (M8) General] Captain_Throwback:
It is. Which option did you use? And have you rebooted?
[One (M8) General] EddyOS:
Reboot fixed it, thanks again
[One (M8) General] treIII:
where is the thread to remove the s off so I can return my device tomorrow? sorry I cant find it. ive been doing a lot to get my phone back to stock. thanks
[One (M8) General] otariq:
Okay I've been going back through the pages to see if I could find the answer and just wanna make sure I have everything straight. I honestly see no need to have a rooted phone anymore and just want to go back to stock. If I restore the stock ROM in twrp recovery, would that remove the red text on hboot? Someone said all you need is the stock secure boot img for the red text to go away. Or do I also need to restore the stock recovery and lock boot loader? I'm s-off so unlocking boot loader shouldn't be an issue in the future.

Edit: ignore the above. I restored the stock tmovile Rom and the red text went away. Still have custom recovery and unlocked boot loader. I'll leave the above as is for anyone else looking for the same info.

Never mind, I had to go back to stock recovery because after a reboot into recovery the red text came back. Now there's no red text whether I boot into Android or recovery via fastboot
[One (M8) General] dimiboy:
I'm sorry but,

I don't get it!!

in order to go S-OFF you need to open your bootloader.

and if you want to open it you need to do it with HTCdev or this manual here but it requires to be already S-OFF.

So what's the point here??
[One (M8) General] scotty1223:
If you don't get it and/or don't feel like searching, then don't use it.
[One (M8) General] dimiboy:
Let me explain myself, i have a non Verizon version (temp root doesn't work) and i'm searching for a way to unlock my bootloader without HTCdev (for Warranty reasons)

The thread says you can unlock without HTCdev but you need to be S-OFF.

So how can anyone be S-OFF if his bootloader was never unlocked? (unless it's a verizon)

Did i misunderstand something?
[One (M8) General] otariq:
From what I've read so far, this is the only way to go back to locked instead of relocked. So it's useful for warranty purposes and you can quickly unlock it again without the token. Yes, if you don't have Verizon m8 you'll need to go through htcdev the first time. There's no way around that.
[One (M8) General] dimiboy:
Bot won't going through HTCdev void my warranty?

Will there be any way to do it in the future without it? (taking M7 as an example?)
[One (M8) General] otariq:
Yeah in theory it will. But I think HTC would be understanding if things like the volume rocker or power button breaks. That has nothing to do with rooting the phone. Also, just because you got the token it doesn't mean you used it. You can return the phone back to stock without any traces of rooting if you have s-off. If warranty is a big deal to you don't root it yet. I rooted mine and I'm back to stock because I didn't see such a big advantage of custom rom with this phone. Stock has everything I need
[One (M8) General] StuMcBill:
Can these commands be run on a Terminal Emulator on my device? And can they be saved as a script so they can easily be run so I can lock and unlock my bootloader on the fly?

If I relock, can I still flash ROMS if I still have my custom recovery?
[One (M8) General] MICH_**:
Is it still possible to flash rom, recovery, firmware etc. with a "locked" bootloader? Can i get back to s-on with a locked bootloader?
[One (M8) General] PillowMetal:
Yes as long as you are S-OFF. That is actually the way I prefer so I don't have to deal with locking and unlocking my bootloader for OTA updates. Also don't ever have to deal with htcdev.

The catch is you can't do these things through the regular fastboot commands, you have to use rebootRUU, USB-OTG, or flashing from hboot. Which again I prefer because I can do this straight from the phone without a computer.

You in fact HAVE to be locked to go back S-ON. But don't do it! If you must, make sure you are stock kernel, recovery, and hboot. This is best accomplished by running an RUU right before you execute the command to go back S-ON. But again, don't do it; one thing wrong and you have a brick.
[One (M8) General] Nicraz:
Ok. Here's a stupid question. I'm currently running stock, bootloader unlocked, rooted. I want to lock the bootloader so that I can install the latest update. If I'm already running stock, do I have to flash anything after locking the bootloader? Again sorry if this is stupid.

Sent from my HTC One_M8
[One (M8) General] scotty1223:
You don't need to lock the bootloader to receive an ota. You do need to be running stock recovery,system,kernel and matching firmware.
[One (M8) General] Nicraz:
Ahh. I see, I did flash TWRP after unlocking the bootloader, so that's why I haven't been able to install the update. Thanks for the tip.
[One (M8) General] mewikime:
Thank you! I've had my M8 for two days, coming from a Galaxy S4, and in that time I've unlocked bootloader, flashed recovery, S-Off'ed, unrooted, restored stock everything, and thanks to this post, relocked bootloader with no problems. Instructions were clear and concise, and idiot proof!

Thanks again :)
[One (M8) General] nickrule1896:
Is it correct to say that I can only unlock my m8 through HTCDev, but lock and unlock it again without using HTCDev anymore? Mine is an International version if i am correct.
[One (M8) General] otariq:
Yes as long as you have achieved s-off. Since you have the international version, I don't think you should have any issues with that.
[One (M8) General] nickrule1896:
Wait, so if i have never unlocked my m8 before, i need to go through HTCDev for my first unlock instead of going through this guide, no matter what?
[One (M8) General] Onem8:
Yes, because this lock/unlock if you already are s-off.
[One (M8) General] darko454:
Trying to go back to stock

HEY guys i am trying to go back to stock

can i flash stock recovery and bring back to locked then factory reset?

please help! thanks guys
[One (M8) General] scotty1223:
correct process for back to stock:

- lock bootloader

- remove tampered banner (not needed if you have a signed ruu to run)

- change cid/mid back to stock if needed

- run RUU
[One (M8) General] darko454:
Where do I find the ruu files?
[One (M8) General] darko454:
How do I change the cid back to stock? please help
[One (M8) General] murf43143:
Can you please help me with this?

I am S-OFF but my bootloader is locked and I lost all root access by uninstalling the SuperSU. Problem now is I am sending back for warranty and notice on my bootloader the OS is not listed and just says "OS-" even though I was %99.99 sure I was back to stock, apparently I missed something.

Now I can't unlock the bootloader using SU and fastboot because of the lack of root access.
[One (M8) General] PillowMetal:
I don't have my M8 yet, but the principles I was talking about still apply.

Not sure what the "OS-" line is in the bootloader, because my M7 doesn't have that. But since you are S-OFF and are trying to get back to stock for warranty, the BEST way to accomplish that and be sure you are completely stock (kernel, hboot, rom, recovery, etc.) is to run an RUU for your device.

Being S-OFF and running an RUU doesn't require your phone to be in any particular state (except perhaps being locked which you already are - but I'm not sure if that is even true because I have never been unlocked to find out)

As for your other point of not being able to unlock the bootloader with SU because of lack of root... you don't need to if you read above. Additionally, there is never a need to unlock if you are already S-OFF, period. However, if you really want to unlock for some reason and not use htcdev, all you have to do is flash a custom recovery for your device from hboot (the file name would be on your SD card with a specific filename for your device - for example the Spring M7 is PN07IMG.zip), then flash SuperSU from recovery. Then you can use the method of this thread to unlock again.

The contents of your custom recovery zip file would be the custom recovery image named "recovery.img", and an empty text file named "android.txt" (it can be empty because you are flashing from hboot not rebootRUU)
[One (M8) General] 412070391:
thank you very much
[One (M8) General] Doc Ames:
VZW M8

Has this been confirmed to work with the Verizon variant of the M8? EDIT: Nevermind about VZW M8, I see Scotty answered that. Are there any advantages to having an unlocked bootloader with s-off vs. a locked bootloader with s-off?
[One (M8) General] zat0x:
Doesnt work for me. Bootloader stays unlocked. I did manage to remove the tampered flag before this.

Im on hboot 3.16.0.0000
[One (M8) General] scotty1223:
no reason it would not work. you have made an error along the way. a paste of your entire cmd window start to finish may help us figure it out.

you need to be s off,rooted,and in a root shell.
[One (M8) General] zat0x:
This is what i did ;
[One (M8) General] scotty1223:
You don't appear to be in a root shell. You need a # prompt,not a $.

You are s off?
[One (M8) General] zat0x:
Yes im s-off.

Also followed the guide for removing the tampered flag, that worked great.

Edit:

Nevermind. SuperSU was blocking it (can only be done with pro version).
[One (M8) General] Onem8:
worked for me without the pro version

Verstuurd vanaf mijn HTC One_M8 met Tapatalk
[One (M8) General] skulldreamz:
Has nothing to do with a pro version. Su is a binary and you either have it or don't.
[One (M8) General] RegnierD:
Are there any differences in the commands to unlock/lock the bootloader on the GPE variant?
[One (M8) General] scotty1223:
No. The flag is in the same location
[One (M8) General] backb0ne5p1d0r:
This is weird , But I applied the UNLOCK bootloader using ADB while the device is in recovery mode. (TWRP )

So instead of getting an ***UNLOCKED*** Flag I got ***HTC One M8*** flag 0.0

But while it showed ***HTC One M8*** it was unlocked cause I could flash a kernel using fastboot.

But I locked it after the phone booted up :P and now its showing ***LOCKED***

I almost got a heart attack when I saw the ***HTC One M8*** flag :p
[One (M8) General] scotty1223:
sounds like you are running a patched hboot that has the unlocked banner edited
[One (M8) General] backb0ne5p1d0r:
Ohhhh right! I almost forgot!

I used a modded one to get rid of the red text.
[One (M8) General] boe323:
Can this be done with terminal in the phone ? I was planning on saving both lines for fast lock/unlock when needed.
[One (M8) General] Tak23:
Newbie?

so I just bought the htc one m8 I know it says it must be s off in order to use the unlockbootloader method I know its a newbie question bare with me so what do I need to do in order to do that I got warranty and I really just want to avoid htc dev so if anyone willing to let me know or post up a video link it will be much appreciated?
[One (M8) General] PillowMetal:
Sunshine can now S-OFF without unlocking first.
[One (M8) General] kakyyabata:
working with M8_Dugl thanks man
[One (M8) General] skeletiko:
Super user for bootloader lock

Hello Scotty1223,

I've already unlocked by bootloader using your tutorial (needed to flash recovery.img file, while I was trying to get back to stock rom), however, now I that I'm trying to lock bootloader (for if I, eventually, need to take the phone to warranty in the future), I cannot install super user (receive message that wasn't possible to install the binary)..

Do you know how can I solve this matter?

Thank you in advance.

Best regards,

SkElEtIkO
[One (M8) General] djlukas1983:
Do we need to be S-OFF to do that?

But in S-OFF tread I've read that to make an S-OFF I have to have unlocked bootloader so it seems a little dumb for me.
[One (M8) General] boe323:
How about making a simple .apk with a lock bootloader, unlock bootloader option for s-off users?. Ive just made 2 simple scripts with the lines in and they work, only snag I have is the scripts don't finish because I don't know a lot about scripting, but all I do is cancel after, works fine.
[One (M8) General] skeletiko:
Can you help me scotty?

Thank you in advance.

Best regards
[One (M8) General] miggsr:
What are you trying to do exactly...? I may be able to assist you. Send me a pm.
[One (M8) General] skeletiko:
Hello miggsr, I've unlocked bootloader following this thread..after that I've flashed stock firmware.

Now, I just want to lock my bootloader (for warranty purposes), but for that I need Super user (disappeared after flash stock firmware), but I cannot install it (got it from Play and when I run it returns the error "There's no SU binary installed (..)").

So what I need to know now is how can I can I get Supersu to work, so I can lock bootloader and leave no traces that smartphone had already been rooted before. :cool:

Thank you in advance for your help.

Best regards,

SkElEtIkO
[One (M8) General] scotty1223:
Install recovery

Flash superuser

Lock boot loader

Install stock recovery/remove superuser if desired
[One (M8) General] boe323:
Or you can run fastboot boot recovery, replacing recovery witht the actual recovery name, your stock recovery wont get touched,there seems to be an issue with twrp on the 2.22 software though, philz works.
[One (M8) General] skeletiko:
Hello Scotty,

There's something that I'm not understanding in your advice..after I lock "boot loader", I believe I won't be able to install stock recovery (it won't allow me)..my final objective is to have booloader locked & stock firmware & stock recovery.

Thank you in advance
[One (M8) General] skulldreamz:
The directions are 2 posts up. A bootloader lock does lock down a couple partitions. If you are s-off then you have a full unlock and you can flash a stock recovery after you have relocked your bootloader and removed root.
[One (M8) General] skeletiko:
lock bootloader & remain stock

Hello Skulldreamz,

Are you sure that's possible to flash stock recovery with bootloader locked? I'm asking you that because I had problems with that when I was recovering my HTC to stock (please take a look to my post @ here) and @ that time I was only able to Flash stock recovery after unlocked boot loader (well that was exactly the reason why I unlocked boot loader :P).

I'm already going nuts with this..I've a HTC update waiting for days, since I don't know if after OTA update it would still be possible to lock boot loader.

Thank you in advance for your support.

Regards
[One (M8) General] scotty1223:
Yes it is possible. Having a locked bootloader will NOT prevent you from flashing a recovery, firmware, or an ruu.

Files just need properly packed as a zip file, you cannot use the fastboot flash command.
[One (M8) General] StuMcBill:
One thing that is handy to know. When you are S-Off, you don't need to flash a custom recovery, you can just boot it.

fastboot boot <insert recovery here>.img
[One (M8) General] Brds7t7:
After the 4.4.3 update, a few people have reported that boot recovery command doesn't work on twrp but does on Philz (or could be the other way around). Maybe they'll address that in a future update.

Sent from My Calculator!
[One (M8) General] StuMcBill:
Ah I didn't know that. Works for me on 4.4.2.
[One (M8) General] YoshiFan501:
does this enable that annoying red text?
[One (M8) General] skeletiko:
Yes indeed.. I forgot that and when I was now trying to do a nandroid backup and ran fastboot instruction.. it gave me the error:

C:\miniadb_m7>fastboot boot twrp.img

downloading 'boot.img'...

OKAY [ 1.379s]

booting...

FAILED (remote: not allowed)

finished. total time: 1.389s

:rolleyes:

Regards
[One (M8) General] scotty1223:
youll need to be unlocked to boot a recovery or boot image. even when s off.

this feature eventually quit working on m7,for some reason so enjoy it while it lasts.

as has been stated many time,no. you need a patched hboot to eliminate the red warning text.

wow that was the long way to go byt glad you got there. :)

i forgot to mention if you can boot a recovery,you should have root access there so the lock command can be issued while in recovery without actually instaling superuser. when i first put up the steps,i forgot that fastboot boot was currently working,or id have included that as an option.
[One (M8) General] snoof:
Hi there,

Just used the method to lock my bootloader to profit of the google Drive promo. But i can't still get it, my bootloader is saying locked...maybe because of superCID ?

Any tip ?

Edit : answer found in the topic while searching "drive" instead of "google drive" => I have to remove tampered...
[One (M8) General] miggsr:
Correct bootloader must be ***LOCKED*** with no ***TAMPERED*** above it to work.
[One (M8) General] RafiKhalil:
I cant get S-off because apparently my device has been patched by HTC, so what am I supposed to do...? Do I have to wait for firewater to make an update and possibly fix this issue or what? Also, if I can get S-off and make my phone Locked again, will I be able to flash Sense 6 stock ROM? Because I'm really uncomfortable with VenomOne, InsertCoin and MaximusHD. I just want to get back to the factory ROM again.
[One (M8) General] miggsr:
Have you tried Google.... There is another way to get s-off... Called sunshine s-off. And you for to mention a rom in your list I'm guessing that's because you haven't tried it... Go check out Tranquil Rom from Badseed Customs for M8 supports all devices
[One (M8) General] Jephreyz:
I've converted my HTC One M8 (AT&T GSM) into a Google Play Edition device and changed the CID so that it matches the CID of a Google Play Edition HTC One M8 in order to receive OTA updates from Google. I used the method of flashing the Google Play Edition RUU file. I usually only flash custom ROMs for a purer Android experience such as Cyanogenmod; however, now that I'm running the purest version of any other version of Android, I would like to re-lock my bootloader and set my security back to S-ON because an unlocked bootloader and S-OFF opens up several security holes within the device which I take very seriously. My question is: can I re-lock my bootloader and turn S-ON without bricking my phone and still continue to receive OTA updates through Google?
[One (M8) General] nraines:
I've successfully gotten my M8 back to stock, other than removing SuperSU. The uninstall option is not working. It keeps reappearing after reboot. I've also tried the Universal Unroot app with no success. Any tips for removing SuperSU and root would be appreciated.
[One (M8) General] skulldreamz:
The easiest way would be to just flash a ruu. It will take you to out of the box conditions.

---------- Post added at 01:55 AM ---------- Previous post was at 01:48 AM ----------

Yes you can but you have to be on a UNMODIFIED HBOOT WHEN YOU GO S-ON OR YOU WILL BRICK YOUR DEVICE INSTANTLY. To lock your bootloader type "fastboot oem lock" without the quotes. and to go s-on type, actually pm me as I dont want to put that out in the open cuz it can brick if you don't know what your doing.
[One (M8) General] nraines:
I flashed a RUU to get to this point. The only one for Verizon I could find was pre-rooted, though. I'm hoping the upcoming update will solve my problem before I have to send it in for warranty work.
[One (M8) General] FreydNot:
Thanks OP! This was really useful to me as I was returning my T-Mobile M8 back to stock before a warranty replacement.

---------- Post added at 11:19 PM ---------- Previous post was at 11:11 PM ----------

I found it was easiest to use the sunshine installer to gain temp root. You don't need to pay anything since you stop before it goes through the whole S-Off process. Just run the APK and select temp root. When sunshine shows you the next screen, you can exit out and still have root. Once you reboot the temp root will be gone. Uninstall the sunshine app and there will be no traces of anything.

http://theroot.ninja/
[One (M8) General] MICH_**:
i don´t get a # propmt (even with su command) so it tells me i do not have the permisions.. why?
[One (M8) General] scotty1223:
Sounds like you are not rooted.
[One (M8) General] MICH_**:
yeah, just figured it out. working now! :)

bit off topic, sorry: do you recommend to go s-on for warranty? everything is stock..just s-off is left
[One (M8) General] skulldreamz:
Once s-off you should stay s-off. HTC has been known to send out device's to customers already s-off so they will not deny a warranty claim for you being s-off.
[One (M8) General] nraines:
So I just received the Verizon OTA and successfully updated my M8, but SuperSU survived, even after a factory reset. Is there any way to get it off of my phone now, or am I stuck? I have no more root, but it is still a system app.
[One (M8) General] skulldreamz:
You could flash supersu .zip and then use its option in the app to fully unroot. Then flash a stock recovery. Good to go [emoji12]
[One (M8) General] nraines:
I tried that before I accepted the update, along with several other methods of removal. It kept re-installing after reboot no matter what I did. I'm wondering if HTC will even look at my apps for a broken screen replacement. Maybe I can just hide SuperSU in the app drawer and hope they don't dig in? No root, just a non-stock root system app...
[One (M8) General] Jephreyz:
Would an unmodified hboot of the GPE M8 work even if the phone was originally had a Sense stock hboot?
[One (M8) General] scotty1223:
the phone must be 100% stock,not 99.5% stock. even if you use stock components,if they are not what the phone expects,you could end up tampered,locked into bootloader with a security warning,ir even in a processor "do not boot" mode(read hard brick)

in other words the only way id attempt s on is:

1)i had an unlockable bootloader

2)after running a full,

signed

RUU

if you cant meet the first one, the risk is not worth it,IMO. even if youre able to ,eet both criteria,that does not gaurantee you wont have issue