Sorry for the confusing title but I'm curious...
Being fairly new to Android in general and a total newbie regarding rooting these devices (a Nexus 6P in my case), I'm finding myself questioning some of the features and functions as they're related to rooting. In this instance, I'm wondering about "OEM unlocking" as it's listed in Developer Options. I've successfully flashed several factory OEM images that past few days as well as flashed TWRP, installed SuperSU, made backups of those images and all has worked out fine. From Marshmallow to Nougat 7.1.1 and to now what I've recently flashed, Android O, all the flashing of OEM software and using TWRP to recovery those backup factory images I'd made has worked, all's gone well without a hitch.
When I first activated Developer Options in settings when the phone was brand new, fresh out of the box, I noticed that "OEM unlocking" was in locked bootloader status. I'm guessing that's a factory default kernel or OS setting. Why is it that after unlocking the bootloader and flashing a complete factory zip image, when I go into Developer Options, the "OEM unlocking" is now displaying "Bootloader is already unlocked"? If it's a complete factory image that's been flashed, wouldn't "OEM unlocking" be locked by default because it's stock OEM software that's been installed? Guess I'm wondering if there are settings (like bootloader) that are not part of factory software images and reside in some hidden partition or in firmware or . . . .
By the way, the only reason I'm flashing all these different images via TWRP recovery or not, is to become familiar with rooting basics, command prompts, curiosity and 'cause it's fun, at least for now. Guess it'll really get interesting when I start messing with custom ROMs.
Welcome to my confusion.
ChipperD said:
Sorry for the confusing title but I'm curious...
Being fairly new to Android in general and a total newbie regarding rooting these devices (a Nexus 6P in my case), I'm finding myself questioning some of the features and functions as they're related to rooting. In this instance, I'm wondering about "OEM unlocking" as it's listed in Developer Options. I've successfully flashed several factory OEM images that past few days as well as flashed TWRP, installed SuperSU, made backups of those images and all has worked out fine. From Marshmallow to Nougat 7.1.1 and to now what I've recently flashed, Android O, all the flashing of OEM software and using TWRP to recovery those backup factory images I'd made has worked, all's gone well without a hitch.
When I first activated Developer Options in settings when the phone was brand new, fresh out of the box, I noticed that "OEM unlocking" was in locked bootloader status. I'm guessing that's a factory default kernel or OS setting. Why is it that after unlocking the bootloader and flashing a complete factory zip image, when I go into Developer Options, the "OEM unlocking" is now displaying "Bootloader is already unlocked"? If it's a complete factory image that's been flashed, wouldn't "OEM unlocking" be locked by default because it's stock, OEM software that's been installed? Guess I'm wondering if there are settings (like bootloader) that are not part of factory software images and reside in some hidden partition or in firmware or . . . .
By the way, the only reason I'm flashing all these different images via TWRP recovery or not, is to become familiar with rooting basics, command prompts, curiosity and 'cause it's fun, at least for now. Guess it'll really get interesting when I start messing with custom ROMs.
Welcome to my confusion.
Click to expand...
Click to collapse
Hello...
Once you allow "OEM unlocking" in developer options, it allows you to unlock your bootloader. Which you certainly did by:
fastboot flashing unlock
In bootloader...
You can flash as much as you want, the bootloader will remain unlocked. I don't know what partition keeps a record of the command, but flashing​ a new image doesn't lock as you can see. As long as you don't relock using:
fastboot flashing lock
Don't do it if you are not full stock, because you can't flash anything if something goes wrong...
Cheers...
If it's one take away I've come away with so far after reading several posts here at XDA, ones that include tales of rooting gone bad, it's to NOT lock the bootloader unlesss the device is back to stock (thanks Heisenberg). Fortunately, I'd read that before moving to and from locked bootloader status'. Thanks for the reminder, too!
Related
After unlocking the bootloader a month ago or so and installing tpxmm , I noticed oem unlock under developer options was disabled.
Well I had to enable oem unlock to disable device protection to reinstall tpxmm.
Should this be set to disabled now after install?
Sent from my XT1575 using Tapatalk
Doesn't matter. That setting only affects whether you can use the "fastboot oem unlock" command. Since your bootloader is currently unlocked, that setting will have no affect.
divinemyth99 said:
Doesn't matter. That setting only affects whether you can use the "fastboot oem unlock" command. Since your bootloader is currently unlocked, that setting will have no affect.
Click to expand...
Click to collapse
Old thread, but still relevant.
Are we sure about this? If "OEM unlocking" is disabled, does Moto's bootloader not block flashing certain images? I have read about other devices not allowing modification with this setting disabled, including flashing back to stock. The solution was restoring a full backup of stock in TWRP, then booting stock and enabling OEM unlocking.
Can anybody confirm if this is the case with the MXPE?
quakeaz said:
Can anybody confirm if this is the case with the MXPE?
Click to expand...
Click to collapse
That's the phone I have.
In Android OS, Developer Settings -> Allow OEM Unlocking is Off, but boot loader was previously unlocked and I have TWRP 3.0.0 installed. Rebooting to bootloader shows
Code:
Device is UNLOCKED. Status code: 3
Software status: Modified
I was able to upgrade to TWRP 3.0.2 using fastboot despite the Developer Settings- > Allow OEM Unlocking setting.
Re-locking the bootloader and restoring to stock as a bit of a process for another thread and if your bootloader shows "Device is LOCKED" then you will need to change the setting in Android before fastboot oem unlock will work. I've never had to change the setting since then, though, and every factory reset in android set it back to Off.
divinemyth99 said:
That's the phone I have.
In Android OS, Developer Settings -> Allow OEM Unlocking is Off, but boot loader was previously unlocked and I have TWRP 3.0.0 installed. Rebooting to bootloader shows
I was able to upgrade to TWRP 3.0.2 using fastboot despite the Developer Settings- > Allow OEM Unlocking setting.
Re-locking the bootloader and restoring to stock as a bit of a process for another thread and if your bootloader shows "Device is LOCKED" then you will need to change the setting in Android before fastboot oem unlock will work. I've never had to change the setting since then, though, and every factory reset in android set it back to Off.
Click to expand...
Click to collapse
Thank you for the info. Have you tried flashing stock recovery with the setting off? If so, no issues?
quakeaz said:
Thank you for the info. Have you tried flashing stock recovery with the setting off? If so, no issues?
Click to expand...
Click to collapse
Not in a log time, so I just tried just now and did the following.
Installed factory recovery
booted into factory recovery
wiped cache (I couldn't remember how to get the menu in the factory recovery, so that took a while =D)
booted into android
rebooted back to boot loader
flashed twrp
booted into recovery to verify twrp installed and is functional
Everything seems to be working.
divinemyth99 said:
Not in a log time, so I just tried just now and did the following.
Installed factory recovery
booted into factory recovery
wiped cache (I couldn't remember how to get the menu in the factory recovery, so that took a while =D)
booted into android
rebooted back to boot loader
flashed twrp
booted into recovery to verify twrp installed and is functional
Everything seems to be working.
Click to expand...
Click to collapse
You flashed stock recovery with the OEM unlocking option turned off, correct? That's what I was reading on a Hauwei device was the problem. With the setting turned off in stock, it wouldn't let him flash stock recovery image. He had to restore via twrp backup.
quakeaz said:
You flashed stock recovery with the OEM unlocking option turned off, correct? .
Click to expand...
Click to collapse
Yes, I left the OEM unlocking option in Developer Settings turned off through the whole process. I haven't turned that setting on since I originally unlocked my bootloader back in January.
1-I Installed TWRP
2- I installed custom ROM CM 13
3-I need to update my custom ROM so i entered fastboot i found that OEM is disabled so i have to reboot to enable OEM unlocking
4-something happens so that i can't reboot to normal OS as power button doesn't make any response, i can only start fastboot using power and volume up, power and volume down doesn't make any response.
so the question is i need a way to install any thing that make my phone boot to OS regardless any thing (Formating ,.....)
Noting that:-
1-I can't use any (flash,erase,format,...) as OEM is locked.
2-I can't unlock OEM as it is disabled.
3-flashboot continue result device shutdown.
4-I am in a country that doesn't any support to oneplus devices.
Thanks in advance
How can you have a locked bootloader if you've already flashed a custom ROM? I'm not sure I understand what's going on - if you're able to boot into Android, there should be an option in the Developer Options menu to allow OEM unlocking. Again, I'm not sure if I understand what's going on but if you're able to access the bootloader (fastboot) you can flash the stock ROM found here: http://downloads.oneplus.net/2016-02-26/op2/OnePlus_2_OxygenOS_2.2.1/
I hope this helps!
Five cents he upgrade to OOS3 or MM H2OS with newer bootloader and failed to upgrade TWRP to compatible one with the bootloader, just like other thread 99% similar to this one, that I already answered to.
pitrus- said:
Five cents he upgrade to OOS3 or MM H2OS with newer bootloader and failed to upgrade TWRP to compatible one with the bootloader, just like other thread 99% similar to this one, that I already answered to.
Click to expand...
Click to collapse
Could you please provide link for any or post the solution.
Hi all,
I've wanted to go back to Stock OS but when i type "fastboot oem lock" it says "FAILED <remote: Flashing Lock is not allowed."
Everything boots normally to OS 4.5.2. In DEV options the Unlock Bootloader is greyed out and says bootloader is already unlocked.
What can i do?
Cheers
These instructions did work for me with the OnePlus 3/3T. They should also work for the OnePlus5, just make sure that you download the OnePlus5 version of the software and recovery.
https://forums.oneplus.net/threads/...-3-3t-and-go-back-completely-to-stock.456232/
Use this link for the stock recovery: https://forum.xda-developers.com/showpost.php?p=72748921&postcount=5
reayard said:
These instructions did work for me with the OnePlus 3/3T. They should also work for the OnePlus5, just make sure that you download the OnePlus5 version of the software and recovery.
https://forums.oneplus.net/threads/...-3-3t-and-go-back-completely-to-stock.456232/
Use this link for the stock recovery: https://forum.xda-developers.com/showpost.php?p=72748921&postcount=5
Click to expand...
Click to collapse
Hi i tried but does the same when i get to fastboot oem lock (it says Flashing Lock is not allowed).
r1card0amr said:
Hi i tried but does the same when i get to fastboot oem lock (it says Flashing Lock is not allowed).
Click to expand...
Click to collapse
Thanks I asked the same question earlier glad u tried it..I want to make sure we can relock it before I get the phone. Did u enable oem unlocking in the developer options before doing a fastboot oem lock? Also, make sure you are on stock everything including recovery..
mohan_kr said:
Thanks I asked the same question earlier glad u tried it..I want to make sure we can relock it before I get the phone. Did u enable oem unlocking in the developer options before doing a fastboot oem lock? Also, make sure you are on stock everything including recovery..
Click to expand...
Click to collapse
Hello. I first thing I do always is to install drivers. I start by connecting the phone to the laptop in charge mode, then in transfer files mode, MTP or camera. In this way he will recognise all the drivers your laptop needs.
Also I enter in fastboot mode and recovery so the laptop can recognise the drivers and always reboot laptop and phone just to double check.
What I did was: go to Developer Options and enabled Unlock Bootloader and USB Debugging.
Then I accepted the laptop request on my phone and all drives were OK.
I run CMD and typed fastboot devices to see if it recognises my phone and it displayed a serial number. So I proceed next to type fastboot oem unlock and the process went OK and on my phone it asked Yes or No to unlock and I choose yes.
Then I flash a twrp image by typing on CMD: fastboot flash recovery recovery.img (my twrp I'm had other name so I rename it. You need to enable "Show file extensions" in Windows so you can see what the extension is).
I then type fastboot boot recovery.img and the phone entered in Recovery Mode in this case TWRP.
My phone was always connected to the laptop and he open the internal storage window so I drag the supersu inside.
Then on TWRP I wiped dalvik and cache and I went to Install and installed the SupeSU on my internal memory root.
The phone then rebooted and ready to go.
But then I went to developer options and the Unlock bootloader was greyed out. I unroot my phone and flashed a stock recovery for OP5 and the stock image 4.5.2 and when I type fastboot oem lock it always says it can't be flashed.
I need to stock it since I'm giving to a family member and they don't understand much about phones and If there's a problem the warranty doesn't cover.
Just installed supersu to try an app. I never install 3rd party roms.
r1card0amr said:
I need to stock it since I'm giving to a family member and they don't understand much about phones and If there's a problem the warranty doesn't cover.
Click to expand...
Click to collapse
the warranty is not voided with unlocked bootloader..
https://oneplus.net/hk/support/answer/will-rooting-or-unlocking-the-bootloader-void-my-warranty
I found now that if i take pictures or screenshots the Album Folder is empty. I think my phone is bricked. Hence i can't lock the bootloader.
r1card0amr said:
I found now that if i take pictures or screenshots the Album Folder is empty. I think my phone is bricked. Hence i can't lock the bootloader.
Click to expand...
Click to collapse
if your phones boots its not bricked... My guess is that you data is corrupted, i would wipe everything including userdata en reflashing the stock with recovery.
Hogyoku said:
if your phones boots its not bricked... My guess is that you data is corrupted, i would wipe everything including userdata en reflashing the stock with recovery.
Click to expand...
Click to collapse
Hi right before your comment i managed lol.
I re-flash the stock recovery and in recovery i reset and wipe everything. then i install the OS4.5.3 by ADB Sideload and it's working now.
Just wanted to get rid of the inital warning that my bootloader is unlocked. I want to lock again.
I rooted my device with Magisk, and now I want to restore it to factory state.
I flashed stock recovery and OOS several times, wiped everything but fastboot oem lock failed all times (FAILED (remote: Flashing Lock is not allowed)).
Can you help me?
What should I do to relock bootloader?
here is your solution
r1card0amr said:
Hi right before your comment i managed lol.
I re-flash the stock recovery and in recovery i reset and wipe everything. then i install the OS4.5.3 by ADB Sideload and it's working now.
Just wanted to get rid of the inital warning that my bootloader is unlocked. I want to lock again.
Click to expand...
Click to collapse
here in this video u can see in detail how to lock bootloader. hope this help you
https://www.youtube.com/watch?v=CQYCSdDUdAU
HOW TO RELOCK..
Install TWRP and Magisk if you don't have them yet.
Magisk should allow you to slide "OEM unlocking" to "enabled"
Reboot to fastboot
Flash stock recovery via fastboot.
Run locking via fastboot flashing lock
Allow it to reboot and upon start up it will say device corrupted (THIS IS NORMAL)
Boot to recovery via the warning start screen.
Once in recovery, sideload latest FW.
Profit.
I usually do it this way (successfully):
Wipe everything but OTG in TWRP
Format data
Reboot to TWRP
Flash the full stock OOS zip
Reboot to fastboot
Flash stock recovery
Lock bootloader with the fastboot lock command
Has anyone made any progress with this? I too am having the issue as described and have tried the solution by Ricyksydhu, along with solutions from various other places around the net.
Previously I have unlocked the bootloader using
Code:
fastboot oem unlock
and it worked just fine. Using
Code:
fastboot oem device-info
both the "tampered" and the "unlocked" bit were set to "True".
Recently, and I have no clue why (possibly a program I tried to use for work that ended up not working), both of these bits are now set to "False"
I cannot flash a new recovery using fastboot, though my original TWRP recovery is still there.
I can still adb sideload update my OS, have root access, etc.
Now running
Code:
fastboot oem unlock
reboots into TWRP recovery with no effect on the bootloader status
I have already tried a few things suggested around here to no avail.
The only thing I can think of to do now is to treat it as a hard brick and completely reset everything and install a stock ROM to start from scratch following something like this thread.
If I can avoid this that would be preferable...
I had the same issue. For some unknown reason my partitions were all messed up so I was getting "bootloader locked" every time, witch is basically what they call a hard brick.
I've used that recovery tool and did fresh start with the latest TWRP and a new ROM. All back on track! Working well since over a month now.
I know it's a pain doing a factory reset and all but I think it's the only thing you can do...
SOLVED
I unlocked my bootloader and flashed twrp to recovery (after first temporarily booting to twrp to make sure my bootloader was unlocked), I tried flashing Resurrection Remix, which resulted in some sort of error, I reread the instructions and realized I hadn't factory reset my device (though it was wiped by unlocking the bootloader), and went to my stock system and factory reset it, which seems to have been a huge mistake as now twrp seems to be completely gone and my device isn't getting recognized by adb or fastboot.
I have a small message in the top left of my screen between the boot animation and any boot from power off saying "bad key", fortunately my device is still usable as a stock device but now it seems I've locked my device from ever using a custom ROM now, is this correct?
I realize that I've made some huge mistakes here and should've known better.
Sounds like you should have flashed the dm verity opt encrypt zip. Factory reset is not the step. You were supposed to format data in twrp, format, not wipe.
Did you make any sort of backup before you started flashing ROMs?
Tokoroth said:
I and went to my stock system and factory reset it, which seems to have been a huge mistake as now twrp seems to be completely gone and my device isn't getting recognized by adb or fastboot.
* I have mediatek so excuse some differences but one thing is certain ..if you factory reset ..you RELOCK the bootloader +++ revoke USB debug authorization & turn off OEM unlock
I have a small message in the top left of my screen between the boot animation and any boot from power off saying "bad key", fortunately my device is still usable as a stock device but now it seems I've locked my device from ever using a custom ROM now, is this correct?
I realize that I've made some huge mistakes here and should've known better.
Click to expand...
Click to collapse
* I have mediatek so excuse some differences but one thing is certain ..if you factory reset ..you RELOCK the bootloader +++ revoke USB debug authorization & turn off OEM unlock
*When you say you can use your phone as stock nothing is wrong ....
You can flash full stock & start process over ..by enabling Dev settings then OEM unlock & debug
Connect to computer & give adb authorization
THEN YOUR PHONE WILL BE RECOGNIZED
# very important#
If you factory reset stock it usually relocks bootloader
++ AS madbat pointed out you will need to flash the noverity.zip when booting into twrp the first time.
Thanks for the help, I should've read a bit more before diving in, thank you for the pointers, I now have RR up and running finally!