Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[how to] lock/unlock your bootloader without htcdev(s-off required)

OP scotty1223

3rd December 2014, 05:39 PM   |  #211  
treIII's Avatar
Senior Member
Thanks Meter: 442
 
2,276 posts
Join Date:Joined: Jul 2012
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
7th December 2014, 10:43 PM   |  #212  
Junior Member
Thanks Meter: 1
 
17 posts
Join Date:Joined: Dec 2014
Quote:
Originally Posted by scotty1223

this thread will let you unlock your bootloader without htcdev,or let you change your hboot watermark from relocked or locked back to stock.

originally,we used a zip file flashable in recovery. i have found it to work on gsm devices with 1.44 hboot and CW recovery. it did not work with twrp. if the following is too scary,feel free to test the zip files. that thread,info,and downloads can be found here. since not all recoverys are working,these values can be changed with simple adb commands.

advantages
-no hassle with htcdev,tokens,or unlock codes
-no submitting your phones personal info to htc
-the ability to get back to 100% stock without any visual traces or records of having been s off or unlocking your bootloader.

you do NOT need to downgrade your hboot. this simple adb command works without any scary hboot downgrades.

*you must be s off.
*you must have superuser installed

read this:
this will not work if your s on. its not a way to magically unlock

the usual disclaimers:
use this info at your own risk. if it melts your phone into a little pile of aluminum goo,its not my fault.

credits
-beaups for schooling me on echo comand protocol
-strace for originally discovering the location of the lock status flag(check out this thread for more info)
-kdj67f for fearlessly testing on vzw m7_wlv and putting up some screenshots in post 2. thanks!
-matthew0776 for fearlessly testing for sprint m7_wls
*i dont have m8. let me know if it works and ill add you to the credits.

IF you are an advanced user with adb/fastboot set up and some basic knowlede of the cmd window,you can skip to #2
1)set up adb(windows 7 and older)


-download this file
-install drivers: if you have htc sync installed,you should allready have drivers. if not,you can install htc sync,or install these modified htc drivers from revolutionary (driver mirror)
-unzip your miniadb_v1031.zip file. this is native funtionality in windows 7. you otherwise may need a utility such as "7-zip" to extract,or unzip it. place the unzipped folder onto the root of your C drive on your PC. root means the top level,not inside any folders. so just copy and paste,or drag and drop the folder onto C with everything else that is there. you may want to rename it to "miniadb_m7" since youll be putting some device specific files in here.
-open a command window. on windows 7,click the start bubble in the lower left and type "command" in the search box. xp i believe is similar or the same. doing this should open a small black command window.
-change to your miniadb_m7 directory. type the following at the prompt in your cmd window:

cd c:\miniadb_m7

your command promt should change to "c:miniadb_m7>" provided you: 1)unzipped the miniadb_v1031 zip file,and 2)put the folder on your c drive,and 3)entered the name of the folder correctly ("miniadb_m7" in this case)

-now make sure usb debugging is checked in developer options(you will need to turn it on first),and plug your phone into your PC with a usb cable
-make sure your phone is being recognized- type:

adb devices

if your drivers are installed correctly,this should return your phones serial number. you should hear the "found device" noises when you plug your phone in. if it starts installing drivers,wait for it to finish before typing the adb devices command.

if you get your serial number back,then enter this command:
adb reboot bootloader

this should take your phone to the "fastboot" screen,wich is white with colored letters. this is one mode of your bootloaders interactive modes. at the top youll see fastboot devices as confirmation youre in fastboot.

now enter:
fastboot devices
again,this should return your phones serial number. you should hear the "found device" noises when you plug your phone in. if it starts installing drivers,wait for it to finish before typing the adb devices command.

if you get your serial number back,you can enter the following to boot back to the phones OS:
fastboot reboot

and now,youve installed adb/fastboot and tested youre phones drivers. if at either spot,you have trouble and dont get your serial number back,there is some sort of connection issue. use these steps to troubleshoot:


this process,in your cmd window,should look something like this:
Code:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\Scott>cd c:\miniadb_m7

c:\miniadb_m7>adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
FAxxxxxxxxxx    device


c:\miniadb_m7>adb reboot bootloader

c:\miniadb_m7>fastboot devices
FAxxxxxxxxxx    fastboot

c:\miniadb_m7>fastboot reboot
rebooting...

finished. total time: 0.037s

c:\miniadb_m7>


2)reset your "lock status flag"

to LOCK your bootloader,enter the following:

adb devices

adb shell

su (if needed to get a # prompt)

echo -ne '\x00\x00\x00\x00' | dd of=/dev/block/mmcblk0p2 bs=1 seek=33796
(i would very strongly recomend you copy/paste this)

exit
(exit a second time if you need to to get back to a normal > prompt)

adb reboot bootloader

verify you are now locked
__________________________________________________ ___________________________________________

to UNLOCK your bootloader,enter the following:

adb devices

adb shell

su (if needed to get a # prompt)

echo -ne "HTCU" | dd of=/dev/block/mmcblk0p2 bs=1 seek=33796
(i would very strongly recomend you copy/paste this)

exit
(exit a second time if you need to to get back to a normal > prompt)

adb reboot bootloader

verify you are now unlocked



*i have tested this on my gsm htc one. if someone wants to test on vzw,ill add you to the credits





(yes this is m7. i dont have an m8 yet)

other useful threads:
remove tampered banner: http://forum.xda-developers.com/show....php?t=2708565
change mid without an eng bootloader: http://forum.xda-developers.com/show....php?t=2708581

Hi @scotty1223 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?
7th December 2014, 11:18 PM   |  #213  
Captain_Throwback's Avatar
Retired Moderator / Recognized Contributor
Flag Bensalem, PA
Thanks Meter: 11,275
 
10
12,404 posts
Join Date:Joined: Aug 2008
Donate to Me
More
Quote:
Originally Posted by Jena-HtcOneM8

Hi @scotty1223 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?

You don't have root. Did you "su" first?
The Following User Says Thank You to Captain_Throwback For This Useful Post: [ View ]
7th December 2014, 11:51 PM   |  #214  
Junior Member
Thanks Meter: 1
 
17 posts
Join Date:Joined: Dec 2014
Quote:
Originally Posted by Captain_Throwback

You don't have root. Did you "su" first?

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
Attached Thumbnails
Click image for larger version

Name:	DSC_0026.jpg
Views:	180
Size:	261.4 KB
ID:	3052992  
8th December 2014, 01:01 AM   |  #215  
scotty1223's Avatar
OP Senior Member
Thanks Meter: 2,445
 
2,365 posts
Join Date:Joined: Jan 2011
Quote:
Originally Posted by 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

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

Sent from my HTC0P3P7 using Tapatalk
13th December 2014, 08:31 PM   |  #216  
Senior Member
Thanks Meter: 7
 
160 posts
Join Date:Joined: Aug 2013
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.
14th December 2014, 12:33 AM   |  #217  
scotty1223's Avatar
OP Senior Member
Thanks Meter: 2,445
 
2,365 posts
Join Date:Joined: Jan 2011
Quote:
Originally Posted by 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.

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.
14th December 2014, 12:43 AM   |  #218  
Senior Member
Thanks Meter: 7
 
160 posts
Join Date:Joined: Aug 2013
Quote:
Originally Posted by 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.

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
The Following User Says Thank You to djhixson88 For This Useful Post: [ View ]
16th December 2014, 03:43 PM   |  #219  
Senior Member
Thanks Meter: 8
 
259 posts
Join Date:Joined: Aug 2010
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!

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes