[how to]reset your lock status flag

Search This thread

scotty1223

Inactive Recognized Contributor
Jan 3, 2011
2,813
3,056
first and formost special thanks CastleBravo,without whos testing and help in this thread,this would not have happened so quickly. he asked all the right questions,and gave others all the right answers while i was at work and couldnt respond. also to treadwayj,who dumped mmcblk0p3 from his still locked phone for comparison,providing valuable confirmation.

since the current s-off method is not resetting the "lock status" flag,i thot there would be a need for this.

i happened across this thread inthe gsm evo 3d forum: http://xdaforums.com/showthread.php?t=1970252 and found it to work on the rezound,inc 4g,sensation 4g,cdma evo 3d,MT4GS,Amaze 4g,one s,droid DNA,and prolly several others.

this does NOT mean you can unlock your bootloader without going thru htcdev. all this means,is that if your bootloader is unlocked after s-off,you can get rid of the relocked watermark and get back to 100% locked prior to s-on for legitimate warranty purposes.

ive always been unlocked. for S&Gs,i dumped mmcblk0p3 and found the described "HTCU" at 0x8404. changed it to 0x00000000 and voila! back to locked :cool:

afterward,relfashed my origianl mmcblk0p3,wich brought me back to unlocked with no getting or flashing tokens.

this is NOT a patched or hex edited hboot.again,this is ONLY to get back your original ***locked*** status.

*this is for s-off phones only

2 ways to do it:

1)old school
this assumes you to have drivers,adb/fastboot,a hex editor,a fair understanding about what youre doing,and the ability to follow directions on the linked thread

Code:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\Scott>[COLOR="Red"]cd c:\mini-adb_vigor[/COLOR]

c:\mini-adb_vigor>[COLOR="red"]adb devices[/COLOR]
* daemon not running. starting it now *
* daemon started successfully *
List of devices attached
HTxxxxxxxxxx    device


c:\mini-adb_vigor>[COLOR="Red"]adb shell[/COLOR]
shell@android:/ $ [COLOR="red"]su[/COLOR]
su
shell@android:/ # [COLOR="red"]dd if=/dev/block/mmcblk0p3 of=/sdcard2/mmcblk0p3[/COLOR]
dd if=/dev/block/mmcblk0p3 of=/sdcard2/mmcblk0p3
64734+0 records in
64734+0 records out
33143808 bytes transferred in 9.519 secs (3481858 bytes/sec)
shell@android:/ # [COLOR="red"]exit[/COLOR]
exit
shell@android:/ $ [COLOR="red"]exit[/COLOR]
exit

c:\mini-adb_vigor>[COLOR="red"]adb pull /sdcard2/mmcblk0p3[/COLOR]
2292 KB/s (33143808 bytes in 14.116s)

[COLOR="Blue"]*modify mmcblk0p3 with a hex editor[/COLOR]

c:\mini-adb_vigor>[COLOR="Red"]adb push mmcblk0p3mod /sdcard2/mmcblk0p3mod[/COLOR]
2478 KB/s (33143808 bytes in 13.059s)

c:\mini-adb_vigor>[COLOR="red"]adb shell[/COLOR]
shell@android:/ $ [COLOR="red"]su[/COLOR]
su
shell@android:/ # [COLOR="red"]dd if=/sdcard2/mmcblk0p3mod of=/dev/block/mmcblk0p3[/COLOR]
dd if=/sdcard2/mmcblk0p3mod of=/dev/block/mmcblk0p3
64734+0 records in
64734+0 records out
33143808 bytes transferred in 18.937 secs (1750214 bytes/sec)
shell@android:/ #[COLOR="red"] exit[/COLOR]
exit
shell@android:/ $ [COLOR="red"]exit[/COLOR]
exit

c:\mini-adb_vigor>[COLOR="red"]adb reboot bootloader[/COLOR]

c:\mini-adb_vigor>

2)noob friendly
-download the appropriate zips,place on sd card.
-boot to recoverywipe cache/dalvik
-flash in recovery. i recomend to run query first,to make sure its working. tested on my personal one s,amaze,jetstream,rezound,inc) 4g,sensation,MT4GS,and gsm evo 3d. tested by castlebravo on DNA.

query:query_bootloader.zip
query_bootloader.zip f335f78f9f46469c823da0c671026de5

unlock:unlock_bootloader.zip
unlock_bootloader.zip f335f78f9f46469c823da0c671026de5

lock:lock_bootloader.zip
lock_bootloader.zip f335f78f9f46469c823da0c671026de5

a little bit of explanation. yes,the md5s are all the same. its the same file,just named differently. the script behaves based on the name of the zip. i knew if i only included 1 download and instructed folks to change the name there would be confusion,so this is my attempt to keep it simple. feel free to download one file and just change the name to make the other zips.

it also works to make your phone relocked if for some reason you want it that way(rename relock_bootloader.zip). i didnt include a zip for that because i figued there would be no demand.

before:
droiddna_hboot_unlocked_zps57858000.jpg


after:
droiddna_hboot_locked_zps8e85b8f9.jpg


sure,i could have easily faked the above photos,but i dint. ;)

again,all credit goes to s trace on the above thread,be sure to click the thanks button on his post. all i did was remove the device check per his instruction. DO NOT flash on other devices without checking for the proper location of the lock flag first.

DISCLAIMER:this is not my work. i have tested it on my own device,but use it at your own risk. if it melts your phone into a lil pile of goo,its not my fault.

enjoy :)

special thanks
-CastleBravo for testing and suport on the original test thread,as well as the pics you see here
-treadwayj for dumping mmcblk0p3 from his still locked phone.
-brian for unlocking his bootloader,then dumping mmcblock0p3 to make sure it would work for cdma evo3d phones too :cool:
-brian and donb for fearless testing of the zip files on evo3d cdma :D
 
Last edited:

mopartonyg

Senior Member
Jan 19, 2011
1,546
459
L.A. Area
Scotty thanks. I read in the other thread that u needed to be on the stock bootloader/hboot and not the eng/hboot. It said u would hard brick your phone if on the eng/hboot. do u know if that is true?
 

.torrented

Senior Member
Mar 7, 2011
2,789
1,484
32
www.cyanfox-rom.com
Scotty thanks. I read in the other thread that u needed to be on the stock bootloader/hboot and not the eng/hboot. It said u would hard brick your phone if on the eng/hboot. do u know if that is true?

You need to be on stock bootloader to s-on or it will brick if you are using the eng hboot

Sent from my HTC6435LVW using XDA Premium HD app
 
  • Like
Reactions: scotty1223

scotty1223

Inactive Recognized Contributor
Jan 3, 2011
2,813
3,056
Scotty thanks. I read in the other thread that u needed to be on the stock bootloader/hboot and not the eng/hboot. It said u would hard brick your phone if on the eng/hboot. do u know if that is true?

Wat are you refering to? As the pics show,the zips work with the eng hboot.

If your asking about turning on the secureflag,do NOT do that on an eng signed or patched boot.

Sent from my ADR6425LVW using Tapatalk 2
 

Lykarsis

Senior Member
Oct 9, 2012
328
56
31
Gahanna
I'm assuming that as long as you are s–off, there is no need to have an unlocked bootloader?

Sent from my HTC6435LVW using Tapatalk 2
 

CastleBravo

Senior Member
Dec 29, 2011
103
50
Los Angeles
I'm assuming that as long as you are s–off, there is no need to have an unlocked bootloader?

Sent from my HTC6435LVW using Tapatalk 2

If you have a SHIP hboot, then unlock will allow you access to more fastboot commands. If you have an ENG hboot, then there isn't a need for unlock. With s-off, lock/unlock status can always be changed when necessary.

Sent from my ViperROM HTC Droid DNA
 
  • Like
Reactions: scotty1223

gwallers

Senior Member
Jun 25, 2010
157
29
So help me understand this... I still am on the stock SHIP HBOOT and I have the tampered and unlocked badge with s-off. If I want I can use the lock zip and it will lock my bootloader and clear the badges but I will be able to continue to flash and mod my phone with radios and what not as i am now? sorry if this sounds repetitive just trying to get a good understanding before i flash anything...
 
Last edited:

.torrented

Senior Member
Mar 7, 2011
2,789
1,484
32
www.cyanfox-rom.com
So help me understand this... I still am on the stock SHIP HBOOT and I have the tampered and unlocked badge with s-off. If I want I can use the lock zip and it will lock my bootloader and clear the badges but I will be able to continue to flash and mod my phone with radios and what not as i am now? sorry if this sounds repetitive just trying to get a good understanding before i flash anything...

If you Lock it and still have S-OFF you should be able to still flash stuff like radios but im not 100% certain
 

CastleBravo

Senior Member
Dec 29, 2011
103
50
Los Angeles
So help me understand this... I still am on the stock SHIP HBOOT and I have the tampered and unlocked badge with s-off. If I want I can use the lock zip and it will lock my bootloader and clear the badges but I will be able to continue to flash and mod my phone with radios and what not as i am now? sorry if this sounds repetitive just trying to get a good understanding before i flash anything...

Stock, locked hboot with s-off: not all fastboot commands will be available (mostly radio related), but you can still flash roms etc as normal.

Stock, unlocked hboot with s-off: bootloader will allow more fastboot commands, but still not as much as an engineering hboot.

ENG hboot, unlocked or locked, with s-off: all fastboot commands are available, and there's nothing it will prevent you from doing. ENG hboot doesn't care about locked or unlocked status.

With s-off, the locked/unlocked status can be changed any time if you change your mind. The tampered flag will be reset if you flash another hboot.

Sent from my ViperROM HTC Droid DNA
 

bsSkunkApe

Senior Member
Jan 15, 2009
194
27
This will be reset when you flash a new hboot.


Sent from my ViperROM HTC Droid DNA

I flashed to the ENG hboot then back to the ship hboot and my **tampered** flag came back when I flashed back to the ship hboot. Do I have to be locked for it to stay gone?

Sent from my HTC6435LVW using Tapatalk 2
 
Last edited:

lazarus2297

Senior Member
Sep 2, 2010
907
134
North Carolina
I flashed to the ENG hboot then back to the ship hboot and my **tampered** flag came back when I flashed back to the ship hboot. Do I have to be locked for it to stay gone?

Sent from my HTC6435LVW using Tapatalk 2


I think the **tampered** flag also reflects you having a custom recovery.. if you flashed the stock recovery that *should* go away.. but with stock recovery you can't do anything fun :D
 

scotty1223

Inactive Recognized Contributor
Jan 3, 2011
2,813
3,056
I flashed to the ENG hboot then back to the ship hboot and my **tampered** flag came back when I flashed back to the ship hboot. Do I have to be locked for it to stay gone?

Sent from my HTC6435LVW using Tapatalk 2

That's a new one on me. Never seen tampered come back while s off. Maybe it has something to.do with the eng signed hboot. Flash an older ship hboot,then back to the current one.

If that doesn't work,make a backup,run an ruu,reinstall recovery,restore backup.

Every s off phone I own is unlocked and not tampered,so unless DNA is different you don't need to be locked or stock recovery to keep it gone.

Just make sure you understand that in your quest for a tamper free hboot,that your phone will not function without a bootloader. As such,changing them out will always carry a degree of risk,no matter how careful you are. I'm not an advocate of messing with bootloaders or radios for no real reason.

Sent from my HTC PG09410 using xda app-developers app
 
  • Like
Reactions: bsSkunkApe

.torrented

Senior Member
Mar 7, 2011
2,789
1,484
32
www.cyanfox-rom.com
That's a new one on me. Never seen tampered come back while s off. Maybe it has something to.do with the eng signed hboot. Flash an older ship hboot,then back to the current one.

If that doesn't work,make a backup,run an ruu,reinstall recovery,restore backup.

Every s off phone I own is unlocked and not tampered,so unless DNA is different you don't need to be locked or stock recovery to keep it gone.

Just make sure you understand that in your quest for a tamper free hboot,that your phone will not function without a bootloader. As such,changing them out will always carry a degree of risk,no matter how careful you are. I'm not an advocate of messing with bootloaders or radios for no real reason.

Sent from my HTC PG09410 using xda app-developers app

Are you on a stock kernel

Sent from my HTC6435LVW using XDA Premium HD app
 

Top Liked Posts

  • There are no posts matching your filters.
  • 13
    first and formost special thanks CastleBravo,without whos testing and help in this thread,this would not have happened so quickly. he asked all the right questions,and gave others all the right answers while i was at work and couldnt respond. also to treadwayj,who dumped mmcblk0p3 from his still locked phone for comparison,providing valuable confirmation.

    since the current s-off method is not resetting the "lock status" flag,i thot there would be a need for this.

    i happened across this thread inthe gsm evo 3d forum: http://xdaforums.com/showthread.php?t=1970252 and found it to work on the rezound,inc 4g,sensation 4g,cdma evo 3d,MT4GS,Amaze 4g,one s,droid DNA,and prolly several others.

    this does NOT mean you can unlock your bootloader without going thru htcdev. all this means,is that if your bootloader is unlocked after s-off,you can get rid of the relocked watermark and get back to 100% locked prior to s-on for legitimate warranty purposes.

    ive always been unlocked. for S&Gs,i dumped mmcblk0p3 and found the described "HTCU" at 0x8404. changed it to 0x00000000 and voila! back to locked :cool:

    afterward,relfashed my origianl mmcblk0p3,wich brought me back to unlocked with no getting or flashing tokens.

    this is NOT a patched or hex edited hboot.again,this is ONLY to get back your original ***locked*** status.

    *this is for s-off phones only

    2 ways to do it:

    1)old school
    this assumes you to have drivers,adb/fastboot,a hex editor,a fair understanding about what youre doing,and the ability to follow directions on the linked thread

    Code:
    Microsoft Windows [Version 6.1.7601]
    Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
    
    C:\Users\Scott>[COLOR="Red"]cd c:\mini-adb_vigor[/COLOR]
    
    c:\mini-adb_vigor>[COLOR="red"]adb devices[/COLOR]
    * daemon not running. starting it now *
    * daemon started successfully *
    List of devices attached
    HTxxxxxxxxxx    device
    
    
    c:\mini-adb_vigor>[COLOR="Red"]adb shell[/COLOR]
    shell@android:/ $ [COLOR="red"]su[/COLOR]
    su
    shell@android:/ # [COLOR="red"]dd if=/dev/block/mmcblk0p3 of=/sdcard2/mmcblk0p3[/COLOR]
    dd if=/dev/block/mmcblk0p3 of=/sdcard2/mmcblk0p3
    64734+0 records in
    64734+0 records out
    33143808 bytes transferred in 9.519 secs (3481858 bytes/sec)
    shell@android:/ # [COLOR="red"]exit[/COLOR]
    exit
    shell@android:/ $ [COLOR="red"]exit[/COLOR]
    exit
    
    c:\mini-adb_vigor>[COLOR="red"]adb pull /sdcard2/mmcblk0p3[/COLOR]
    2292 KB/s (33143808 bytes in 14.116s)
    
    [COLOR="Blue"]*modify mmcblk0p3 with a hex editor[/COLOR]
    
    c:\mini-adb_vigor>[COLOR="Red"]adb push mmcblk0p3mod /sdcard2/mmcblk0p3mod[/COLOR]
    2478 KB/s (33143808 bytes in 13.059s)
    
    c:\mini-adb_vigor>[COLOR="red"]adb shell[/COLOR]
    shell@android:/ $ [COLOR="red"]su[/COLOR]
    su
    shell@android:/ # [COLOR="red"]dd if=/sdcard2/mmcblk0p3mod of=/dev/block/mmcblk0p3[/COLOR]
    dd if=/sdcard2/mmcblk0p3mod of=/dev/block/mmcblk0p3
    64734+0 records in
    64734+0 records out
    33143808 bytes transferred in 18.937 secs (1750214 bytes/sec)
    shell@android:/ #[COLOR="red"] exit[/COLOR]
    exit
    shell@android:/ $ [COLOR="red"]exit[/COLOR]
    exit
    
    c:\mini-adb_vigor>[COLOR="red"]adb reboot bootloader[/COLOR]
    
    c:\mini-adb_vigor>

    2)noob friendly
    -download the appropriate zips,place on sd card.
    -boot to recoverywipe cache/dalvik
    -flash in recovery. i recomend to run query first,to make sure its working. tested on my personal one s,amaze,jetstream,rezound,inc) 4g,sensation,MT4GS,and gsm evo 3d. tested by castlebravo on DNA.

    query:query_bootloader.zip
    query_bootloader.zip f335f78f9f46469c823da0c671026de5

    unlock:unlock_bootloader.zip
    unlock_bootloader.zip f335f78f9f46469c823da0c671026de5

    lock:lock_bootloader.zip
    lock_bootloader.zip f335f78f9f46469c823da0c671026de5

    a little bit of explanation. yes,the md5s are all the same. its the same file,just named differently. the script behaves based on the name of the zip. i knew if i only included 1 download and instructed folks to change the name there would be confusion,so this is my attempt to keep it simple. feel free to download one file and just change the name to make the other zips.

    it also works to make your phone relocked if for some reason you want it that way(rename relock_bootloader.zip). i didnt include a zip for that because i figued there would be no demand.

    before:
    droiddna_hboot_unlocked_zps57858000.jpg


    after:
    droiddna_hboot_locked_zps8e85b8f9.jpg


    sure,i could have easily faked the above photos,but i dint. ;)

    again,all credit goes to s trace on the above thread,be sure to click the thanks button on his post. all i did was remove the device check per his instruction. DO NOT flash on other devices without checking for the proper location of the lock flag first.

    DISCLAIMER:this is not my work. i have tested it on my own device,but use it at your own risk. if it melts your phone into a lil pile of goo,its not my fault.

    enjoy :)

    special thanks
    -CastleBravo for testing and suport on the original test thread,as well as the pics you see here
    -treadwayj for dumping mmcblk0p3 from his still locked phone.
    -brian for unlocking his bootloader,then dumping mmcblock0p3 to make sure it would work for cdma evo3d phones too :cool:
    -brian and donb for fearless testing of the zip files on evo3d cdma :D
    4
    So help me understand this... I still am on the stock SHIP HBOOT and I have the tampered and unlocked badge with s-off. If I want I can use the lock zip and it will lock my bootloader and clear the badges but I will be able to continue to flash and mod my phone with radios and what not as i am now? sorry if this sounds repetitive just trying to get a good understanding before i flash anything...

    Stock, locked hboot with s-off: not all fastboot commands will be available (mostly radio related), but you can still flash roms etc as normal.

    Stock, unlocked hboot with s-off: bootloader will allow more fastboot commands, but still not as much as an engineering hboot.

    ENG hboot, unlocked or locked, with s-off: all fastboot commands are available, and there's nothing it will prevent you from doing. ENG hboot doesn't care about locked or unlocked status.

    With s-off, the locked/unlocked status can be changed any time if you change your mind. The tampered flag will be reset if you flash another hboot.

    Sent from my ViperROM HTC Droid DNA
    3
    Just to make sure...this is just changing the text, correct?

    No. It s making you out of the box,stock locked.

    Sent from my ADR6425LVW using Tapatalk 2
    2
    I flashed to the ENG hboot then back to the ship hboot and my **tampered** flag came back when I flashed back to the ship hboot. Do I have to be locked for it to stay gone?

    Sent from my HTC6435LVW using Tapatalk 2


    I think the **tampered** flag also reflects you having a custom recovery.. if you flashed the stock recovery that *should* go away.. but with stock recovery you can't do anything fun :D