Don't Re-Lock Your Bootloader

Search This thread

jawz101

Senior Member
Jun 4, 2009
1,551
797
Samsung Galaxy Tab S
ZTE Axon 7
You know I kind of thought the same thing, but I didn't say anything because I appreciated the effort taken to write a tutorial. You are more then welcome to write your own guide and post it if you think it should be written differently.

Thanks. I did write some steps above as I went through the process myself

---------- Post added at 11:34 AM ---------- Previous post was at 11:12 AM ----------

lol, seriously? haha :)

---------- Post added at 10:50 AM ---------- Previous post was at 10:32 AM ----------



@jdgesmlls and @jawz101 deserves all the credit, its just funny that we both did the same thing at the same time @jawz101 do you realize the probability of us both doing the same thing at the same time. As an FYI, @jdgesmlls method is how i would relock my device if i was to ever do it. I know all the commands and the process, he just summed up the way i would check and be sure it boots, before making a brick.

we can all get along here :)
ok thaaat makes sense. My apologies. My main thing was I didn't want people to fear it. I'd read the whole thread and around post 35-37 I got the impression that the advice just started to digress. It felt like the OP and title was the rough draft but it needed flipping so it wasn't framed as a cautionary tale because when you do it with instructions it's just a process.
 

aer0zer0

Recognized Contributor
Sep 20, 2013
3,286
2,509
Cortland NY
Thanks. I did write some steps above as I went through the process myself

---------- Post added at 11:34 AM ---------- Previous post was at 11:12 AM ----------


ok thaaat makes sense. My apologies. My main thing was I didn't want people to fear it. I'd read the whole thread and around post 35-37 I got the impression that the advice just started to digress. It felt like the OP and title was the rough draft but it needed flipping so it wasn't framed as a cautionary tale because when you do it with instructions it's just a process.

No fear, just a cautionary tale. Too many essential bricks lately.
 
  • Like
Reactions: jawz101

jawz101

Senior Member
Jun 4, 2009
1,551
797
Samsung Galaxy Tab S
ZTE Axon 7
No fear, just a cautionary tale. Too many essential bricks lately.
It makes me wonder if Google could add some check within that fastboot lock command to make sure you're on an unmodified stock ROM.

I still don't understand why bootloader locking was considered a great idea. On the axon 7 I think people found a way to hide that bootup warning screen which sounds to me like a lot of it is superficial or can be made to look safe even if tampered with.
 

aer0zer0

Recognized Contributor
Sep 20, 2013
3,286
2,509
Cortland NY
It makes me wonder if Google could add some check within that fastboot lock command to make sure you're on an unmodified stock ROM.

I still don't understand why bootloader locking was considered a great idea. On the axon 7 I think people found a way to hide that bootup warning screen which sounds to me like a lot of it is superficial or can be made to look safe even if tampered with.

htc does the same thing, you can modify the bootscreen to turn all the text white, so it blends in. Whats scary is there seems to be more of these "ive never done anything to my phone ever and it bricked" bricks. at least if the bootloader is unlocked, it can be fixed from there. But with no way to switch slots on locked bootloader (which i thought was the point of seamless a/b) its almost worse, as it was completely by no fault of your own. At least if you hit QFIL, you can look yourself in the mirror.
 
  • Like
Reactions: jawz101

jawz101

Senior Member
Jun 4, 2009
1,551
797
Samsung Galaxy Tab S
ZTE Axon 7
htc does the same thing, you can modify the bootscreen to turn all the text white, so it blends in. Whats scary is there seems to be more of these "ive never done anything to my phone ever and it bricked" bricks. at least if the bootloader is unlocked, it can be fixed from there. But with no way to switch slots on locked bootloader (which i thought was the point of seamless a/b) its almost worse, as it was completely by no fault of your own. At least if you hit QFIL, you can look yourself in the mirror.

One thing that did worry me was that I never saw my phone using slot B. That's why I flashed an older stock build, booted up, skip through the setup, and let the OTA process take an update to a more recent version. Hoping that an update process might help ensure both slots are stock. I don't completely understand the slot stuff because I never saw it switch between boots so maybe it wasn't a needed step.
 
Last edited:

jDally987

Senior Member
Jul 13, 2012
87
21
MD
As money as it may be, it doesn't offer the way to do it safely.
It's 50 cents of money vs. $500.




[update]
I just relocked my bootloader and I'm doing fine. Basically I just reversed the steps to get unlocked.


1) disable any lockscreen security, enable OEM unlocking and USB debugging
2)
Code:
adb reboot bootloader
3) download a fastboot image of the stock ROM from the Essential support site
and install using their instructions. Personally, I used a previous version and then started up the phone, skipped through the setup screens and then let it do an OTA update to the latest version. This ensured I was back on the Essential OTA update path.


4) reboot back into bootloader and issued a
Code:
fastboot -w
to wipe my data. This might not be necessary but whatever.


5) next, I issued the
Code:
fastboot flashing lock_critical
to relock the critical partitions
6) I think my phone rebooted again so once it got back to the essential setup screen I did a power + volume down to get back into the bootloader & issued
Code:
fastboot flashing lock
. the phone rebooted again and I went into bootloader one last time to confirm the bootloader is locked.

Thanks, great guide, worked perfectly for me.
I used the NMK24B Nougat build off essential's site, I'm now locked and on stock, ready to send it back for RMA.

The "fastboot -w" is - ahem - essential here. I experimented by not doing that after I flashed the stock rom build, and got a bootloop. Reboot to bootloader and fastboot -w did the trick.
 

fastjohnson

Senior Member
Dec 28, 2015
296
48
48
sanford
So if my bootloader is unlocked and on slot B has twrp installed ( working ) and no root just recovery that's it and on slot A is completely stock no root no recovery just the BL is unlocked, and no cutom roms were installed on either slot just basically a modded rooted with custom recovery on slot B. So basically i can't just ( fastboot flashing lock ) the BL W/O having a brick after or some kind of issue. weird slot B is running build # ppr1-181005-034 and using elementalx kernel that was baked into the twrp i flashed and i believe it's pre- rooted. Slot A is running bone stock ppr1-181005-076 with the stock pre installed kernel november 5th patch. And iv'e checked and uninstalled magisk and did a root check and it says no root installed on either slot but on slot B i can still get into twrp recovery and it fully works. kinda confused and my mind thinks on slot A thats not modded or anything just the BL is unlocked that i can relock that slot and just leave slot B alone and let it just be there. lol ik i'm prob wrong.
 

rignfool

Senior Member
Dec 8, 2010
5,010
2,729
The Poconos
So if my bootloader is unlocked and on slot B has twrp installed ( working ) and no root just recovery that's it and on slot A is completely stock no root no recovery just the BL is unlocked, and no cutom roms were installed on either slot just basically a modded rooted with custom recovery on slot B. So basically i can't just ( fastboot flashing lock ) the BL W/O having a brick after or some kind of issue. weird slot B is running build # ppr1-181005-034 and using elementalx kernel that was baked into the twrp i flashed and i believe it's pre- rooted. Slot A is running bone stock ppr1-181005-076 with the stock pre installed kernel november 5th patch. And iv'e checked and uninstalled magisk and did a root check and it says no root installed on either slot but on slot B i can still get into twrp recovery and it fully works. kinda confused and my mind thinks on slot A thats not modded or anything just the BL is unlocked that i can relock that slot and just leave slot B alone and let it just be there. lol ik i'm prob wrong.
This is why the title of the thread reads what it does...

You're more than welcome to lock in the state you have... YOU'LL JUST HAVE A PAPERWEIGHT...

Please don't be stupid...
 
  • Like
Reactions: NaterTots

jmd8800

Member
Nov 19, 2018
9
7
Has there been a work around to the "Your device is corrupt......." screen yet? I can see the device with 'fastboot devices' and I get "current-slot: _b" using 'fastboot getvar current-slot' command

sudo fastboot -w returns:
wiping userdata...
Creating filesystem with parameters:
Size: 109642608640
Block size: 4096
Blocks per group: 32768
Inodes per group: 8192
Inode size: 256
Journal blocks: 32768
Label:
Blocks: 26768215
Block groups: 817
Reserved block group size: 1024
Created filesystem with 11/6692864 inodes and 468189/26768215 blocks
target reported max download size of 536870912 bytes
erasing 'userdata'...
FAILED (remote: Erase is not allowed in Lock State)
finished. total time: 0.000s

Any adb commands return: error: no devices/emulators found

Is this going to be a nice attractive paperweight waiting to be used for parts?
 

sga999

Senior Member
Mar 13, 2012
808
112
I know this is an old thread. But I'll try posting here anyway.

I got a refurb Essential and updated to stock Android 10 (November). I turned on OEM unlocking in Developer options. Unfortunately, I only did fastboot flashing unlock. I did NOT do fastboot flashing unlock_critical. I tried to do it at a later time, after I saw that I should, but it says it's already unlocked, i.e. FAILED (remote: Device already : unlocked!). I made a possibly poor assumption that both unlocks had somehow worked anyway.

Later when trying to flash twrp.img to the opposite slot, it says: FAILED (remote: Error flashing partition.).
I wonder if it is because I didn't do the unlock_critical. But again, I'm not allowed to do that step now.

So I'm wondering if I should LOCK the bootloader, following detailed steps as described a few pages ago. I don't think locking critical step will work since I don't think that was every accomplished.

On the other hand, if the error when trying to flash TWRP is not related to leaving out the critical unlock step, I probably should not go through with the lock procedure. Any advice about what else could have caused the TWRP flash failure? Or if it really is just the fact that I never accomplished the critical unlock, should I just go ahead with the lock steps? And then go through the unlock again, making sure I do BOTH unlocks this time!

Thanks for your help.

EDIT: I forgot to say that the OEM unlocking option is grayed out. If I am able to get it locked, will that option become available again? And then I would be able to turn it on again to try and do both unlocks?

EDIT2: I am able to fastboot flash boot_a boot.img. So the partition is "okay". But not fastboot flash boot_a twrp.img. Does that make any sense? EDIT: Sorry, I think I used buttons to reboot to the bootloader again. That's when I could fastboot flash boot_a boot.img.

EDIT: Maybe this is my last edit! I finally got it to work, but I'm not sure about the steps. After it failed to flash TWRP, I had to reboot into bootloader and do the flash again. There are several threads about doing this, and maybe one of them explains this. I just didn't happen to find that one!
 
Last edited:

DAE1964

Senior Member
Apr 15, 2012
346
135
Grande Prairie, AB
I know this is an old thread. But I'll try posting here anyway.

I got a refurb Essential and updated to stock Android 10 (November). I turned on OEM unlocking in Developer options. Unfortunately, I only did fastboot flashing unlock. I did NOT do fastboot flashing unlock_critical. I tried to do it at a later time, after I saw that I should, but it says it's already unlocked, i.e. FAILED (remote: Device already : unlocked!). I made a possibly poor assumption that both unlocks had somehow worked anyway.

Later when trying to flash twrp.img to the opposite slot, it says: FAILED (remote: Error flashing partition.).
I wonder if it is because I didn't do the unlock_critical. But again, I'm not allowed to do that step now.

So I'm wondering if I should LOCK the bootloader, following detailed steps as described a few pages ago. I don't think locking critical step will work since I don't think that was every accomplished.

On the other hand, if the error when trying to flash TWRP is not related to leaving out the critical unlock step, I probably should not go through with the lock procedure. Any advice about what else could have caused the TWRP flash failure? Or if it really is just the fact that I never accomplished the critical unlock, should I just go ahead with the lock steps? And then go through the unlock again, making sure I do BOTH unlocks this time!

Thanks for your help.

EDIT: I forgot to say that the OEM unlocking option is grayed out. If I am able to get it locked, will that option become available again? And then I would be able to turn it on again to try and do both unlocks?

EDIT2: I am able to fastboot flash boot_a boot.img. So the partition is "okay". But not fastboot flash boot_a twrp.img. Does that make any sense? EDIT: Sorry, I think I used buttons to reboot to the bootloader again. That's when I could fastboot flash boot_a boot.img.

EDIT: Maybe this is my last edit! I finally got it to work, but I'm not sure about the steps. After it failed to flash TWRP, I had to reboot into bootloader and do the flash again. There are several threads about doing this, and maybe one of them explains this. I just didn't happen to find that one!


https://mata.readthedocs.io/en/latest/

Check out the above link. It explains a lot.

Sent from my PH-1 using XDA Labs
 

Top Liked Posts

  • There are no posts matching your filters.
  • 11
    As a friendly reminder to those unfamiliar with unlocking/re-locking their bootloaders;
    Unless your on 100% stock, and planning on reselling your phone, don't re-lock the bootloader.

    For some reason re-locking the bootloader while you have a custom ROM installed will cause the phone not to boot (in a way, soft bricking it.)

    And, leave "OEM unlocking" in the "Developer Options" CHECKED, once that is unchecked you cannot unlock the phone once a soft brick happens.

    The official advice from Essential about re-locking your phone is ONLY for the official firmware. Pretend they never said that on their site, it has caused more trouble then necessary. It's even dangerous to re-lock while running the Oreo beta.

    Concerning un-bricking the device, at the moment there is no known way.
    And it will be this way until someone figures out a way to exploit the bootloader or reverse engineer it.

    So please don't flood this thread with asking for help to un-brick your device, I nor anyone else can help you on that at this given time, all I'm doing is trying to is prevent that happening.

    So, safe unlocking! And happy holidays!

    EDITS:
    1) According to some reports, when you lock your bootloader it will also automatically untoggle the "OEM Unlocking" option.
    2) It appears when re-locking the phone on a non-stock ROM some partitions are becoming corrupt, and resulting in the "red boot warning" screen. Under most circumstances you can fix that screen, but not while the bootloader is locked (since you need the fastboot flash command.)
    3) When the partitions become corrupt you cannot boot into any mode, including the stock recovery. This is why Essential's suggestions are pointless at this stage of the brick.
    3
    This OP is money and sage advice. @Ellipses and myself aren't going to tell anybody to "just do this", to each their own. But we know the consequences of a simple mistake with this device.

    As money as it may be, it doesn't offer the way to do it safely.
    It's 50 cents of money vs. $500.




    [update]
    I just relocked my bootloader and I'm doing fine. Basically I just reversed the steps to get unlocked.


    1) disable any lockscreen security, enable OEM unlocking and USB debugging
    2)
    Code:
    adb reboot bootloader
    3) download a fastboot image of the stock ROM from the Essential support site
    and install using their instructions. Personally, I used a previous version and then started up the phone, skipped through the setup screens and then let it do an OTA update to the latest version. This ensured I was back on the Essential OTA update path.


    4) reboot back into bootloader and issued a
    Code:
    fastboot -w
    to wipe my data. This might not be necessary but whatever.


    5) next, I issued the
    Code:
    fastboot flashing lock_critical
    to relock the critical partitions
    6) I think my phone rebooted again so once it got back to the essential setup screen I did a power + volume down to get back into the bootloader & issued
    Code:
    fastboot flashing lock
    . the phone rebooted again and I went into bootloader one last time to confirm the bootloader is locked.
    2
    Seriously? You plagiarize what I just wrote... only with less detail and useless dragon phrases. What is your point?

    Actually, this discussion was happening 3 days ago in the stock firmware thread... and numerous other times throughout other threads. What @aer0zer0 stressed was that he has seen some go through the re-lock steps and not verify their device is bootable between steps, leading to a brick. Hence why I posted this https://forum.xda-developers.com/showpost.php?p=77300085&postcount=843. My mistake for being lazy and not posting commands with the proper forum formatting...

    So if you are hung up on who 'plagarized' who... I will take my royalty check at any time.... How about we are all here trying to help one another, especially with a procedure that can turn a device into an expensive paperweight.
    2
    You do not need a locked bl to get the OTA.

    I got it on Sprint last night. With an unlocked BL

    As did I. I feel like people are trying their hardest to brick their phones.
    2
    Thanks for clearing that up. If I have any more questions before returning to stock, I will ask here first.

    Was not trying to be harsh but it can't be stressed enough that you must be completely stock to lock the boot loader and not have issues.
    I wouldn't lock the BL on a side loaded beta.
    Only lock if you have done a complete flash of stock, released firmware, immediately after the install.
    I might be sounding like an alarmist but I don't want anyone to brick their phone.
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone