[ONE Android Development] Mnt-XDA:
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://xdaforums.com/showpost.php?p=54827475&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...

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

fastboot oem unlock

and can see the device information by

fastboot oem device-info

like: View attachment 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...

Partition - aboot (bootloader)
Unlock Bit Position - 0x000FFE10 Hex - (1048080) Decimal
Tamper Bit Position - 0x000FFE14 Hex - (1048084) Decimal

By @Polarfuchs

View attachment 2859161

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://xdaforums.com/showthread.php?t=2796286

2) http://xdaforums.com/showpost.php?p=54060253&postcount=11

3) http://xdaforums.com/showpost.php?p=54060141&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://xdaforums.com/showthread.php?t=2239421

Thank you Sir - @osm0sis

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 ...

This script can be installed from CWM / TWRP recovery

Another trick for installation is

[B]fastboot boot <path/name of the recovery twrp img>[/B]

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 : View attachment 2859187

Download Bootloader lock-unlock Toggle Only Script View attachment 2876403 (not tested yet)

Download Tamper Bit Toggle Only Script View attachment 2876404 (not tested yet)

If you like this MOD please hit thanks button :)

Thank you all...