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

Problem when re-locking

Search This thread

SD008

Member
Aug 23, 2017
20
4
I need to relock the bootloader, but the fastboot oem lock command doesn't work saying

C:\G5>fastboot oem lock
...
(bootloader) Check 'Allow OEM Unlock' in Android Settings > Developer
(bootloader) Options
OKAY [ 0.002s]
finished. total time: 0.003s

But that option is greyed out. I'm on POTTER_NPN25.137-92 Stock ROM with unlocked bootloader (XT1686).

Please help!
 

acejavelin

Recognized Contributor
Sep 3, 2009
6,835
3,321
Lincoln, ND
I need to relock the bootloader, but the fastboot oem lock command doesn't work saying

C:\G5>fastboot oem lock
...
(bootloader) Check 'Allow OEM Unlock' in Android Settings > Developer
(bootloader) Options
OKAY [ 0.002s]
finished. total time: 0.003s

But that option is greyed out. I'm on POTTER_NPN25.137-92 Stock ROM with unlocked bootloader (XT1686).

Please help!
Because that isn't how you lock the bootloader on Moto devices... you can't just lock your bootloader on the fly, it can only be down with a full factory image flash. In your case, it is something like this:

'fastboot oem lock ' <get prompted to make sure you want to this and enter command again>
'fastboot oem lock'

Then fastboot flash the full factory image of NPN25.137-92 or newer ROM for your device, including all wipes, and end it with

`fastboot oem lock` - but this will only work if you used oem lock at the beginning and in conjunction with a complete image flash.

There are tutorials on here how to do it, a little research in the forums here will yield a couple different tutorials.

BTW, it is well known that relocking the bootloader on the Moto G5 series is problematic... Sometimes it doesn't work, and sometimes it bricks.

Remember that regardless of if you relock or not, the bootloader unlock warning screen will always be there, and the bootloader will never go back to Status 0 - Locked, it will become Status 2 - Relocked so it is still a clear indication the phone was modified at one point.
 
Last edited:
  • Like
Reactions: Wolfcity and echo92

SD008

Member
Aug 23, 2017
20
4
After a lot of Googling I was able to find the solution. Had to search high and low for it, finally found the relevant information in the Oneplus 5 subforums. What I needed to do was flash Magisk and then the OEM unlock option becomes usable again. For anyone facing a similar issue, flash either stock or a stock-based rom along woth Magisk and enable OEM unlock in the dev options and the you should be able to re-lock.



Because that isn't how you lock the bootloader on Moto devices... you can't just lock your bootloader on the fly, it can only be down with a full factory image flash. In your case, it is something like this:

'fastboot oem lock ' <get prompted to make sure you want to this and enter command again>
'fastboot oem lock'

Then fastboot flash the full factory image of NPN25.137-92 or newer ROM for your device, including all wipes, and end it with

`fastboot oem lock` - but this will only work if you used oem lock at the beginning and in conjunction with a complete image flash.

There are tutorials on here how to do it, a little research in the forums here will yield a couple different tutorials.

BTW, it is well known that relocking the bootloader on the Moto G5 series is problematic... Sometimes it doesn't work, and sometimes it bricks.

Remember that regardless of if you relock or not, the bootloader unlock warning screen will always be there, and the bootloader will never go back to Status 0 - Locked, it will become Status 2 - Relocked so it is still a clear indication the phone was modified at one point.

It's funny how you automatically assumed that I didn't see any of the 3 or 4 guides posted in here and just straight-up made a thread to beg for help. Obviously I flashed a stock firmware before beginning the locking process (and after it too), but as I clearly mentioned in the OP, the problem was that due to the Allow OEM switch being disabled and greyed out, the 'fastboot oem lock' command was not doing its thing. Had it worked properly, it'd tell me to proceed with flashing the system chunks, but it didn't. So yeah, what you said wasn't really helpful. Thanks anyway for taking the time to reply. Just please don't assume w/o any evidence that someone is so ignorant as to not read a guide and beg for answers. There are many people like me who only lurk and do everything by following tutorials and only ever post if all else fails.
 
Last edited:

sinchan_nohara

Senior Member
Mar 20, 2015
507
196
Redmi Note 8 Pro
After a lot of Googling I was able to find the solution. Had to search high and low for it, finally found the relevant information in the Oneplus 5 subforums. What I needed to do was flash Magisk and then the OEM unlock option becomes usable again. For anyone facing a similar issue, flash either stock or a stock-based rom along woth Magisk and enable OEM unlock in the dev options and the you should be able to re-lock.





It's funny how you automatically assumed that I didn't see any of the 3 or 4 guides posted in here and just straight-up made a thread to beg for help. Obviously I flashed a stock firmware before beginning the locking process (and after it too), but as I clearly mentioned in the OP, the problem was that due to the Allow OEM switch being disabled and greyed out, the 'fastboot oem lock' command was not doing its thing. Had it worked properly, it'd tell me to proceed with flashing the system chunks, but it didn't. So yeah, what you said wasn't really helpful. Thanks anyway for taking the time to reply. Just please don't assume w/o any evidence that someone is so ignorant as to not read a guide and beg for answers. There are many people like me who only lurk and do everything by following tutorials and only ever post if all else fails.


Hi I want to ask a question I restored my nandroid stock backup VoLTE , LTE everything is working fine. I have Moto stock recovery but on device bootup it shows bootloader unlocked sign.

Can I install updates when update come without any issue or will it brick my device I have stock moto recovery
 

Wolfcity

Recognized Contributor
Apr 26, 2013
4,350
2,753
Germany
Moto G 2014
Moto G5 Plus
Hi I want to ask a question I restored my nandroid stock backup VoLTE , LTE everything is working fine. I have Moto stock recovery but on device bootup it shows bootloader unlocked sign.

Can I install updates when update come without any issue or will it brick my device I have stock moto recovery
If you haven't changed anything in /system or /vendor and your device is stock unrooted there's no problem with OTA updates. If you flashed the stock logo.bin everything is ok even when it shows BL is unlocked.

Sent from my Moto G5 Plus using XDA Labs
 

acejavelin

Recognized Contributor
Sep 3, 2009
6,835
3,321
Lincoln, ND
After a lot of Googling I was able to find the solution. Had to search high and low for it, finally found the relevant information in the Oneplus 5 subforums. What I needed to do was flash Magisk and then the OEM unlock option becomes usable again. For anyone facing a similar issue, flash either stock or a stock-based rom along woth Magisk and enable OEM unlock in the dev options and the you should be able to re-lock.





It's funny how you automatically assumed that I didn't see any of the 3 or 4 guides posted in here and just straight-up made a thread to beg for help. Obviously I flashed a stock firmware before beginning the locking process (and after it too), but as I clearly mentioned in the OP, the problem was that due to the Allow OEM switch being disabled and greyed out, the 'fastboot oem lock' command was not doing its thing. Had it worked properly, it'd tell me to proceed with flashing the system chunks, but it didn't. So yeah, what you said wasn't really helpful. Thanks anyway for taking the time to reply. Just please don't assume w/o any evidence that someone is so ignorant as to not read a guide and beg for answers. There are many people like me who only lurk and do everything by following tutorials and only ever post if all else fails.
I've been here a long time, didn't mean to offend... All I had to go by was your limited information of the first post, I assumed nothing that wasn't included in your post. You didn't state anything that you had tried, so of course I assumed you didn't look because you didn't state anything.

Sorry. I will just bow out and wish you luck.
 
  • Like
Reactions: sd_shadow

Jemec26

Senior Member
Feb 7, 2016
301
128
After a lot of Googling I was able to find the solution. Had to search high and low for it, finally found the relevant information in the Oneplus 5 subforums. What I needed to do was flash Magisk and then the OEM unlock option becomes usable again. For anyone facing a similar issue, flash either stock or a stock-based rom along woth Magisk and enable OEM unlock in the dev options and the you should be able to re-lock.

Man, I was having the same issue on my Moto G6 (Ali) and was like you, looking here and there with no solution, and your solution was the only one that worked!! Thank you so much!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    I need to relock the bootloader, but the fastboot oem lock command doesn't work saying

    C:\G5>fastboot oem lock
    ...
    (bootloader) Check 'Allow OEM Unlock' in Android Settings > Developer
    (bootloader) Options
    OKAY [ 0.002s]
    finished. total time: 0.003s

    But that option is greyed out. I'm on POTTER_NPN25.137-92 Stock ROM with unlocked bootloader (XT1686).

    Please help!
    Because that isn't how you lock the bootloader on Moto devices... you can't just lock your bootloader on the fly, it can only be down with a full factory image flash. In your case, it is something like this:

    'fastboot oem lock ' <get prompted to make sure you want to this and enter command again>
    'fastboot oem lock'

    Then fastboot flash the full factory image of NPN25.137-92 or newer ROM for your device, including all wipes, and end it with

    `fastboot oem lock` - but this will only work if you used oem lock at the beginning and in conjunction with a complete image flash.

    There are tutorials on here how to do it, a little research in the forums here will yield a couple different tutorials.

    BTW, it is well known that relocking the bootloader on the Moto G5 series is problematic... Sometimes it doesn't work, and sometimes it bricks.

    Remember that regardless of if you relock or not, the bootloader unlock warning screen will always be there, and the bootloader will never go back to Status 0 - Locked, it will become Status 2 - Relocked so it is still a clear indication the phone was modified at one point.
    1
    After a lot of Googling I was able to find the solution. Had to search high and low for it, finally found the relevant information in the Oneplus 5 subforums. What I needed to do was flash Magisk and then the OEM unlock option becomes usable again. For anyone facing a similar issue, flash either stock or a stock-based rom along woth Magisk and enable OEM unlock in the dev options and the you should be able to re-lock.





    It's funny how you automatically assumed that I didn't see any of the 3 or 4 guides posted in here and just straight-up made a thread to beg for help. Obviously I flashed a stock firmware before beginning the locking process (and after it too), but as I clearly mentioned in the OP, the problem was that due to the Allow OEM switch being disabled and greyed out, the 'fastboot oem lock' command was not doing its thing. Had it worked properly, it'd tell me to proceed with flashing the system chunks, but it didn't. So yeah, what you said wasn't really helpful. Thanks anyway for taking the time to reply. Just please don't assume w/o any evidence that someone is so ignorant as to not read a guide and beg for answers. There are many people like me who only lurk and do everything by following tutorials and only ever post if all else fails.
    I've been here a long time, didn't mean to offend... All I had to go by was your limited information of the first post, I assumed nothing that wasn't included in your post. You didn't state anything that you had tried, so of course I assumed you didn't look because you didn't state anything.

    Sorry. I will just bow out and wish you luck.