yashsingh1/xdaforums huggingface dataset:
[One (M8) General] treIII:
I ran the ruu while s on. That removed the software status modified. It was clear in the disclosure that the phone MUST be the way it is intended or no warranty work. There's another thread and a gentleman said his boot loader was locked but phone was s off and they sent it back to him with no work done. So to get the screen replaced I had to make it stock. That's why s on. But HTC made it very clear on the phone before making the advantage ticket. Only thing I wish I'd have done before turning the phone son is running an ruu to and older software then I'd be able to achieve s off again. It's my son's phone he said he'd rather have his screen replaced and be s on.

Sent from my HTC One_M8 using Xparent Blue Tapatalk 2
[One (M8) General] Jena-HtcOneM8:
Hi [MENTION=3437245]scotty1223[/MENTION] I got permission denied error in step 2 while locking.

shell@htc_m8:/ $ echo -ne '\x00\x00\x00\x00' | dd of=/dev/block/mmcblk0p2 bs=1 seek=33796

d of=/dev/block/mmcblk0p2 bs=1 seek=33796 <

/dev/block/mmcblk0p2: cannot open for write: Permission denied

Please can you help?
[One (M8) General] Captain_Throwback:
You don't have root. Did you "su" first?
[One (M8) General] Jena-HtcOneM8:
Yes but that didn't work. It didn't bother me as this step was optional.

shell@htc_m8:/ $ su

su

/system/bin/sh: su: not found

In the pre-requisite it said s-off which I have (screen attached). Sorry I'm a newbie.

Thanks
[One (M8) General] scotty1223:
The su step was not optional. As stated in the parenthesis,you need to enter su if the initial adb shell command does not get you a # prompt.

You've also ignored the second pre-requisite,wich was: *you must have superuser installed

You do not really need your boot loader to be unlocked. You can install a recovery as a zip file from fastboot/ruu mode,or from hboot/sd card.

You can then install superuser,or your Rom of choice.

Once you're properly rooted,you can use these commands to lock/unlock your boot loader
[One (M8) General] djhixson88:
FIrst off sorry for my stupidity lol I converted my AT&T M8 to a Google Play Edition. S-Offed with Sunshine. Not caring for Lollipop right now, so I went back to Sense by flashing the 1.54 firmware and splash image. Which wiped the Google Play RUU due the system partitions changing. So I couldn't boot up. I flashed the latest TWRP recovery, but once in recovery it said I had 0MB, therefore I couldn't flash any ROMs. Or sideload. I read somewhere that the only way I could get the partitions to actually change was by running an RUU. So I figured by doing this I could just redo the bootloader unlock process and root, flash custom ROMs, etc. I never had any issues with my M7 by doing this, so I figured it would apply here. Obviously I was wrong. I locked the bootloader then ran the RUU. Worked fine, but when I went to unlock the bootloader it said FAILED (remote: unlock token check failed) I only wanted to go back to Sense because I wanted to try ARHD again. Anyway, I downloaded the Sunshine apk after I had locked the bootloader and ran the RUU and ran it to try getting temp root. All it does is tell me my device is already S-Off and reboots my phone. I'm aware you can flash a recovery when the bootloader is locked so I can root it the proper way. But I'm not sure how to flash a recovery other than through fastboot. I keep getting FAILED (remote: not allowed). So I'm stuck. The phone's still usable, the CID is CWS__001 (only way the RUU would run) but still S-Off. Again, sorry for my stupidity, any help would be appreciated. Most definitely will not be locking my bootloader again.
[One (M8) General] scotty1223:
3 things come to mind:

1)change cid back to whatever so that your token works

2)get a new token

3)zip your recovery image up with an android info text document and install it via hboot/sd card or fastboot/ruu mode.
[One (M8) General] djhixson88:
We're good, I did the first two steps and bootloader is now unlocked. It crossed my mind to try a new token before, don't know why I didn't. Oh well thank you very much! Should be all good now
[One (M8) General] :
Is this thread and files still ok for a vzw htc one m8 running 4.4.4? I am s-off currently and running the gpe rom on it.

Thanks!
[One (M8) General] cesar.peru:
Lock bootloader with s-on?

Hi, I have my HTC One M8 Unlocked and S-ON. I try to s-off my phone with Firewater but it didn't work. Is there another way to s-off it, or any way to lock the bootloader again with s-on?

Thanks!!
[One (M8) General] ~clumsy~:
I used Sunshine, it does cost but well worth it.

http://xdaforums.com/showthread.php?t=2792487
[One (M8) General] scotty1223:
You are not rooted. re read the original post.
[One (M8) General] Ampicillin:
Is this method still works with latest 4.4.4 and 3.28.401.9 firmware and latest hboot? I want to unlock the bootloader without htcdev
[One (M8) General] scotty1223:
As long as you meet the criteria specified in the op,yes
[One (M8) General] Ampicillin:
Thanks [MENTION=3437245]scotty1223[/MENTION] is the OP :p and I do meet his criteria. Superuser and S OFF that's all it requires to unlock the bootloader :)

Edit: Ps. SuperCID won't stop me from unlocking the bootloader am I right?
[One (M8) General] scotty1223:
Correct,it will not
[One (M8) General] Jamal Ahmed:
I'm on Google Play Edition Lollipop, and want to relock bootloader to get Drive storage. Will my storage be wiped after I relock from this method? If not, then will it be wiped if I unlock again after getting the Drive storage? A bit off-topic but is it possible to get Drive storage on Google Play Edition version?

Thank you, I hope someone can answer these 3 questions :)
[One (M8) General] jshamlet:
No. One of the advantages of this method (and probably why Sunshine uses it) is that it doesn't trigger the format of user data. You can lock/unlock at will.
[One (M8) General] DanGeorges:
Scotty -

Will this work with the AT&T update to 4.4.4 OTA that just came out Monday January 26?

I definitely don't want to brick my phone...

Thanks!
[One (M8) General] scotty1223:
It should. An OTA does not generally change anything at the level at which that this works
[One (M8) General] DanGeorges:
Thank you Scotty. I have bootloader 3.19, but I am not sure if that makes a difference or not. I'm thinking that HBOOT is separate from Bootloader, right?

I'll let you know what happens (crossing fingers....)

EDIT:

Successfully locked bootloader. Trying to get the Google Drive bonus....

Thank you!

EDIT 2:

Apparently the locked bootloader doesn't fool HTC. I couldn't get the drive space...

EDIT 3:

Removing the tampered flag AND locking bootloader did the trick. Got the Google Drive space update!
[One (M8) General] FWCDev:
Thanks

This really helps a lot, I could use this method to unlock most HTC's thanks!
[One (M8) General] bambam1978:
hi

Bell canada htc one m7 and i copy and pasted the adb command to lock the bootloader

shell@m7:/ $ su

su

root@m7:/ # echo -ne '\x00\x00\x00\x00' | dd of=/dev/block/mmcblk0p2 bs=1 seek=3

3796

of=/dev/block/mmcblk0p2 bs=1 seek=33796 <

4+0 records in

4+0 records out

4 bytes transferred in 0.018 secs (222 bytes/sec)

root@m7:/ # exit

exit

shell@m7:/ $ exit

exit

C:\Android>adb reboot-bootloader

but my bootloader is still unlocked?? Any ideas guys?
[One (M8) General] scotty1223:
You're writing to the wrong partition. this thread is for m8
[One (M8) General] bambam1978:
lol duh thats what happens after working a 12 hour midnight shift!!!
[One (M8) General] scotty1223:
I should have mentioned this earlier, be aware that you have damaged your stock p2 and will brick your phone if you attempt to turn it back to s on.

The best way to fix this is to find and flash a firmware.zip for your particular variant.

You are not by any means the first to make this mistake, & I thought I had put a big warning right at the top of the first post of the thread. Apparently I haven't, so I'll make sure I get that added
[One (M8) General] winner61:
OK, that makes sense. But it does not make sense that the pictures in the first post are from a m7. That put me on the wrong idea it was for the m7.

I came across this by a search and did not look at the forum title at first.

Can you Scotty or anyone direct or tell me (and maybe some others) (to) the right shell lock/relock lines for the m7

searched the m7 general forum but could not find it.

It would be very much appreciated. Thanks.
[One (M8) General] scotty1223:
The pics are because I didn't have m8 at the time,and there is an explanation of that afterwards.

Go to m7 general and post this title in the search box.
[One (M8) General] BerndM14:
It's the same command, the only difference is the partition to which you write it. On the M8 it gets written to mmcblk0p2 on the M7 it gets written to mmcblk0p3

http://xdaforums.com/showthread.php?t=2475914
[One (M8) General] winner61:
Thanks guys.

Will try that.

:o
[One (M8) General] gamblor01:
Thank you scotty1223!

I just found this thread and T-Mobile is supposed to start OTA updates to Lollipop tomorrow (https://twitter.com/moversi/status/563887292960350209). Last time I updated, I did a nandroid of a stock ROM, flashed over the stock bootloader, then had to lock the bootloader and get the OTA. Unfortunately, I had to go through all of the nonsense of getting another token from htcdev.com just to get it unlocked again, then flash TWRP and SuperSU. This will save me some time on my Lollipop upgrade. :)
[One (M8) General] scotty1223:
For what it's worth, there is no need to relock the bootloader to receive the OTA.
[One (M8) General] gamblor01:
Ha, really? I guess I was just thinking that I needed to return it to absolute pristine/stock conditions before it would work. I roll with a mostly stock ROM (I actually like Sense -- maybe that makes me weird) but tend to do stuff like delete the tmobile-jingle that plays at boot time, delete some bloatware and such, and I never save away what I deleted (maybe I should). Rather than surgically put back what I removed, I feel like it's easier for me to simply flash a stock nandroid to return back to stock.

Thanks for the info. I'll try this time to simply nandroid, flash the default bootloader, and then try the OTA without locking. The HTC backup stuff puts almost everything back after installing the OTA and re-rooting, but if I can apply the OTA without locking the bootloader then that saves me even more trouble. Awesome.
[One (M8) General] scotty1223:
I am the same way. I don't usually run custom roms anymore,just stock with superuser. When its ota time I:

-capture ota(so I have a stock recovery for next time)

-restore correct stock recovery

-ota

-flash twrp and install superuser

I never bother to relock
[One (M8) General] :
Should this still work on the new Lollipop update?
[One (M8) General] AlbertoSONIC:
Is it possible to lock the bootloader without ROOT but with S-OFF? Maybe from the bootloader with "fastboot oem lock"?
[One (M8) General] Sloth:
Yes but it will say relocked instead of locked.

Sent from a Glade Air Freshener
[One (M8) General] scotty1223:
And it will factory reset in the process
[One (M8) General] AlbertoSONIC:
Nvm, i rooted my device and followed the first post's step by step ;)
[One (M8) General] lukas_system:
I have a question. How do you unlock the bootloader without using the HTC dev (4.16.401.10 firmware). I have s-off.
[One (M8) General] scotty1223:
-Install recovery as a zip file using fastboot/ruu mode

-Install superuser

-run command

Optionally,you could run the command in recovery if you don't want to root
[One (M8) General] lukas_system:
Do you mean this:

fastboot oem rebootRUU

fastboot flash zip (filename firmware+TWRP).zip

fastboot reboot-bootloader

I did so and do not want to upload. Is the file name must verily specific
[One (M8) General] scotty1223:
Not sure what you're saying,or asking
[One (M8) General] lukas_system:
or the name of the zip file to be indifferent. whether to ROM.zip
[One (M8) General] scotty1223:
The zip file name is unimportant. It can be anything,but the file must be in the same directory as fast boot,and the command must match exactly the name of the zip.

Be aware that windows sometimes will hide the extension resulting in a different name(example: recovery.zip.zip instead of recovery. zip)

The zip does not need any other firmware inside. Just a recovery image and android info document

Hope That helps
[One (M8) General] lukas_system:
But recovery is TWRP * .img
[One (M8) General] scotty1223:
The image inside the zip must be named correctly for its intended partition. Your twrp recovery image must be named "recovery"
[One (M8) General] ian.anindya:
Hi scotty,

What you mean with your statement below?

"Optionally,you could run the command in recovery if you don't want to root“

Could you explain more specific?

Want to use your code to be "Locked“ but don't want to root or install custom recovery again.

Clean stock rom, no root and locked.

Keep s-off absolutely.

Thanks!
[One (M8) General] Captain_Throwback:
Recovery has root access over adb by default, so the commands can be run from within recovery without actually rooting your ROM.

In fact, you don't even have to replace stock recovery if you're currently unlocked, as you could just fastboot boot it, run the command, and then be locked (though to undo this you'd have to flash a custom recovery via zip, since being locked prevents fastboot flashing of images).
[One (M8) General] navid0308:
if i use fastboot oem lock to get relocked and then apply OP's method to reset it to locked flag, will i be able to use htcdev method to unlock?
[One (M8) General] djlukas1983:
It's written that you have to be S-OFF to unlock bootloader using this method, but if you want to S-OFF your phone you have to have unlock your bootloader.

So it sounds impossible. Can someone explain it to me?

Wysłane z mojego HTC One_M8 przy użyciu Tapatalka
[One (M8) General] Captain_Throwback:
SunShine doesn't require an unlocked bootloader to achieve S-OFF (in most cases).
[One (M8) General] egzthunder1:
You need temp root for sure to get s-off. From that point on, you can unlock your bootloader without having to go through htcdev.

Also, hi bud! :)

There are two rules in life for being successful:

1. Never reveal everything you know;

2.
[One (M8) General] graziano68:
How can I get these requirements

*you must be s off.

*you must have superuser installed

BEFORE unlocking bootloader :confused:

Does exist some tutorial ?
[One (M8) General] Sloth:
Sunshine

Sent from a Glade Air Freshener
[One (M8) General] graziano68:
It does not work with Lollipop , It ask root, I tried it this morning . It's a solution only for kitkat
[One (M8) General] epsix:
Then downgrade to 4.3 or 4.4.4 Sense ruu, then use sunshine.
[One (M8) General] egzthunder1:
I don't believe you can downgrade just like that...

There are two rules in life for being successful:

1. Never reveal everything you know;

2.
[One (M8) General] graziano68:
indeed I can't downgrade . Only hope is a temp root for lollipop which can be used by sunshine otherwise HTCdev (which I would avoid) .
[One (M8) General] redpoint73:
You can downgrade by RUU with s-on.

---------- Post added at 02:01 PM ---------- Previous post was at 02:00 PM ----------

Download sunshine 3.0, which was released in the last day or 2, and supports Lollipop.
[One (M8) General] TogoFire:
THANKS! :)
[One (M8) General] scotty1223:
No,you can not. The phone will only allow you to install an ruu with its same build number or newer

Sent from my HTC One max
[One (M8) General] p1xel-cl0ck:
will this command work on m8 uk branded vodafone? is the boot flag in the same spot?
[One (M8) General] c5satellite2:
Confirming Scott's answer. You cannot downgrade with RUU if you are s-on.

---------- Post added at 08:55 PM ---------- Previous post was at 08:52 PM ----------

If it is a gsm phone, which I am pretty sure all UK phones are, then yes.
[One (M8) General] redpoint73:
You are correct. That was a serious typo on my part. I meant to type the opposite ("can't") and somehow had an epic fail. Which with my apologies is obviously confusing and misleading.

Of course the statement "You can't downgrade with s-on" goes more logically with my recommendation to then s-off (2nd part of that same post).
[One (M8) General] WorldOfJohnboy:
I hate to bug you, but I'm having issues in trying to get this locked. VZW M8, S-Off and rooted, TWRP 2.8.5.0. Phone is running Neo's Adrenaline 2.1 ROM. In OS, the SuperSU is installed and working fine, no binary updates.

I boot to TWRP and adb devices shows my phone. then i type in the following:

c:\adb\platform-tools>adb shell

~ # ←[6nsu

su

/sbin/sh: su: not found

~ # ←[6n

Am I missing something?

=================================

EDIT: So sorry, for some reason I thought I had to be in Recovery. As soon as I booted into the OS, the commands worked and I am now *** LOCKED ***

Great job Scotty, thanks for this!
[One (M8) General] MICH_**:
is there a way to temp - root? im on stock rom, s-off and want to lock my bootloader.
[One (M8) General] Captain_Throwback:
If you're S-OFF, fastboot boot TWRP and run the commands from adb shell (no need to su as recovery shell is always run as root).
[One (M8) General] MICH_**:
and after that it´s possible to flash the stock recovery with s-on?
[One (M8) General] Captain_Throwback:
You can't flash anything (besides HTC-signed zips) if you're S-ON and locked. This process doesn't change your device to S-ON. I assumed you already had stock recovery installed. You can do that first if you'd prefer to have stock recovery.
[One (M8) General] MICH_**:
yeah, i know. My phone is now "locked", s-off, stock software but still running twrp. how to get stock recovery?
[One (M8) General] Captain_Throwback:
That's really off-topic for this thread. I'm sure if you search the forum for your variant you'll find what you're looking for. Here's a hint - stock recovery can be found in the stock firmware from an OTA ;).
[One (M8) General] MICH_**:
i knon where to find it.. please tell me im in a real panic right now :eek: flashing it via fastboot tells me Faild.
[One (M8) General] Captain_Throwback:
You just locked your bootloader - of course it failed, lol. If you still have TWRP installed, unlock it again using the procedure from the OP, fastboot flash stock recovery, and then you can lock again by fastboot booting TWRP and running the lock command again.
[One (M8) General] MICH_**:
"lock again by fastboot booting TWRP" what do you mean? If i´m running stock recovery without root how can i run the command?
[One (M8) General] jshamlet:
TWRP has adb support - use an adb shell from your PC.
[One (M8) General] Captain_Throwback:
Your device is unlocked and S-OFF. Root has nothing to do with being able to run a fastboot command.

fastboot boot twrp.img

That should boot up TWRP, and from there you can adb shell and run the lock command.
[One (M8) General] MICH_**:
omg i didnt know booting TWRP is possible through adb on PC :eek: thank you, i achieved it! :)
[One (M8) General] Captain_Throwback:
You don't boot it through adb. You boot it through fastboot. They aren't the same thing. But I'm glad you were able to figure it out.
[One (M8) General] 18rmiller:
nevermind
[One (M8) General] lllldante:
used the code and hard bricked my sony xperia z2

hey there m8 : )

i used this guide step by step for Sony xperia Z2 and i hard bricked my phone and atm my phone is not showing any sign of life except some lets say like when i attack usb cable some red light show up and nothing else , my question is is there any code to reverse this doings on my phone ? (btw cant load up the phone in mode)
[One (M8) General] scotty1223:
Not with an unresponsive phone. I'd say your only option is jtag. Not sure why you thought this would work on your device.

Sent from my HTC One max
[One (M8) General] adeptustech:
That's what happen when people DON'T read before they jump head first into something they have never done. That is why it is "ALWAYS IMPORTANT TO READ EVERYTHING FIRST". But as they say "Live & Learn" -$$$?
[One (M8) General] c5satellite2:
First sentence of first post of this thread reads:

This is for m8, it will not work on m7 or any other device
[One (M8) General] redpoint73:
Pretty clear you did not have the proper knowledge, and

never

should have tried this without reading everything and understanding (as others have mentioned). There is no reason you should have thought this would work on your phone. You need to be extremely cautious about applying

any

mod meant for another device. At best, the mod will probably not work, at worst you get a brick (as you now know).

This was just wrong for so many reasons:

- Sony and HTC don't use the same methods to lock/unlock their bootloaders

- No such thing as s-off on a Sony device

- The method involves changing a very specific piece of data at a specific location. Different devices store data in completely different locations. Modify the wrong data in the wrong place (on any device) and you can BRICK.
[One (M8) General] raneyden:
Worked perfectly on a VZW M8. Thanks for this.
[One (M8) General] _purple_:
Can someone please explain this? You need S-Off to follow this thread's method to lock your bootloader without htcdev. You need root to achieve S-Off. But how can you root without unlocking your bootloader with htcdev as this method implies that htcdev won't be used?
[One (M8) General] scotty1223:
do some searching, it has been discussed many times. the main value is getting back to a locked status. Using fastboot oem lock gets you relocked

Sent from my HTC One
[One (M8) General] _purple_:
The few months I own this device I am searching and learning as much as I can.

edit: I believe you haven't understood my question. I now understand from your reply that you can relock the bootloader using fastboot oem lock even without S-Off but that was not the main concern expressed in my question.

How do you unlock your bootloader without htcdev as the title reads?

S-Off requires root in the first place and root requires unlocked bootloader, which requires htcdev. So, how do you actually do what the title reads without giving away your info to htc via htcdev?
[One (M8) General] jshamlet:
Sunshine could temp-root KitKat long enough to S-off in the past, which allowed you to bypass HTCDev. However, with the advent of Lollipop, you now have to root the old-fashioned way first.
[One (M8) General] _purple_:
Exactly. Also some 4.4.4 devices cannot be temp-rooted for the purposes of S-Off. It's not like lollipop and latest KitKat users are one or two. It could be 50% of M8 owners.
[One (M8) General] Superguy:
I just got an insurance replacement that came with 5.0.2 preloaded. Once I get S-Off, will this still work?

Also please forgive my rustiness - for rooting, I can push TWRP to the phone right out of the box, then flash the SU.zip from CF's website, and then do Sunshine, bootloader unlock, etc, correct?

Sorry for the questions, just seems like Lollipop turned everything I knew about this phone on its head.

Thanks!
[One (M8) General] jshamlet:
Assuming your phone is 100% bone stock with Lollipop 5.0.2, you will need to go through HTCDev first to unlock the bootloader. THEN you can push TWRP and a SU package. Once you obtain root, you can then S-off. At least until the Sunshine team finds a temp-root exploit.

If you are wondering, yes, this is the opposite of how it worked previously.
[One (M8) General] Superguy:
Thanks a ton! :good: Yep, it's 100% bone stock. Other than firing it up to see which version it was running, I haven't used it yet since I was waiting for a new laptop power brick so I could do all this stuff.

Crazy how it went backwards.
[One (M8) General] UgXvibe:
Ok, here is my dilemma, sent my phone in for repair.. I was rooted, s-off, unlocked..

The folks at HTC decided to relock the bootloader but left the phone SOFF w/stock recovery. I have no root, when I open SuperSU says no binary. I tried this method and when I type 'su' at command prompt I am not getting the # and the unlock command says Permission Denied. What am I missing here?

Thanks in advance!
[One (M8) General] farux_alkatziry:
sorry i'm newbie with HTC

i have unlock my phone with htcdev, but still S-ON,, how to S-OFF my phone??? sorry if stupid question...:(