yashsingh1/xdaforums huggingface dataset:
[ONE General] Kofi o:
Bootloader Still Unlocked after flashing factory image!!

Hi All,

So I've followed the chemistry teachers instructions in section 8 and restored my oneplus one to 25R , but for some odd reason the bootloader is still unlocked - Is this correct?

This is how I got to this state:-

I started off with a rooted CM1105Q with the latest franco kernel, unlocked bootloader and TWRP recovery.

I installed an app called bootunlocker which I used to toggle the tamper flag to false.

And then finally, I flashed cm11-25R fastboot images using the following commands:-

sudo fastboot flash modem NON-HLOS.bin

sudo fastboot flash sbl1 sbl1.mbn

sudo fastboot flash dbi sdi.mbn

sudo fastboot flash aboot emmc_appsboot.mbn

sudo fastboot flash rpm rpm.mbn

sudo fastboot flash tz tz.mbn

sudo fastboot flash LOGO logo.bin

sudo fastboot flash boot boot.img

sudo fastboot flash cache cache.img

sudo fastboot flash recovery recovery.img

sudo fastboot flash system system.img

sudo fastboot flash userdata userdata_64G.img

It successfully installed the 25R factory image, but the bootloader remains unlocked as illustrated from the command below:-

sudo fastboot oem device-info

...

(bootloader) Device tampered: false

(bootloader) Device unlocked: true

(bootloader) Charger screen enabled: false

OKAY [ 0.005s]

finished. total time: 0.005s

Is this normal behaviour? I thought flashing the factory image would lock the bootloader.

Is it OK to flash root with the stock recovery or do I need to use a custom one? - I think I read somewhere that its dangerous to flash root with stock recovery or something like that. Could be wrong.
[ONE General] Heisenberg:
Flashing the stock images doesn't affect the bootloader so what you're experiencing is normal. Is there a reason you want the bootloader locked? I ask because there have been cases where it won't unlock again after it's been locked, and there's no real benefit to locking it anyway. It isn't dangerous to flash SuperSU with the stock recovery, it just won't work, so if you want to flash SuperSU to gain root you'll need TWRP recovery.
[ONE General] Heisenberg:
I'm not talking about just recognising the device when it's connected though, have you actually downloaded and installed the universal adb/fastboot drivers from koush?

Transmitted via Bacon
[ONE General] 26.2man:
Yes, sorry my connection went down for a few. Now it recognizes my device but says cannot read sideload
[ONE General] potpit:
I did. Same result.
[ONE General] 26.2man:
I finally got it to sideload but it failed. The only modification I have made to the system was I went in and manually increased the phone volume value with file explorer. Would that cause me to have to use the modified updater script? If so I tried to download it but could not no matter what I tried. Any suggestions?
[ONE General] Heisenberg:
Yes that's a modified system file, you need to download the modified OTA in the underlined disclaimer.

Transmitted via Bacon
[ONE General] Heisenberg:
Try getting it from their goo.im page instead.

Transmitted via Bacon
[ONE General] 26.2man:
Finally got it to work. One bug I have now is that I cant apply a different wallpaper to the lockscreen than the one on my homepage. Any suggestions?
[ONE General] potpit:
Sadly 2.7.1.1 is not uploaded there
[ONE General] Heisenberg:
You don't need 2.7.1.1, I'm using 2.7.1.0 and it's perfectly fine. Look at it this way, you can either have 2.7.1.0 or nothing.

Transmitted via Bacon
[ONE General] Heisenberg:
I've seen people discussing that but I'm not sure of the fix, have a look around and I'm sure you'll find it.

Transmitted via Bacon
[ONE General] Heisenberg:
I noticed you also asked this question in another thread, please don't duplicate posts, it's a waste of resources and is also against the rules.

Transmitted via Bacon
[ONE General] potpit:
Got it. Downloading it now. Thanks for your help so far!!
[ONE General] Heisenberg:
No worries, let me know how you go.

Transmitted via Bacon
[ONE General] 26.2man:
Sorry im just frustrated. My phone goes from perfect to not so perfect. I guess I'll just flash the base rom and wait for the ota.
[ONE General] potpit:
Everything worked perfectly! Now happily on rooted 30o! Thank you so so so much!
[ONE General] Heisenberg:
Very glad to hear it, and happy to help.

Transmitted via Bacon
[ONE General] RISHI RAJ:
adb sideloaded & flashed via twrp but of no use.Any solutions.Im stuck at hexa logo
[ONE General] Heisenberg:
I can't help you if that's all the information you're providing. When asking for help you must provide as much relevant information as possible.

Transmitted via Bacon
[ONE General] RISHI RAJ:
sorry,im running 25r all stock with twrp.I tried to flash the 114mb update but stuck in bootloop.I also sideloaded successfully but with same result.Also im not seeing any update available in system updates in 25R.Tried wiping cache,dalvik,data,freshly installed 25r but unsuccessful
[ONE General] Heisenberg:
So the install definitely says it's successful?

Transmitted via Bacon
[ONE General] nschopra:
NO issue with latest recovery

I installed twrp 2.8.7.0 and it got installed on first try and working flawlessly. Thanks dear Heisenberg for summing up all guides at single page.
[ONE General] Kofi o:
Thanks Walter, I just asked out of curiosity as I thought it automatically locks the bootloader.
[ONE General] jokermithun:
Good guide for rooting n unlocking bootloader

1+1

---------- Post added at 09:58 PM ---------- Previous post was at 09:57 PM ----------

Just used Wug's toolkit for bacon to wipe n install adb fastboot drivers

1+1
[ONE General] klinchery:
problem with step 2

hey could someone help me out my oneplus one just wont boot into custom recovery but i get no errors or other stuff from the fastboot cmd.
[ONE General] Spannaa:
If you need help, it's a good idea to give as much info as possible in your question ?

What are you trying to do in fastboot?

How are you trying to boot into recovery?

Have you read the whole of the first post?

Sent via Bacon...
[ONE General] klinchery:
whew i tried aalot of stuff in the meantime and now had to restore my opo to stock with this http://xdaforums.com/oneplus-one/general/tool-oneplusrecovery-tool-v1-0-restore-t2991851 which worked im now back on stock without anything changed i try the guide again now lets hope its works this time.

edit: gonna update it via the stock updater first.
[ONE General] Paresh Kalinani:
WOW! Really helpful post! You may mention about my tool which makes the EFS work easier. :) See here
[ONE General] klassical:
Great Guide! Thank you Walter White!
[ONE General] Moksu:
Possible to have a guide also for how to upgrade OTA via TWRP? (where to find the latest .img of the update)
[ONE General] Heisenberg:
You can't flash OTA updates with TWRP anymore. You can either flash the full ROM zip with TWRP, or you can flash the stock recovery to flash the OTA. Mirrors are here:

http://xdaforums.com/showthread.php?t=2906746
[ONE General] harryohh:
Great guide. Thanks.
[ONE General] ScreaMRooT:
Hi

I am using Stock CM11 (XNPH44s) fast boot.zip.Extracted followed your guide and installed using ADB and cmd.Previously i updated to lollipop(without root) and since it is not customizable - rooted my phone - deleted OS and installed the above version and rerooted and using TWRP 2.8.7.0.However now my phone is showing only 2GB RAM now (1868 MB to be precise).Rest everything is fine.Does any one know why? or atleast help in giving some possible solutions to my problem?
[ONE General] Heisenberg:
Updated 2015/10/10!

Added:

8b. How To Make Sure Your Firmware Is Updated For 5.1 ROMs
[ONE General] kmarc33:
Hi Heisenberg,

Thanks for all of the work. Suggestion on 8b. Include "and to check to make sure that it worked..." or "if you don't see version XXX then follow these steps and afterwards check to be sure you see XXX" or something like that.

Just a thought.

Thanks again
[ONE General] Heisenberg:
Thanks for the suggestion but I don't really think that's necessary, you receive a meagre after flashing each component saying that it was successful anyway.
[ONE General] david72262:
I switched to exodus because of your signature do you still use camera next with it?
[ONE General] Heisenberg:
Yes I do.
[ONE General] david72262:
Thank you I have been following your posts and your topics for about 6 months and value your opinion
[ONE General] Heisenberg:
Thankyou, I'm always glad to help.
[ONE General] vicky.c:
its not showing my attached device
[ONE General] Heisenberg:
You need to provide more information please.
[ONE General] MoistPicklez:
[MENTION=4153349]Heisenberg[/MENTION] thank you for this tutorial, my new OnePlus One is all rooted, unlocked, and ready to flash some awesome ROMs! You sir are awesome!
[ONE General] Ben.ott:
I'm on the latest COS update. I've followed all the instructions up to the point where I should test the adb connection from my phone to the computer. It doesn't recognize my phone through adb, even though my phone shows up on my computer normally. I've installed all the drivers and done everything else. Any suggestions?
[ONE General] Heisenberg:
Do you mean testing the fastboot connection? Are you in the OS or in fastboot mode?
[ONE General] Ben.ott:
You have two commands to test whether your device is connected, "adb devices" when the phone is on, unlocked, and connected, and "fastboot devices" when in fastboot. I've tried both and neither lists my device.
[ONE General] Heisenberg:
Don't bother trying adb commands while in fastboot mode because adb doesn't work in fastboot mode. If fastboot commands aren't working you'll need to investigate your drivers.
[ONE General] mathieum28:
thanks man!
[ONE General] coolswap84:
root one plus one mobile in single click

How to root one plus one mobile in single click without wiping any data.,,Is it possible:confused:
[ONE General] Spannaa:
If you haven't unlocked your bootloader then no, it isn't possible.

Since you're here, read the first post of this thread and you'll be a lot less confused ;)
[ONE General] Heisenberg:
Not possible, you need to unlock your bootloader which will wipe all user data.
[ONE General] anshumangoyal:
Can't see a thread to revert to stock with my One Plus One. The other guide in forum is too confusing. Can some one please help me some easy links and a faster downloadable image for stock. TIA.
[ONE General] jokermithun:
http://xdaforums.com/showthread.php?t=3194892

[KERNEL] Mirrors for Cyanogen OS stock kernels for Oneplus One

Lagfree 1+1
[ONE General] anshumangoyal:
This is kernel. How does thos help me out. I want to revert to original stock. All posts are so confusing. So is there anyone who can help me with some easy post out there.
[ONE General] 724A:
I am just one data point and quite possible I did something not consistent with your directions, but I unlocked my bootloader, installed TWRP and rooted my device without wiping my data. I was certainly prepared to and expected it to wipe my data, but it did not.

I am not sure if it helps anyone to describe what I did, but here goes. First, I was having significant battery problems. I was on 5.1 without root. I had previously rooted 4.4, but did not get around to it for 5.1 (or 5.0). So, I did a factory reset. Wiped the entire phone and started again. It is not a big deal to wipe if you have your backups working. Google was my friend. After 2 days of tweaking I had it back to the way I was comfortable with it. I then decided I needed to encrypt the device which I did.

Yesterday, I decided it needed to have the bootloader unlocked, I wanted to instal TWRP and root it. So I came here and followed these terrific (and simple) directions. All went smoothly except when I tried to root with SuperSU that I had downloaded directly to the phone from my phone's browser. That failed several times before I adb push(ed) the zip file I had downloaded back in February for the first time I rooted from my pc to the phone, then went to recovery and flashed it. Viola. Bob's your uncle. Works great.

I don't know if encrypting the data helped me to not lose it or something else. Regardless, I unlocked my bootloader without losing data.
[ONE General] jokermithun:
http://xdaforums.com/showthread.php?t=2826541

[GUIDE] Return your OPO to 100% Stock (Current Build - CM12.1 - YOG4PAS1N0)

Brother just search in general thread...u ll get gud guides about everything:)

Lagfree 1+1
[ONE General] Kerafyrm:
http://xdaforums.com/showthread.php?t=2970390
[ONE General] Spannaa:
If you had previously rooted 4.4 then wouldn't you have had to unlock your bootloader to root?

You only have to do it once and it stays unlocked unless you lock it again.
[ONE General] 724A:
Thanks. Therein lies the answer. I did unlock the bootloader when I rooted 4.4. I did not realize that once it was done once, that it stayed that way even with the OTA updates and factory resets. I did run the unlock commands again and it came back with true (2x) so I guess I wasted a little time with that step.

I also want to thank you for the heads up about how to get the phone to accept and keep TWRP as the recovery tool. I previously was having problems with it reverting to Cyanogen recovery. Much appreciated.

Now off to see if I can't screw things up during the Xposed installation. :)
[ONE General] rajesh2310:
I tried to root my devices as shown but the recovery wasn't working its still going into fastboot mode and unable to install recovery even though the commands and procedure is correct pls help me out
[ONE General] Cameldrugs:
I think you mean this:

fastboot flash recovery openrecovery-twrp-2.8.1.0-bacon.img

I've just rooted my OPO and had the same problem, I guess the file you've downloaded is "twrp-2.8.7.0-bacon.img".

So you simply just need to write this in the command prompt from within your fastboot folder:

fastboot flash recovery twrp-2.8.7.0-bacon.img

After that it worked for me.
[ONE General] Kiranbyp:
Hi Friends,

How can I replace cyanogen recovery with TWRP?

I am using cyanogenmod 12.1 so please let me know how can I do that.
[ONE General] Heisenberg:
Follow the instructions in section 2, make sure you read it all.
[ONE General] elmer_fudd:
Hi,

Is it the same thing to back up EFS with TWRP as the "manual" method? I mean you get the same correct files?
[ONE General] Sambit007:
Hey,i am on 5.1.1 official cyanogen 12.1

I didn't have root or recovery yet.so how do root on 5.1.1 and install recovery?if i follow the information in op.will it work on 5.1.1?
[ONE General] Spannaa:
Yes.

Read the first post carefully and be aware that the first step, unlocking your bootloader, will wipe ALL of your data like a factory reset.

Tapatalked via OnePlus 2
[ONE General] jokermithun:
is it ok if i backup efs partition with Wug's toolkit???
[ONE General] Spannaa:
If it's a reliable backup then yes - what's important is that you have a backup.

Tapatalked via OnePlus 2
[ONE General] MEGA_DeaTh:
Smooth as butter.

Thanks for the hard work.
[ONE General] Anghirrim:
Thanks a lot for this thread, it's one of the best I've ever read...
[ONE General] Sv1ngen:
Worked like a charm. Thanks mate :)
[ONE General] vince.lupe:
Hey everyone, I'm new to the group here (not new to XDA), and just wanted to stop and say "Hi!" :D

I am really starting to like my One Plus One, and the camera is really good as well :D I am hoping that with the new update (YOG4PAS3JL), we can get root installed, because I flashed the SuperSu .zip but it didn't give me root? I LOVE messing around with my phone and flashing ROMs, and hopefully I can find some that give me some multi-tasking opportunity with a greater camera experience :D
[ONE General] PAiiN:
Thanks for the hard work. :)
[ONE General] Vinnyxda:
Thank you very much for the great guide :good:
[ONE General] Abhinav_Rakesh:
[MENTION=4153349]Heisenberg[/MENTION] .. Hey Buddy, I am thinking to root my OPO today. However can you let me know the stable twrp version. I have my OPO right now at Lollipop. Screen shot attached. I am asking as I heard some bugs with twrp on lollipop however not able to find the posts.

Sent from Bacon (Oneplus One)
[ONE General] Spannaa:
I'd recommend you use twrp-2.8.6.0-bacon.img from here - later versions have issues with flashing firmware.
[ONE General] Heisenberg:
I never updated past 2.8.6.0 so I can't really comment, other than saying that version served me well.

Sent from my Nexus 6P
[ONE General] Abhinav_Rakesh:
[MENTION=2948558]Spannaa[/MENTION] and [MENTION=4153349]Heisenberg[/MENTION] .. Thanks Guys, I have successfully rooted and installed TWRP recovery version 2.8.6.0 ..

Now I was thinking to Install custom ROM ... I have done that numerous times on my previous phones however one thing I am not sure what exactly is OnePlusFirmware .. Why I need to flash it with every custom ROM ..

Isn't all the firmware is pre built in the ROM itself.

Sent from Bacon (OnePlus One)
[ONE General] Heisenberg:
No, the firmware isn't generally included in a ROM zip. You don't need to flash it every time though, it's usually only necessary when going from a KitKat ROM to a Lollipop ROM (and vice versa). If you're changing from a Lollipop ROM to another Lollipop ROM then you should not need to flash any firmware. If there is some kind of special requirement it's usually listed in the OP for the ROM thread.
[ONE General] Abhinav_Rakesh:
Got it .. As now I am on stock cm12.1 and would like to install resurrection remix ROM .. There page says to flash OnePlusFirmware ..

So in case if I don't flash the OnePlus firmware and only flash resurrection remix ROM would I be getting reboots bootloops etc. ?

Sent from Bacon (OnePlus One)
[ONE General] Heisenberg:
If it requires certain firmware to be flashed then you should flash it, otherwise the ROM install will most likely fail.
[ONE General] Abhinav_Rakesh:
OK so the flashing will be going to be like ..

OnePlusFirmware > ROM > Gapps

Sent from Bacon (OnePlus One)
[ONE General] Heisenberg:
Yes, without a reboot between the firmware flash and the ROM flash.
[ONE General] tetakpatak:
It worked pretty fine for me to flash a firmware afterwards, only if the problems occured.

tetakpatalked from 1+One
[ONE General] nikev215:
many thanks

Thank you so much for such a great and detailed guide, this is coming from someone with little knowledge of android, linux, or the command line. With the help of this guide I've unlocked, installed a recovery and rooted my phone without issues. It was a great help!
[ONE General] karthiee:
superb.......
[ONE General] hariganesh76:
very helpful!
[ONE General] marios_ch:
hello, first i would like to thanks for this guide but i am having some questions.

i am doing the steps exactly as said in the guide but sdk manager does not seem to work? is it because i am using win xp pro?

is there any other ways to root and flash other rom except this? i tried also bacon root toolkit but i does not seem to work either in my pc.

i spend 3 days without any result, is there any other ways of proceed?

thanks in advance
[ONE General] trotos:
When you enter in the command prompt

"Fastboot devices"

And your phone is in fastboot mode, yyou should see your device.

If not the problem is the drivers
[ONE General] marios_ch:
I did what you said and it recognise my device giving me the serial number.

I ask for bootloader unlock it said ok after that it reboot but without wipe anything. I guess is not unlocked right?

What went wrong?
[ONE General] trotos:
Why don't you try different USB ports. And different cable. The original one plus works good.

I have personally seen differences.

Apart from that I really do not know why unlocking the bootloader will not work.
[ONE General] Spannaa:
What is the output when you do:

fastboot oem device-info

Tapatalked via OnePlus 2
[ONE General] marios_ch:
ok so i went to step 2 and i got root and twrp.

i was stucked because it never wiped the phone this procedure so i thought that something was wrong and i was trying again and again.

isnt strange that bootloader was unlocked without wiping data?
[ONE General] Spannaa:
Are you sure it wasn't already unlocked?

Tapatalked via OnePlus 2
[ONE General] marios_ch:
well i am the 1st owner and was purchased from the official one plus store
[ONE General] trotos:
Refurbished??? It is weird.
[ONE General] marios_ch:
No brand new, a friend mentioned also unlock without wiping.
[ONE General] Spannaa:
Maybe OP are sending them out unlocked now?

The only way to check is to do a fastboot oem device-info before trying to unlock.

Tapatalked via OnePlus 2
[ONE General] Yash Doctor:
Need Help!! Stuck On Miui 7 ! i just flashed miui7 on my oneplus! then i try to flashing Sultan's 5.1 rom but..i cant !

getting binary error!
[ONE General] Vinnyxda:
Flash cm12.1 nightly build first then flash Sultan's rom
[ONE General] tokske:
does not work

hi so im trying this for the 1st time but it does not seem to work for me i dont know what i am doing wrong but it annoys me i cant even get over the step of instaling a custom recoverey. its super annoying beacouse i want to instal a custom ROM on my opo beacause its getting slow and unstable now i would realy love some help. and alo when i wanna ulock the bootloader i dont lose any peice of data.

PLEAS somone help me...
[ONE General] Spannaa:
Read the first post thoroughly and follow the instructions exactly...
[ONE General] :
[MENTION=4153349]Heisenberg[/MENTION], the situation is, a friend of mine faced an issue while updating her phone to 12.1, the phone switched off in the middle of way while update was going on due to low battery, now the OS is full corrupted, and it doesn't even start, problem is the bootloader is locked. But that shouldn't be a problem if I sideload the rom from ADB right ? So the prime target is to save the data in SD card, if I do the following, it wont format the device anyway correct ? It shouldn't touch the sdcard partition right ? It only works on /system ?

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

fastboot flash cache cache.img

fastboot flash recovery recovery.img

fastboot flash system system.img

fastboot flash userdata userdata_64G.img

I believe the last step will remove the data from SDCARD ( fastboot flash userdata userdata_64G.img) isn't it ? so it can be skipped ?
[ONE General] Heisenberg:
How are you going to access adb if the device won't boot?
[ONE General] :
it doesn't boot to the OS completely, I can still access the stock recovery and bootloader mode. I just thought about a workaround, her target is to save the data, with stock recovery it doesn't show up the internal storage at recovery mode, but with custom recovery it does, I'm planning to flash just the TWRP.img through bootloader mode and then connect the phone with cable on recovery mode, that should show the internal storage to show the data. But I'm not sure if it is possible to flash a custom recovery with locked bootloader and unlocking bootloader will automatically remove all data from phone.
[ONE General] atulclassic:
Its not possible to flash twrp without unlocking bootloader and unlocking bootloader will eventually wipe all data.

---------- Post added at 11:47 AM ---------- Previous post was at 11:43 AM ----------

all these commands will work only if you have unlocked bootloader

And Yes, the last command fastboot flash userdata userdata_64G.img can be skipped if you want to save data
[ONE General] :
Do you know about any other workaround ? Cause the Oneplus support is behaving like the way they are known for. Not at all helpful.
[ONE General] Heisenberg:
As the other member pointed out, you can't flash anything with a locked bootloader. You might be able to flash a full official ROM zip via adb with the stock recovery, but I'm not even sure if that's possible, the system partition may be corrupt due to the phone powering down while writing to it. If that's the case you'll have no choice but to unlock the bootloader. Hopefully this is all a big lesson for your friend, who should have made sure there was enough battery before updating.