• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

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

Search This thread

Lanchon

Senior Member
Jun 19, 2011
2,713
4,465
Sorry. I read what you said in #434 but I don't understand. First I have to return to stock recovery and after I have to flash script? Which script to use? First or second and third? Please answer. Thanks.

first step is:

"-fully return to stock and reset"

where does it say "stock recovery"? fully return to stock. everything. recovery included. (but do not re-lock the bootloader yet.) sorry, i will not continue to answer because you obviously do not read. so it is of no use to write anything else. (note to casual readers: user PM'd me with questions too.)
 
  • Like
Reactions: mihai2xk

xbit

Member
Aug 16, 2006
17
0
It is possible -- fastboot boot <custom_recovery.img from your PC>
then you can flash the zip...

The fastboot boot recovery.img doesn't work for me.
I have my OPO bricked, only starts in fastboot mode and I can't do fatboot oem unlock (It restarts and it's locked again).

Device Tampered: true
Device Unlocked: false

C:\adb>fastboot boot recovery.img
downloading 'boot.img'...
OKAY [ 0.290s]
booting...
FAILED (remote: Device not unlocked cannot boot)
finished. total time: 0.302s

C:\adb>fastboot oem unlock
...
OKAY [ 0.019s]
finished. total time: 0.019s
(OPO restarts without change unlock flag)

C:\adb>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.004s]
finished. total time:

I had CM12S nautghly (latest one) and I have tried to upgrade to CM13 today without lucky....
¿Can someone help me?
 
Last edited:

e1forall

Senior Member
May 22, 2012
148
24
Trying to help

The fastboot boot recovery.img doesn't work for me.
I have my OPO bricked, only starts in fastboot mode and I can't do fatboot oem unlock (It restarts and it's locked again).

Device Tampered: true
Device Unlocked: false

C:\adb>fastboot boot recovery.img
downloading 'boot.img'...
OKAY [ 0.290s]
booting...
FAILED (remote: Device not unlocked cannot boot)
finished. total time: 0.302s

C:\adb>fastboot oem unlock
...
OKAY [ 0.019s]
finished. total time: 0.019s
(OPO restarts without change unlock flag)

C:\adb>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.004s]
finished. total time:

I had CM12S nautghly (latest one) and I have tried to upgrade to CM13 today without lucky....
¿Can someone help me?

Hello
From what I understood I will try to help you if not solved.
1. Download latest nightly or latest fastboot zip.
2. Extract boot.img from that.
3. Connect the phone in fastboot mode and flash this boot.img using "fastboot flash recovery boot.img".
4. Then "fastboot oem device-info". It's should be locked still and tampered.
5. The. "fastboot oem unlock".Check It should do some things in recovery, let it do it and boot itself and then again go to fastboot mode.
6. Then again check "fastboot oem device-info". Then bootloader should be unlocked now.
7. Now flash recovery of your choice.
Thanks
 

xbit

Member
Aug 16, 2006
17
0
Hello
From what I understood I will try to help you if not solved.
1. Download latest nightly or latest fastboot zip.
2. Extract boot.img from that.
3. Connect the phone in fastboot mode and flash this boot.img using "fastboot flash recovery boot.img".
4. Then "fastboot oem device-info". It's should be locked still and tampered.
5. The. "fastboot oem unlock".Check It should do some things in recovery, let it do it and boot itself and then again go to fastboot mode.
6. Then again check "fastboot oem device-info". Then bootloader should be unlocked now.
7. Now flash recovery of your choice.
Thanks

I have solve the problem without bootloader because it doesn't work.
I used COM connection conecting the switched off phone to PC and with OnePlusRestoreTool.
 

sigex

New member
Feb 1, 2016
2
0
1) Did you unlock your device before by any means ? (or by fastboot oem unlock) ?
Yes device was unlocked rooted had TWRP and CM13 running on it
2) What is the recovery already installed in your device ?
IT was TWRP (nothing now)
3) What is the status of your device ? "fastboot oem device-info"
----
C:\Users\DMsb45zero\AppData\Local\Android\sdk\platform-tools>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.008s]
finished. total time: 0.009s
----
4) What error msg you got when tried to run command fastboot boot <custom_recovery.img>.
Tells me that it failed since the device is not unlocked.
5) Steps you tried.
I tried using fastboot to install TWRP again but like I said this just fails as the device is locked

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

This is the current status of my device. If I try fastboot oem unlock it reboots into fast mode and is still locked. This is the only thing my phone will do, fastboot. I can detect it on the PC using fastboot devices. It is a oneplus one.

HELP? How on earth do I run the script to toggle the unlock state? I see META-INF what am I suppose to do with that? The guide says something about flashing it using TWRP. But that's not going to work as I don't have a recovery or a system rom.. Also I tried the OPO recovery tool (which is the moded version of the coloros factory reset) But it doesn't just up the com text as the guide suggested. Also the guide says put phone into recovery mode but again I can't...
 
Last edited:

seblog

Senior Member
Mar 9, 2009
63
13
I reverted back to stock (YOG7DAS2K1) via fastboot image, all went ok.
Now I want to set to false both tamper flags, but I cannot get to boot to temporary TWRP (of course now I am all stock, so I have Cyanogen bootloader, but still have unlocked bootloader)

I am in fastboot (dimmed cyanogen logo face smiling at me and "fastboot" written on the right of it)
Go to dos and type command (all tools and drivers are correctly set up)

Code:
fastboot boot twrp.img

Notification led flashes once (amber color), then the cyanogen logo and text became more lit, but phone get stuck there, and from fastboot commands I don't have fastboot connection to phone anymore...
I tried flashing with TWRP 2.8.6.0, 2.8.6.1, 2.8.7.0

Only way to restart is keeping power button pushed 10 sec.
If I go to recovery it's still the Cyanogen recovery.

No way I can access TWRP, so I cannot flash the untamper zip script.

Do you know what I can try? Are the information at post n.1 still valid on latest CM12.1 builds?
Thanks
 

agstn.tanmay

Senior Member
Feb 11, 2014
341
48
New York
1)i have unlocked my device previously with fastboot oem unlock without any issue.
2)i have installed twrp 2.8.6.0
3) "fastboot oem device-info status of my device is Unlock Bit - TRUE, Tamper Bit - TRUE .
4)haven't tried yet the command fastboot boot <custom_recovery.img>. ,basically what this command do??
5)these are the steps i have already done,accept the no step command which i mentioned., and i havent faced any error with all these steps.
now can u plz tell me what i can gain if my devicce's Tamper Bit is false from the true ??
 

drgibbon

New member
Mar 8, 2014
3
0
I notice that the first post in the thread has a warning about CM11, so I just want to check if I can use it safely or not with CM12.1.

I have a OnePlus One that I want to set the tampered and unlocked both to false. I have previously unlocked the bootloader (with fastboot oem unlock), and I had installed TWRP and the latest Cyanogenmod 12.1 rom. At present I have restored the device to the stock with cm-12.1-YOG7DAS2K1-bacon-signed-fastboot-bed37f2e18.zip from Cyanogen Support, by issuing the following commands;

Code:
fastboot flash modem NON-HLOS.bin
fastboot flash sbl1 sbl1.mbn
fastboot flash dbi sdi.mbn
fastboot flash aboot emmc_appsboot.mbn
fastboot flash rpm rpm.mbn
fastboot flash tz tz.mbn
fastboot flash LOGO logo.bin
fastboot flash oppostanvbk static_nvbk.bin
fastboot flash recovery recovery.img
fastboot flash system system.img
fastboot flash boot boot.img
fastboot flash cache cache.img

My current 'fastboot oem device-info' is
Code:
(bootloader) 	Device tampered: true
(bootloader) 	Device unlocked: true

I haven't tried booting into a temporary recovery and trying to script, because I am not sure if it will brick my device or not!

Can anyone confirm that the script will be ok in this case? :confused: Thanks. :cowboy:
 

xkanth

Member
Nov 25, 2015
11
1
Oneplus x

I have the same issue with oneplus x. Can you please give me a step by step guide to unlock the bootloader again. I cant flash anything except restoring a TWRP backup, super su, blu_spark. When i unlock using fastboot oem unlock. The device restarts and boots into TWRP
 

saurabh40629

Senior Member
Sep 1, 2014
1,090
477
I have the same issue with oneplus x. Can you please give me a step by step guide to unlock the bootloader again. I cant flash anything except restoring a TWRP backup, super su, blu_spark. When i unlock using fastboot oem unlock. The device restarts and boots into TWRP
Were you able to solve it? I have the same issue.
@Mnt-XDA , I checked the script and its different for all device. Do you know how can we get to know about offset bit for our device? My device is Oneplus x(onyx).
 

chak05

New member
May 31, 2016
1
0
i can't unlock my opo

i can't unlock my opo, trying to follow all your instructions step by step but with no solution :(

C:\ADB Drivers_Updated>adb version
Android Debug Bridge version 1.0.31

C:\ADB Drivers_Updated>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.008s]
finished. total time: 0.009s


C:\ADB Drivers_Updated>fastboot boot twrp.img
downloading 'boot.img'...
OKAY [ 0.357s]
booting...
FAILED (remote: Device not unlocked cannot boot)
finished. total time: 0.370s

thanks for your 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