FORUMS
Remove All Ads from XDA

[MOD] OnePlus One Unlocker: Reset Unlock & Tamper Bit

357 posts
Thanks Meter: 415
 
By Mnt-XDA, Senior Member on 19th July 2014, 06:41 AM
Post Reply Email Thread

Reset Unlock & Tamper Bit for OnePlus One



My Friend @Polarfuchs has confirmed that our unlocker zips are working fine, after new CM11S 30O OTA update.
see post -- http://forum.xda-developers.com/show...&postcount=182

==================== IGONE THIS WARNING ==========================
!!! Warning !!!

In the NEW OTA CM11S XNPH30O, the bootloader (aboot) img size changed....

We request all not to apply the unlocker scripts on the new bootloader , until we confirm/find the new bit position.

It might brick your phone and corrupt bootloader...



Quote:

INTRO / CONCEPT

Most of us know that we can flash custom roms or can root device only after UNLOCKING the bootloader from fastboot mode.
If you relock your bootloader, you will need to do a full backup-and-restore whenever you decide to unlock it again.

This mod will allow you to unlock the bootloader without wiping the userdata as oppose to fastboot oem unlock command.

================================================== ==========================
Note:

Many users having trouble to UNLOCK their device for the FIRST TIME by using this script.
Let me clarify few things for this mod.

The main purpose of this script is not UNLOCK Bootloader without wiping data.
It's main purpose is to reset tamper bit, which can not be done by any other way.
UNLOCK Bootloader without wiping data -- is another outcome of this MOD.


If you have not unlocked your device before (atleast for 1 time) by using command "fastboot oem unlock", then the script might not work for you.

In case your device is locked and you want to install this script from custom recovery like TWRP/CWM,
it will be possible only if, you can boot temporarily using command -- fastboot boot <custom_recovery.img>.
If this command failed, you will not be able to run the unlocker script and hence device will not be unlocked without wiping data

In which condition the device can be booted to custom recovery by using command -- fastboot boot <custom_recovery.img>, is still not very clear.

before running the command , check your device status "fastboot oem device-info"
and report your error with the following points
1) Did you unlock your device before by any means ? (or by fastboot oem unlock) ?
2) What is the recovery already installed in your device ?
3) What is the status of your device ? "fastboot oem device-info"
4) What error msg you got when tried to run command
fastboot boot <custom_recovery.img>.
5) Steps you tried.

There are 4 possibilities of the the value set of the 2 bits ( unlock bit & tamper bit)
1) Unlock Bit - FALSE , Tamper Bit - FALSE
2) Unlock Bit - FALSE , Tamper Bit - TRUE
3) Unlock Bit - TRUE, Tamper Bit - FALSE
4) Unlock Bit - TRUE, Tamper Bit - TRUE


After getting proper error report from you , we can give confirmation about, in which of the above state,
fastboot boot <custom_recovery.img> will work and hence installing the unlocker script/mod/zip can help you to
UNLOCK your Bootloader without wiping DATA.

Kindly report your issues as I mentioned above...

Thanks

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

There are generally 2 bits present on some partition of the phone for keeping track of unlocking.
1) lock / unlock bit
2) tamper bit


Both bits are initially FASLE. We can unlock bootloader by using command
Code:
fastboot oem unlock
and can see the device information by
Code:
fastboot oem device-info
like: Click image for larger version

Name:	11.jpg
Views:	34101
Size:	35.1 KB
ID:	2859144

Once you unlock, both bits will come TRUE. This mod will write the 2 bits in aboot partition and can reset
both bits (TOGGLE Bcsically) without factory reset as opposed to fastboot command fastboot oem unlock

So for One Plus One...
Code:
Partition - aboot (bootloader)
Unlock Bit Position - 0x000FFE10 Hex - (1048080) Decimal   
Tamper Bit Position - 0x000FFE14 Hex - (1048084) Decimal
By @Polarfuchs

Click image for larger version

Name:	22.jpg
Views:	32854
Size:	166.3 KB
ID:	2859161



Quote:

CREDIT

Credit to our Senior Member @Polarfuchs for finding out the partition & hex position that store the bits
Actually we both tested this concept and modified the script by @osm0sis and applied on our devices and got success.
We just added support for OnePlusOne (A0001)

You can check the following threads ...

1) http://forum.xda-developers.com/show....php?t=2796286
2) http://forum.xda-developers.com/show...3&postcount=11
3) http://forum.xda-developers.com/show...&postcount=395

But it is in Beta State, may be more testing required, we will make an app for it like Nexus 5 Unlocker later...

Main Credit goes to our Recognized Contributor @osm0sis for his Nexus BootUnlocker script, flashable from recovery
http://forum.xda-developers.com/show....php?t=2239421

Thank you Sir - @osm0sis



Quote:

WARNNING


Since this mod writes on aboot (bootloader) partition to reset the 2 flags, it may brick your phone.
Requesting developers to test it first, then give feedback here. After that any normal user can use it.
We will not be responsible for any damage or bricking of your phone. Install this zip at your own risk.


Edit:
Many users tried this and we can say that it is working , not beta anymore ...



Quote:

DOWNLOAD

This script can be installed from CWM / TWRP recovery

Another trick for installation is

Code:
fastboot boot <path/name of the recovery twrp img>

It will boot your phone into recovery once from the recovery image
stored in your PC temporarily 
then you can flash the zip either by sideload or from sdcard...
Download Here : OnePlusOne-BootUnlocker.zip

Download Bootloader lock-unlock Toggle Only Script OnePlusOne-OnlyBootloaderToggle.zip (not tested yet)

Download Tamper Bit Toggle Only Script OnePlusOne-OnlyTamperBitToggle.zip (not tested yet)



Quote:

THANK YOU ALL

If you like this MOD please hit thanks button
Thank you all...
The Following 126 Users Say Thank You to Mnt-XDA For This Useful Post: [ View ] Gift Mnt-XDA Ad-Free
 
 
19th July 2014, 06:35 PM |#2  
tkdsl's Avatar
XDA TV Producer / Portal Team / Forum Leader
Flag Los Angeles
Thanks Meter: 72
 
More
Worked for me when I was on locked bootloader and twrp and I could not unlock the bootloader with Fastboot OEM unlock

thank you
The Following 2 Users Say Thank You to tkdsl For This Useful Post: [ View ] Gift tkdsl Ad-Free
19th July 2014, 06:54 PM |#3  
Quote:
Originally Posted by tkdsl

Worked for me when I was on locked bootloader and twrp and I could not unlock the bootloader with Fastboot OEM unlock

thank you

Thank you for your feedback...
The Following User Says Thank You to Mnt-XDA For This Useful Post: [ View ] Gift Mnt-XDA Ad-Free
19th July 2014, 07:53 PM |#4  
Senior Member
Thanks Meter: 885
 
More
Awesome work, it solved this issue:
http://forum.xda-developers.com/onep...t2817735/page2

Thanks for implementing this and thanks to @Polarfuchs for finding out the flags location.
The Following User Says Thank You to drakester09 For This Useful Post: [ View ] Gift drakester09 Ad-Free
19th July 2014, 11:06 PM |#5  
Senior Member
Thanks Meter: 34
 
More
It worked for me as well, thanks!
20th July 2014, 03:00 AM |#6  
Scann69's Avatar
Senior Member
Flag Kuala Lumpur, Malaysia
Thanks Meter: 71
 
More
Works great on my device. Problem solved

Time to start flashing again and now i need not worry anymore cos if bootloader gets locked....the solution is right here
20th July 2014, 03:09 AM |#7  
Senior Member
Flag City of Freeway
Thanks Meter: 97
 
More
Question Flash by TRWP/CWM
Quote:
Originally Posted by Scann69

Works great on my device. Problem solved

Time to start flashing again and now i need not worry anymore cos if bootloader gets locked....the solution is right here

Do you just need to flash thru custom recoveries?
20th July 2014, 03:22 AM |#8  
Scann69's Avatar
Senior Member
Flag Kuala Lumpur, Malaysia
Thanks Meter: 71
 
More
Quote:
Originally Posted by paztine

Do you just need to flash thru custom recoveries?

Yes. In my case I was stuck with TWRP recovery but it worked.
The Following User Says Thank You to Scann69 For This Useful Post: [ View ] Gift Scann69 Ad-Free
20th July 2014, 03:25 AM |#9  
Senior Member
Flag City of Freeway
Thanks Meter: 97
 
More
Quote:
Originally Posted by Scann69

Yes. In my case I was stuck with TWRP recovery but it worked.

Thanks for a quick answer..
20th July 2014, 04:20 AM |#10  
Quote:
Originally Posted by drakester09

Awesome work, it solved this issue:
http://forum.xda-developers.com/onep...t2817735/page2

Thanks for implementing this and thanks to @Polarfuchs for finding out the flags location.

Quote:
Originally Posted by sayeef

It worked for me as well, thanks!

Quote:
Originally Posted by Scann69

Works great on my device. Problem solved

Time to start flashing again and now i need not worry anymore cos if bootloader gets locked....the solution is right here

Thank you all friends...

Quote:
Originally Posted by paztine

Do you just need to flash thru custom recoveries?

Yes, But if you don't have custom recovery installed...
you can try
Code:
fastboot boot   <path/name of the recovery twrp img stored in your pc>
The Following 2 Users Say Thank You to Mnt-XDA For This Useful Post: [ View ] Gift Mnt-XDA Ad-Free
22nd July 2014, 06:09 PM |#11  
Senior Member
Flag New York
Thanks Meter: 143
 
More
I love this fix! Love it!
It absolutely cured my issue for not being able to unlock my bootloader as described here:
http://forum.xda-developers.com/onep...ooted-t2820341
The Following User Says Thank You to lemonspeakers For This Useful Post: [ View ] Gift lemonspeakers Ad-Free
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes