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

Search This thread

scotty1223

Inactive Recognized Contributor
Jan 3, 2011
2,813
3,056
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 m7_ul 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.

prerequsites
*you must be s off.
*you must have superuser installed(see this thread if you need help installing superuser. use the keep bootloader locked directions)

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.

it has been successfully tested on t6ul with MID 0P3P51000. i feel it is safe for other t6ul users,all MIDs,however,you are welcome to dump and we can verify the flag locations if you have concern.

if you have a different variant than t6ul,please pm me for more info prior to trying this.

credits
-beaups for giving me the echo comand,so yall didnt need to dump,edit with a hex editor,and copy back
-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
*pradeepvizz for getting the ball rolling for t6 users-dumping partitions,testing commands and providing screenshots. make sure to give him a big thanks
*Jm@n for testing on sprint t6
*droidrev71 and oneandroidnut for testing vzw t6

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


-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:
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>[COLOR="red"]cd c:\miniadb_m7[/COLOR]

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>[COLOR="red"]adb reboot bootloader[/COLOR]

c:\miniadb_m7>[COLOR="red"]fastboot devices[/COLOR]
FAxxxxxxxxxx    fastboot

c:\miniadb_m7>[COLOR="red"]fastboot reboot[/COLOR]
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/mmcblk0p3 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/mmcblk0p3 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





Please Note:
*you must remove the tampered banner as well in order for the fingerprint scanner to work.

remove your tampered banner
 
Last edited:

hectorz321

Senior Member
Mar 5, 2012
51
8
This looks great! few quick questions before i attempt it. So will this let me get root and use of the finger print scanner? say if i unloocked installed custom recovery root all that, then relocked would the finger print scanner work? thanks very much!!!!
 

pradeepvizz

Senior Member
Dec 24, 2010
2,251
721
Dubai
This looks great! few quick questions before i attempt it. So will this let me get root and use of the finger print scanner? say if i unloocked installed custom recovery root all that, then relocked would the finger print scanner work? thanks very much!!!!


yes thats right.. i have got a custom recovery, root and a custom rom as well and i have LOCKED and also removed TAMPERED banner and i can use my fingerprint scanner happily :D

Thanks scott!! that was really quick work from you! i am glad that i choose to PM you and requested this!
 
  • Like
Reactions: Jm@n and scotty1223

hectorz321

Senior Member
Mar 5, 2012
51
8
hmmmm by looks of it you have to unlock with htc dev first to get s off, trying to install custom recovery without bootloader ulocked gives you an error
C:\max>fastboot flash zip recovery.zip
target reported max download size of 1554698240 bytes
sending 'zip' (7553 KB)...
OKAY [ 1.143s]
writing 'zip'...
(bootloader) signature checking...
FAILED (remote: 12 signature verify fail)
finished. total time: 1.944s
 

scotty1223

Inactive Recognized Contributor
Jan 3, 2011
2,813
3,056
hmmmm by looks of it you have to unlock with htc dev first to get s off, trying to install custom recovery without bootloader ulocked gives you an error
C:\max>fastboot flash zip recovery.zip
target reported max download size of 1554698240 bytes
sending 'zip' (7553 KB)...
OKAY [ 1.143s]
writing 'zip'...
(bootloader) signature checking...
FAILED (remote: 12 signature verify fail)
finished. total time: 1.944s

correct. youll need to be s off to install recovery as a zip file while locked.

custom made recovery zips do not have htc's official signiture required for s on flashing.
 

pradeepvizz

Senior Member
Dec 24, 2010
2,251
721
Dubai
I can also confirm that the unlock command works.. both of them works!

---------- Post added at 04:08 AM ---------- Previous post was at 04:04 AM ----------

@scotty1223 Will i need to UNLOCK in order to flash a zip from recovery? i am trying to flash elementx kernel zip which contains a zip file..
 
  • Like
Reactions: scotty1223

scotty1223

Inactive Recognized Contributor
Jan 3, 2011
2,813
3,056
[/COLOR]@scotty1223 Will i need to UNLOCK in order to flash a zip from recovery? i am trying to flash elementx kernel zip which contains a zip file..

nope. should not have to. once youre s off,the normal unlock rules go out the window.

the ONLY reason you would have to be unlocked is if you wanted to use fastboot flash to install a recovery or kernel,or to use fastboot boot to temporarily boot a recovery.

zip files in recovery,or ruu zip files flashed from fastboot/ruu mode do not need the bootloader unlocked :)
 

pradeepvizz

Senior Member
Dec 24, 2010
2,251
721
Dubai
nope. should not have to. once youre s off,the normal unlock rules go out the window.

the ONLY reason you would have to be unlocked is if you wanted to use fastboot flash to install a recovery or kernel,or to use fastboot boot to temporarily boot a recovery.

zip files in recovery,or ruu zip files flashed from fastboot/ruu mode do not need the bootloader unlocked :)

Thanks Scott! i was trying to install flar2's elementalx's kernel from the One on our MAX and was getting bootloops sometimes and i was not sure if the kernel was installed..

I did try to install once with LOCKED and UNLOCKED.. the phone kept bootlooping .. :p
 

B-Man2005

Senior Member
Feb 1, 2009
3,318
239
40
Wildeshausen
for me it didnt work

i was unlocked via htc dev... locked it again and unlocked it with
echo -ne "HTCU" | dd of=/dev/block/mmcblk0p3 bs=1 seek=33796

but fingerprint sensor does not work ...

i have a german o2 phone !
 

pradeepvizz

Senior Member
Dec 24, 2010
2,251
721
Dubai
for me it didnt work

i was unlocked via htc dev... locked it again and unlocked it with
echo -ne "HTCU" | dd of=/dev/block/mmcblk0p3 bs=1 seek=33796

but fingerprint sensor does not work ...

i have a german o2 phone !

deleted

---------- Post added at 02:15 PM ---------- Previous post was at 02:12 PM ----------

have you removed your tampered flag as well?
 
  • Like
Reactions: scotty1223

scotty1223

Inactive Recognized Contributor
Jan 3, 2011
2,813
3,056
for me it didnt work

i was unlocked via htc dev... locked it again and unlocked it with
echo -ne "HTCU" | dd of=/dev/block/mmcblk0p3 bs=1 seek=33796

but fingerprint sensor does not work ...

i have a german o2 phone !

You must leave it locked. The phone is reacting to finding htcu

Sent from my HTC PG09410 using Tapatalk 2
 
  • Like
Reactions: mdphoenix

Jm@n

Inactive Recognized Themer
Jul 21, 2012
558
1,021
Bristol CT
Thanks Scotty . Worked great on my Sprint Max .I'm also s-off , rooted and using fingerprint scanner ??

Sent from my HTC0P3P7 using Tapatalk
 
  • Like
Reactions: scotty1223

Jiggity Janx

Senior Member
Feb 19, 2010
1,397
286
Now is the time for everyone who has not donated to the great devs we have to break out their paypal! This initial great group of devs are helping us all out by creating a foundation for rom/kernel/whatever devs to provide us their magic from now on. Without these guys laying the framework none of that would be possible. Remember that we are very lucky that this mostly obscure device is getting the fabulous development support it is at this time. So show your support and DONATE!!
 
  • Like
Reactions: pradeepvizz

Top Liked Posts

  • There are no posts matching your filters.
  • 45
    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 m7_ul 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.

    prerequsites
    *you must be s off.
    *you must have superuser installed(see this thread if you need help installing superuser. use the keep bootloader locked directions)

    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.

    it has been successfully tested on t6ul with MID 0P3P51000. i feel it is safe for other t6ul users,all MIDs,however,you are welcome to dump and we can verify the flag locations if you have concern.

    if you have a different variant than t6ul,please pm me for more info prior to trying this.

    credits
    -beaups for giving me the echo comand,so yall didnt need to dump,edit with a hex editor,and copy back
    -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
    *pradeepvizz for getting the ball rolling for t6 users-dumping partitions,testing commands and providing screenshots. make sure to give him a big thanks
    *Jm@n for testing on sprint t6
    *droidrev71 and oneandroidnut for testing vzw t6

    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


    -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:
    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>[COLOR="red"]cd c:\miniadb_m7[/COLOR]
    
    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>[COLOR="red"]adb reboot bootloader[/COLOR]
    
    c:\miniadb_m7>[COLOR="red"]fastboot devices[/COLOR]
    FAxxxxxxxxxx    fastboot
    
    c:\miniadb_m7>[COLOR="red"]fastboot reboot[/COLOR]
    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/mmcblk0p3 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/mmcblk0p3 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





    Please Note:
    *you must remove the tampered banner as well in order for the fingerprint scanner to work.

    remove your tampered banner
    5
    I have created a specific thread citing sources from HTC and Koush in the General forum.

    It has corrected some of my misconceptions. Moreover it has also given me insight into the Device Security.

    ill have a look for that thread in a minute. its easy to understand why there is some confusion. if you "unlock the bootloader" on a moto,samsung,sony,or just about any other manufacturer,you have access to everything. having a security flag,and a "bootloader unlocked" flag is a concept unique to htc.

    s-off means literally security off. this means there are no write protections in place keeping you from modding valuable parts of the device,and having those modifications stick permantly. there are also no securities keeping you from accessing any part of the phones software or firmware. you can flash any file that you wich,to any partition,wether that file is signed by htc or not.

    the bootloader unlock via htcdev is basically htcs answer to lots of crys for s off. when users petitioned for "unlocked bootloaders" they wanted them unlocked ala samsung or moto,or s-off in htc-speak. htcdev is definately not what any of us had in mind when signing those petitions. ;) while its far from s-off,IMO htcdev unlock is better than nothing. most folks simply want to flash roms,or add superuser access to a stock rom,wich is easily possible with htcdev unlock. in htc's defense,a great majority of users are better off not being able to mod anything important(like the bootloader or radios) :eek: at least htc was willing to compromise. htcdev is a reliable means adding of root access to make other exploits work. to an extent,were done with the cat and mouse games of the past where temp root exploits are found an patched. hopefully they continue to offer it.

    first and foremost,if youre s off,you dont need to be htcdev unlocked. no security means you can add a recovery and root any time you wish,no matter how stock you are,what ruu you run,or OTA you take.

    if you unlock while s off,youre "unlocking" partitions that you have access to allready(boot,system,recovery) and you gain the luxury of being able to use the fastboot flash and fastboot boot(in some cases. that option seems to be disapearing) with the partitions that htcdev allows access to. even while s off,the stock ship bootloader still has some restrictions. you cannot fastboot flash radio radio.img or similar.

    again,the ability of fastboot flash to install recovery or boot image is a luxury. you dont need it. any partition can be flashed to an htcdev locked device by packing a properly named image into a zip file with a correctly written android info text document.

    when presented with a file to install,the first thing the phone will do is check the radio secure flag. if it finds it "off" or "00" then it stops there. period. it doesnt care what you install as long as you do it in a manner allowed by the stock ship hboot. the phone finds security to be "on" or "03" then a whole range of other checks are done,including file signiture, main version,bootloader version,CID,MID,lock status,and others im prolly forgetting :p

    so from that,a couple facts:
    -you do need to be s off to modify any partitions where all important data lives. lock flag,radio flag,cid,mid,tamper flag,etc. none can be manipulated manually while s on.
    -you dont need to be s off to flash a rom,kernel,or recovery(but it does make it easier with some devices). techincally htcdev will allow you to do those things while s on.
    -turning the lock flag to locked or unlocked does not remove any securities on an s off phone. an s-off locked htc is equal to an unlocked samsung or moto device.
    -phones do come s off. being s off does not void your warranty,and they cant prove it didnt come that way,if the bootloader is locked,tamper flag removed,and running completely stock software and firmware. i personally would never turn s-on for warranty work.

    if i can think of anything else ill add it,hopefully it cleared up a few things for you guys :)
    3
    _ The day get the One max. I have a lot of thing to do! Repair the House, important pairty, uncle visit, play with unknown usb Max driver to S-off, can't get super Cid with unknow problem read feature to pick and Howto install a rom. And you say me Don't want to search !?
    Or, you can tell me, which the Key !! to help me search my question !? Or Read all the thread - the only way to know that tigh!?
    Any way. Thanks you helpless Answer. Or if you can't help- Just silent. Thank you!

    Its one thing to ask about something you don't understand after making reasonable effort to obtain your own solution. Its quite another to want spoonfed info that you are too busy or lazy to look for.

    the rest of us have busy lives as well,I've no sympathy.

    Guess your max will just have to wait until you have some free time to read the reomended thread.

    Sent from my HTC6435LVW using Tapatalk
    3
    hmmmm by looks of it you have to unlock with htc dev first to get s off, trying to install custom recovery without bootloader ulocked gives you an error
    C:\max>fastboot flash zip recovery.zip
    target reported max download size of 1554698240 bytes
    sending 'zip' (7553 KB)...
    OKAY [ 1.143s]
    writing 'zip'...
    (bootloader) signature checking...
    FAILED (remote: 12 signature verify fail)
    finished. total time: 1.944s

    correct. youll need to be s off to install recovery as a zip file while locked.

    custom made recovery zips do not have htc's official signiture required for s on flashing.
    3
    Hi Folks,

    Sorry for the delay. I was learning a new module for C# which has explicit Android Controlls built in such as Fastboot and Adb commands so my program would not need any additional files such as Fastboot.exe and Adb.exe.

    I have it coded and I am just in the testing phase now. I plan on adding some additional information such as device detection and application path awareness in future builds but I want to get a beta out. I am working with a android C# dev to debug one line of code I am still having trouble with and Hopefully will have a release today.

    Just some prerequisite warnings:

    You will need:

    A windows Operating System (Windows 7 Preferred)
    This is a unsigned customer app so AV may flag it because of the unsigned nature
    You will need HTC Drivers installed on your machine
    You will need S-Off on your Device
    You will need superuser on your device
    Because Root Shell is invoked as part of the process you will need to Grant Root on your phone when prompted.

    Thanks,