• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!
  • Fill out your device list and let everyone know which phones you have!    Edit Your Device Inventory

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

Search This thread

Mjallo

Member
Aug 13, 2009
21
0
Hmm man, then I'm sorry, but I have no idea :(
In 2:38 after "unlock" the One should be "Unlocked = True".
Its very strange, that it is " False" again.
Does One reboot after U hit "fastboot unlock" or nothing happened on device?
It reboots the device when "fastboot oem unlock" have been run. Thats why is have read this thread and tried to flip the bits so it was possible to make it false again. My research have showed that it may be a borked update from one Cyanogen edition to another that have caused the flip
 

djha53k

Senior Member
Aug 19, 2014
596
116
Prague
www.investicnigramotnost.cz
It reboots the device when "fastboot oem unlock" have been run. Thats why is have read this thread and tried to flip the bits so it was possible to make it false again. My research have showed that it may be a borked update from one Cyanogen edition to another that have caused the flip
It is very wiered, should not be like this :(
I'm truly sorry, but seems I could not help you. I thought I have seen all fastboot errors already, but seems you have found another level of this...

It just popuped in my mind...
U might give try to install CM11 recovery image to overwrite all partitions and try this again. I just remember that it helped me once as well. Just get the original CM11 fastboot recovery image and overwrite whole mobile by that...
 

Mjallo

Member
Aug 13, 2009
21
0
It is very wiered, should not be like this :(
I'm truly sorry, but seems I could not help you. I thought I have seen all fastboot errors already, but seems you have found another level of this...

It just popuped in my mind...
U might give try to install CM11 recovery image to overwrite all partitions and try this again. I just remember that it helped me once as well. Just get the original CM11 fastboot recovery image and overwrite whole mobile by that...
Will try using CM12 recovery image https://download.cyanogenmod.org/?device=bacon
Will use CM11 Image if you know where to get that.

---------- Post added at 11:26 PM ---------- Previous post was at 11:21 PM ----------

Will try using CM12 recovery image https://download.cyanogenmod.org/?device=bacon
Will use CM11 Image if you know where to get that.
Yeah same results with the CM12 image.

I'm starting to think I maybe just should sell it because the screen and case is fine and someone maybe need that, but I would love to fix it
 

santhosragav

New member
Sep 19, 2013
2
0
device unlocked false

1) Did you unlock your device before by any means ? (or by fastboot oem unlock) ? ya unlocked oem but it says u r not rooted ur device
2) What is the recovery already installed in your device ? cm13
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>. FAILED (remote: Device not unlocked cannot flash or erase)
5) Steps you tried. tried al the steps but no use
 

Attachments

  • Untitled.jpg
    Untitled.jpg
    66.8 KB · Views: 306

piriri007

Member
Aug 22, 2008
11
0
hello,

also the same problem:

1) Did you unlock your device before by any means ? (or by fastboot oem unlock) ? UNLOCKED with fastboot oem unlocked. Phone rooted.
2) What is the recovery already installed in your device ? twrp 3.0.2
3) What is the status of your device ?
- i can only access to fastboot screen in phone and i can do fastboot commands in pc;
- command 'fastboot oem unlock' doesn't work (error: FAILED (remote: oem unlock is disabled) )
- command 'fastboot flash recovery <flash.zip>' doesn't work (error: FAILED (remote: Device not unlocked cannot flash or erase))
- all adb commands say: "error: device not found"
- i can't access twrp recovery for use adb sideload (with VOL DOWN+POWER the phone freezes with 1+ icon in screen)
- i can't access Android (on booting phone freezes with 1+ icon in screen)

C:\adb>fastboot oem device-info
...
(bootloader) Device tampered: false
(bootloader) Device unlocked: false
(bootloader) Charger screen enabled: false
(bootloader) Display panel:
(bootloader) console_enabled: 0
(bootloader) exec_console_unconsole: 0
OKAY [ 0.000s]
finished. total time: 0.000s

4) What error msg you got when tried to run command fastboot boot <custom_recovery.img>. FAILED (remote: Device not unlocked cannot flash or erase)
5) Steps you tried. tried al the steps but no use


Can anyone please help?
thanks
 

Lanchon

Senior Member
Jun 19, 2011
2,712
4,465
hello,

also the same problem:

1) Did you unlock your device before by any means ? (or by fastboot oem unlock) ? UNLOCKED with fastboot oem unlocked. Phone rooted.
2) What is the recovery already installed in your device ? twrp 3.0.2
3) What is the status of your device ?
- i can only access to fastboot screen in phone and i can do fastboot commands in pc;
- command 'fastboot oem unlock' doesn't work (error: FAILED (remote: oem unlock is disabled) )
- command 'fastboot flash recovery <flash.zip>' doesn't work (error: FAILED (remote: Device not unlocked cannot flash or erase))
- all adb commands say: "error: device not found"
- i can't access twrp recovery for use adb sideload (with VOL DOWN+POWER the phone freezes with 1+ icon in screen)
- i can't access Android (on booting phone freezes with 1+ icon in screen)

C:\adb>fastboot oem device-info
...
(bootloader) Device tampered: false
(bootloader) Device unlocked: false
(bootloader) Charger screen enabled: false
(bootloader) Display panel:
(bootloader) console_enabled: 0
(bootloader) exec_console_unconsole: 0
OKAY [ 0.000s]
finished. total time: 0.000s

4) What error msg you got when tried to run command fastboot boot <custom_recovery.img>. FAILED (remote: Device not unlocked cannot flash or erase)
5) Steps you tried. tried al the steps but no use


Can anyone please help?
thanks

this thread can't help you so don't post here anymore.
this thread is for people that want to change the lock status of their phone having root access to it.
you dont have root access; you dont have any access at all.

you have 2 options:

1) recover as if hard-bricked using the colorOS magic files. google and read carefully.
i wont answer any questions regarding 1) that you miss-post on this thread.

2) otherwise you could do this:
-it is simpler but hasn't been done by anyone to the best of my knowledge; but should work.
-you need to have a tinkerer's mindset and prepare to go through uncharted territory.
-you need linux and experience using linux tools.
-you should post on this thread ONLY IF YOU CHOOSE OPTION 2): if you choose option 2) what you do is relevant to this thread.
-you wont loose your data if you do this.
-i can't help you.
-this is what you should do:
a) get your opo to power on in QHSUSB_BULK mode. google; i think it requires the phone being off, then holding down some button (not the power button), and then plugging it to a computer.
b) once in QHSUSB_BULK mode you should be able to access the device partitions from the PC. immediately back up images of all the partitions you think are valuable (using 'dd' or the 'Disks' GUI tool in linux mint for instance). most important is the partition where IMEI is stored (google). also important might be userdata, where all your files are.
c) now read this thread carefully. you will see that the flashable script just toggles 1 bit in one partition to lock and unlock the device.
d) to unlock the device, you just need to toggle this bit from the PC. you can use code similar to the one used in the flashable script because in QHSUSB_BULK mode the partitions will be visible to the PC's kernel. you can pull an image of the relevant partition to the PC and test your code against the image before running it against the real device. you can make the image file appear as a real device partition using a loop device or the disk image mounter GUI in linux mint (right click on the *.img file, then go see the device in 'Disks' (and you can unmount it from there)).
e) now reboot to fastboot and your device should be unlocked. flash a recovery, reboot recovery, and start setting up your phone again.
 
  • Like
Reactions: tavocabe

polinatirohit

Member
Apr 26, 2017
7
0

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/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
Code:
fastboot oem unlock
and can see the device information by
Code:
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...
Code:
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://forum.xda-developers.com/showthread.php?t=2796286
2) http://forum.xda-developers.com/showpost.php?p=54060253&postcount=11
3) http://forum.xda-developers.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://forum.xda-developers.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

Code:
[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...

My oneplus one struck on boot logo. oneplus one automatically it struck in bot logo and tried to recover with oneplus restore tool and msm8974 download tool but it is showing only oneplus logo.I even tried it with fastboot mode in fastboot mode I had typed fastboot oem unlock and in that it is showing device unlock false and device tampered true. What should I do now?
 
Last edited:

abcdandroid

New member
Apr 14, 2017
2
0
Hello All,

I really need some guidance here.

1. Completely Stock One Plus One, and Encrypted too
2. After a SIM card change it just went in a reboot and it is stuck at Cyanogen Mod Logo
3. Fastboot and recovery is accessible
4. In recovery I tried Wiping Cache and it tells ; E: Failed to mount Cache (invalid argument)
5. adb devices does not show anything
6. fastboot oem device-info shows this

Tampered True
Unlocked False

//Ask
Is there any way to reset this Tamper bit back to 1 as I am on completely stock unrooted ROM where I cannot mount any drive via Wipe Cache. Goal is to keep user data intact. I am willing to reverse fastboot if that helps me to achieve this but need some guidance from experts here.

Thank you so much for reading!
 

SBCR7

New member
Jun 12, 2017
1
0
Help please


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/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
Code:
fastboot oem unlock
and can see the device information by
Code:
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...
Code:
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://forum.xda-developers.com/showthread.php?t=2796286
2) http://forum.xda-developers.com/showpost.php?p=54060253&postcount=11
3) http://forum.xda-developers.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://forum.xda-developers.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

Code:
[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...

Please help me I'm stuck and I am very new to this forum and rooting mobiles .

My fastboot oem device-info shows that
DEVICE TAMPERED : False
Device unlocked : True
Device is verified : False
Charger screen enabled : Faslse .
What shall i do . Please help
I have a One plus 2
 

d-r0ck

Member
Sep 12, 2013
16
0
Sorry noob questions here...

Do I have to have CWM or TWRP to install this script?
Or do I just c/p the code with the cmd window open?
 

MonkeyRugger

New member
Oct 30, 2017
1
0
This is such an old post but I had the issue of Hardbricking my phone trying to upgrade my OnePlus One and now I am trying to lock and rest the flags for the bootlocker.

Am I to run the flags in the cmd while my phone is in Fastboot Mode? I am just stuck on this last part. This is what I am getting in CMD

C:\Users\MonkeyRugger> fastboot oem device-info ... (bootloader) Device tampered: true (bootloader) Device unlocked: true (bootloader) Charger screen enabled: false (bootloader) Display panel: OKAY [ 0.014s] finished. total time: 0.015s C:\Users\MonkeyRugger>Parition - aboot (bootloader) 'Parition' is not recognized as an internal or external command, operable program or batch file.

I have downloaded the zip and I placed it on the phone's storage itself too. I am all confused. Any help would be greatly appreciated.
 

2643625

Member
Nov 16, 2015
8
3
OPO softbricked fastboot mode but no recovery.

Hi everyone,

Hopefully someone can help...

OnePlus One softbricked bootloops to Android OnePlus One logo with Fastboot mode working but NO recovery therefore I can't use adb. Windows drivers on my laptop are OK because I used to get access to my OPO so many times using adb, mtp, Fastboot and access to internal storage.

OPO 64Gig Global Version
Multirom/TWRP 3.1.1-0 2017-07-11 p1
ROMs:
As a Primary ROM:
Lollipop bacon-userdebug_5.1.1_LMY48Y_a84dbba7eb_tes NETHUNTER
As secondary ROMs:
Marshmallow cm13.0-ZNH5Y-170703-SULTANXDA
Nougat lineage-14.1-20171126_233224-UNOFFICIAL-Sultan-bacon

How I got there? I tried to update the third ROM and my OPO could only reboot into TWRP with no access to system (ROMs). That was the first and last time I used OTA instead of simply dirty flashing as usual...

Then I tried to return my OPO to stock using this fix because I have Nandroids for each ROMs and a good backup of my sdcard (internal storage).
https://forum.xda-developers.com/oneplus-one/general/tool-oneplus-one-return-to-stock-t2970390

I runned the 3 *.bat files in the proper sequence and I got errors (see Oneplus_One_Patch_result.txt)

Since then my OPO can only reboot in Fastboot mode with no access to adb commands (see Fastboot_Commands_OPO_Troubleshooting.txt)
From what I read I realize now that I had a much better situation when booting into TWRP only...

C:\Users\HM>fastboot oem device-info
...
(bootloader) Device tampered: true
(bootloader) Device unlocked: false
(bootloader) Charger screen enabled: false
OKAY [ 0.029s]
finished. total time: 0.031s

I need to change the tampered and unlocked bits but how can I do that using fastboot?

One post (https://forum.xda-developers.com/oneplus-one/development/mod-reset-unlock-tamper-bit-t2820912) is suggesting this Code but I can't figure out how to do that...

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



Let me know if you need more info.
Thank you for reading and I really hope someone will read and help.
 

Attachments

  • Fastboot_Commands_OPO_Troubleshooting.txt
    2.6 KB · Views: 52
  • Oneplus_One_Patch_result.txt
    2.8 KB · Views: 30
  • Like
Reactions: nukejello

rshoreview

New member
Sep 8, 2019
4
0
Please help - bricked my OPO bacon

Please help!!
I have messed up my oneplus one bacon
I was using lineageos 16 and all was fine. For some dumb reason 'Screen mirroring', I decided to go back to lineageos 15.1. Somewhere in the instructions I read, a clean wipe is recommended to go back to previous release.
I wiped all my partitions from twrp
As a result, my system partition is lost.
I tried to flash the stock recovery and stock ROM
Recovery flash was successful and so I am on CWM, but the ROM failed as the system partition could not be mounted/unmounted
Now, my phone's state is
ADB does not work.
Fastboot works, but am unable to unlock my bootloader, not sure how it got locked.
>fastboot oem unlock
OKAY [ 0.009s]
Finished. Total time: 0.019s
It simple reboots to the recovery without unlocking
>fastboot oem device-info
(bootloader) Device tampered: true
(bootloader) Device unlocked: false
(bootloader) Charger screen enabled: false
(bootloader) Display panel:
(bootloader) console_enabled: 0
(bootloader) exec_console_unconsole: 0
OKAY [ 0.021s]
Finished. Total time: 0.028s

I was hoping this thread would help me. But not sure how to apply this fix
I am unable to flash or boot as I get the following error
FAILED (remote: ' Device not unlocked cannot boot')
fastboot: error: Command failed
 

opo2014

New member
Sep 19, 2020
1
0
Unable to reset unlock and tamper bit for opo

Hi,

I have upgraded opo to lineage os 17.1. post that had run command fastboot OEM lock. Since then I am unable to unlock bootloader as well.

Had tried all 3 scripts as given in thread but no luck.

Device tamper status says true and unlock status status says false when I run fastboot oem device-info

Pls help
 

Top Liked Posts

  • There are no posts matching your filters.
  • 125

    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/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
    Code:
    fastboot oem unlock
    and can see the device information by
    Code:
    fastboot oem device-info
    like: 11.jpg

    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

    22.jpg



    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/showthread.php?t=2796286
    2) http://forum.xda-developers.com/showpost.php?p=54060253&postcount=11
    3) http://forum.xda-developers.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://forum.xda-developers.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

    Code:
    [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 OnePlusOne-BootUnlocker.zip

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

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



    If you like this MOD please hit thanks button :)
    Thank you all...
    6
    OP Updated , with the following note....

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


    :fingers-crossed:
    6
    OP Updated..

    To avoid confusions and make things easier , I created 2 NEW Flash-able scripts

    1) OnePlusOne-OnlyBootloaderToggle.zip

    2) OnePlusOne-OnlyTamperBitToggle.zip

    Whoever facing issue with the main unlocker script ... please try above scripts and please confirm me that it works or not...

    :) Enjoy!!!
    4
    !!! 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...
    3
    Not if your running XNPH30O.

    Only flash if your still on XNPH25R