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

7th April 2014, 02:39 AM   |  #1  
scotty1223's Avatar
OP Senior Member
Thanks Meter: 2,420
 
2,340 posts
Join Date:Joined: Jan 2011
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:
Quote:

troubleshooting connectivity issues:
-try a reboot of the PC
-try different usb cables and ports
-dont use a usb hub
-dont use usb 3.0
-make sure nothing capable of comunicating with the phone is enabled and running. htc sync,pdanet,easy tether,and even itunes have all been known to cause issues.
-windows 8 has been known to have issues. try a windows 7 or older machine

failing the above,
-i use these drivers for fastboot and adb(donwload and run as admin): http://downloads.unrevoked.com/HTCDriver3.0.0.007.exe (mirror)

failing that,try manually updating the drivers in the following manner:
-put the phone in fastboot mode(select fastboot from the hboot menu)
-open device manager on the PC
-plug in phone,watch for it to pop up in device manager.
-update drivers with device manager,pointing the wizard to the extracted
driver download folder from above

note that you can check the connectivity of the phone,and make sure drivers are working by in the following manner:
-open cmd window. change to directory containing adb/fastboot utilities

-adb with the phone in the booted OS,usb debug enabled,enter:
adb devices in a cmd window

-fastboot with phone in fastboot,enter:
fastboot devices in cmd window

in either case,a properly connected phone with working drivers installed should report back the phones serial number.



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
Last edited by scotty1223; 9th April 2014 at 09:18 PM.
The Following 59 Users Say Thank You to scotty1223 For This Useful Post: [ View ]
7th April 2014, 02:40 AM   |  #2  
scotty1223's Avatar
OP Senior Member
Thanks Meter: 2,420
 
2,340 posts
Join Date:Joined: Jan 2011
mine!
The Following 3 Users Say Thank You to scotty1223 For This Useful Post: [ View ]
7th April 2014, 08:51 AM   |  #3  
BD619's Avatar
Forum Moderator
Flag Xda-Dev,NV
Thanks Meter: 8,071
 
8,445 posts
Join Date:Joined: Apr 2012
Donate to Me
More
@scotty1223 will this royally mess anything up if I try this on my Sprint M8?
7th April 2014, 11:25 AM   |  #4  
scotty1223's Avatar
OP Senior Member
Thanks Meter: 2,420
 
2,340 posts
Join Date:Joined: Jan 2011
Quote:
Originally Posted by BD619

@scotty1223 will this royally mess anything up if I try this on my Sprint M8?

Possibly. If the flag is in a different spot,and you overwrite something important. You can dump p2 and p6 and I can take a look,if you'd like.

Sent from my HTC PG09410 using Tapatalk 2
The Following 4 Users Say Thank You to scotty1223 For This Useful Post: [ View ]
7th April 2014, 11:31 AM   |  #5  
BD619's Avatar
Forum Moderator
Flag Xda-Dev,NV
Thanks Meter: 8,071
 
8,445 posts
Join Date:Joined: Apr 2012
Donate to Me
More
Quote:
Originally Posted by scotty1223

Possibly. If the flag is in a different spot,and you overwrite something important. You can dump p2 and p6 and I can take a look,if you'd like.

Sent from my HTC PG09410 using Tapatalk 2

Hopefully this will give you the answer?
http://forum.xda-developers.com/show....php?t=2699165
or
http://forum.xda-developers.com/show....php?t=2696652
The Following User Says Thank You to BD619 For This Useful Post: [ View ]
7th April 2014, 01:37 PM   |  #6  
Granite1's Avatar
Member
Pittsburgh, PA
Thanks Meter: 15
 
59 posts
Join Date:Joined: Dec 2010
More
Thanks for working on this Scotty!

Also, thanks for getting the Sprint info to Scotty BD.

Both of yinz, thanks and thanked.

Sent from my EVO using Tapatalk
7th April 2014, 01:45 PM   |  #7  
scotty1223's Avatar
OP Senior Member
Thanks Meter: 2,420
 
2,340 posts
Join Date:Joined: Jan 2011
Quote:
Originally Posted by BD619

Hopefully this will give you the answer?
http://forum.xda-developers.com/show....php?t=2699165
or
http://forum.xda-developers.com/show....php?t=2696652

unfortunately,no. it does show that the partition the flag is located in is in the same spot(pg1fs is p2) but i need to see that partition if you want me to verify the flag is in the same spot(it prolly is,but is not always across variants)

in a root shell(# prompt):

dd if=/dev/block/mmcblk0p2 of=/sdcard/mmcblk0p2

then upload the image and pm me a link.
Last edited by scotty1223; 7th April 2014 at 01:48 PM.
The Following 2 Users Say Thank You to scotty1223 For This Useful Post: [ View ]
7th April 2014, 02:01 PM   |  #8  
BD619's Avatar
Forum Moderator
Flag Xda-Dev,NV
Thanks Meter: 8,071
 
8,445 posts
Join Date:Joined: Apr 2012
Donate to Me
More
Quote:
Originally Posted by scotty1223

unfortunately,no. it does show that the partition the flag is located in is in the same spot(pg1fs is p2) but i need to see that partition if you want me to verify the flag is in the same spot(it prolly is,but is not always across variants)

in a root shell(# prompt):

dd if=/dev/block/mmcblk0p2 of=/sdcard/mmcblk0p2

then upload the image and pm me a link.

Check PM
The Following User Says Thank You to BD619 For This Useful Post: [ View ]
7th April 2014, 04:00 PM   |  #9  
scotty1223's Avatar
OP Senior Member
Thanks Meter: 2,420
 
2,340 posts
Join Date:Joined: Jan 2011
Quote:
Originally Posted by BD619

Check PM

Cool thanks. Will take a look when I get home this evening

Sent from my HTC6435LVW using Tapatalk
The Following 3 Users Say Thank You to scotty1223 For This Useful Post: [ View ]
7th April 2014, 04:28 PM   |  #10  
ak074's Avatar
Senior Member
Thanks Meter: 107
 
311 posts
Join Date:Joined: May 2011
Quote:
Originally Posted by BD619

@scotty1223 will this royally mess anything up if I try this on my Sprint M8?

Quote:
Originally Posted by scotty1223

Possibly. If the flag is in a different spot,and you overwrite something important. You can dump p2 and p6 and I can take a look,if you'd like.

Sent from my HTC PG09410 using Tapatalk 2

i can confirm that this unlock method works on the sprint variant

The Following 2 Users Say Thank You to ak074 For This Useful Post: [ View ]
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes