How do i lock the bootloader in my motorola one action?

Search This thread

georg3_

Senior Member
  • Like
Reactions: raphaelgamer981

raphaelgamer981

Senior Member
Jun 22, 2020
103
25
13
Brazil
Nexus 6
Xiaomi Redmi Note 4
What are the steps you took before relocking the bootloader? In my experience, relocking the bootloader should be the last thing you do, after you've got a working/bootable stock ROM.
So, after i installed the latest stock rom, the device worked normally, but after waiting a while for the oem lock option appear in development options, it din´t show up. so i just gave up and installed lineage 19.1 but if i can i want to lock the bootloader again.
 
Last edited:

arsradu

Senior Member
Apr 28, 2011
3,516
3,373
Motorola One Action
Moto G40 / G60
So, after i installed the latest stock rom, the device worked normally, but after waiting a while for the oem lock option appear in development options, it din´t show up. so i just gave up and installed lineage 19.1 but if i can i want to lock the bootloader again.
So, the OEM lock/unlock thing comes with a pretty big caveat, and you need to be aware of it: loss of data.

Every time you lock or unlock your bootloader, a wipe data is triggered.

Now, for as far as I know, to lock the bootloader, you need two things:
1. Stock ROM. Don't do this on a custom ROM!
2. following command, in Terminal/Cmd Prompt
fastboot oem lock

Of course, you need to be in fastboot mode, so if you're not, and if you're booted and connected via USB (USB debugging needs to be ON and RSA fingerprinting accepted), do:

adb devices
It should display your device here. This is just to make sure ADB is working properly.

adb reboot bootloader
At this point, the phone should reboot into bootloader, so now you can do the lock command

fastboot oem lock
Data should be erased and, in case it doesn't automatically boot up, you can reboot the phone.

Don't worry about the OEM unlocking option in Developer Options. You just make sure the stock ROM is functional before attempting to relock the bootloader.
 
Last edited:
  • Like
Reactions: raphaelgamer981

raphaelgamer981

Senior Member
Jun 22, 2020
103
25
13
Brazil
Nexus 6
Xiaomi Redmi Note 4
So, the OEM lock/unlock thing comes with a pretty big caveat, and you need to be aware of it: loss of data.

Every time you lock or unlock your bootloader, a wipe data is triggered.

Now, for as far as I know, to lock the bootloader, you need two things:
1. Stock ROM. Don't do this on a custom ROM!
2. following command, in Terminal/Cmd Prompt
fastboot oem lock

Of course, you need to be in fastboot mode, so if you're not, and if you're booted and connected via USB (USB debugging needs to be ON and RSA fingerprinting accepted), do:

adb devices
It should display your device here. This is just to make sure ADB is working properly.

adb reboot bootloader
At this point, the phone should reboot into bootloader, so now you can do the lock command

fastboot oem lock
Data should be erased and, in case it doesn't automatically boot up, you can reboot the phone.

Don't worry about the OEM unlocking option in Developer Options. You just make sure the stock ROM is functional before attempting to relock the bootloader.
I tried that, and it din´t work, this method is the same that was in a help thread in xda forum of my device, this command works fine in my nexus 6, but on my moto one action it does not, i unlocked my bootloader via the normal method using motorola´s website, not using another method.
 

arsradu

Senior Member
Apr 28, 2011
3,516
3,373
Motorola One Action
Moto G40 / G60
I tried that, and it din´t work, this method is the same that was in a help thread in xda forum of my device, this command works fine in my nexus 6, but on my moto one action it does not, i unlocked my bootloader via the normal method using motorola´s website, not using another method.
But why do you say it didn't work? Do you get an error at any point during the process?
 

arsradu

Senior Member
Apr 28, 2011
3,516
3,373
Motorola One Action
Moto G40 / G60
Is it greyed out in the on or off position? Can you attach a screenshot? I don't remember the operations sequence... But I think the option was automatically switched back to the original position (off) when you lock the bootloader. I could be wrong though. So...when you run the "fastboot oem lock" command, it asks you to....what?
Set the option to on or off? Some screenshots from both the PC, with the message, and the developer options might help to clarify this.
 
Last edited:

raphaelgamer981

Senior Member
Jun 22, 2020
103
25
13
Brazil
Nexus 6
Xiaomi Redmi Note 4
Is it greyed out in the on or off position? Can you attach a screenshot? I don't remember the operations sequence... But I think the option was automatically switched back to the original position (off) when you lock the bootloader. I could be wrong though. So...when you run the "fastboot oem lock" command, it asks you to....what?
Set the option to on or off? Some screenshots from both the PC, with the message, and the developer options might help to clarify this.
it is greyed in the on position, i can´t add a screenshot because i am in lineage 19.1 with root and the option shows up,when i run the command in cmd, it says to me to check the oem lock option in developer options
 

arsradu

Senior Member
Apr 28, 2011
3,516
3,373
Motorola One Action
Moto G40 / G60
it is greyed in the on position, i can´t add a screenshot because i am in lineage 19.1 with root and the option shows up,when i run the command in cmd, it says to me to check the oem lock option in developer options
A screenshot would be really useful. But don't worry about it. When you're back to stock rom and ready to lock your bootloader, we can resume this then. I think either we're missing something, or it's everything ok, and you just need to switch that option off. Though, I remember I didn't have to do it manually. But I could be wrong though.

So, don't worry. Enjoy LineageOS and we can resume this when you're back to stock ROM and ready to lock. :)
 

raphaelgamer981

Senior Member
Jun 22, 2020
103
25
13
Brazil
Nexus 6
Xiaomi Redmi Note 4
A screenshot would be really useful. But don't worry about it. When you're back to stock rom and ready to lock your bootloader, we can resume this then. I think either we're missing something, or it's everything ok, and you just need to switch that option off. Though, I remember I didn't have to do it manually. But I could be wrong though.

So, don't worry. Enjoy LineageOS and we can resume this when you're back to stock ROM and ready to lock. :)
ok thanks for your help!
 

raphaelgamer981

Senior Member
Jun 22, 2020
103
25
13
Brazil
Nexus 6
Xiaomi Redmi Note 4
A screenshot would be really useful. But don't worry about it. When you're back to stock rom and ready to lock your bootloader, we can resume this then. I think either we're missing something, or it's everything ok, and you just need to switch that option off. Though, I remember I didn't have to do it manually. But I could be wrong though.

So, don't worry. Enjoy LineageOS and we can resume this when you're back to stock ROM and ready to lock. :)
hello, so i want to lock the bootloader again, how do i install the stock rom back?
 

raphaelgamer981

Senior Member
Jun 22, 2020
103
25
13
Brazil
Nexus 6
Xiaomi Redmi Note 4
A screenshot would be really useful. But don't worry about it. When you're back to stock rom and ready to lock your bootloader, we can resume this then. I think either we're missing something, or it's everything ok, and you just need to switch that option off. Though, I remember I didn't have to do it manually. But I could be wrong though.

So, don't worry. Enjoy LineageOS and we can resume this when you're back to stock ROM and ready to lock. :)
so after running the fastboot oem lock command, it asked this in the cmd
C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot oem lock
...
(bootloader) Check 'Allow OEM Unlock' in Android Settings > Developer
(bootloader) Options
OKAY [ 0.080s]
finished. total time: 0.080s
when i rebooted the phone, it showed the screen saying that the bootloader was unlocked. also i had to re run the command because it was going to erase my phone but that din´t happend, after going to developer options the option was still greyed out.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Hello, i unlocked the bootloader of my motorola one action. And i installed lineage 18.1 official, but i want to lock the bootloader again. i tried locking the bootloader using this help thread https://forum.xda-developers.com/t/...-2019-ask-any-question-noob-friendly.4010875/ but it din't work. Can somewone help me?
    NEVER lock a phone with custom firmware installed. This usually leads to bootloops.
    1
    No, I Didn't try to lock the bootloader with a custom firmware.
    What are the steps you took before relocking the bootloader?
    In my experience, relocking the bootloader should be the last thing you do, after you've got a working/bootable stock ROM.
    1
    Raphael, I think you might have quoted my post twice, but didn't add an actual answer. Or maybe I'm super blind and I can't see it. :)
    1
    So, after i installed the latest stock rom, the device worked normally, but after waiting a while for the oem lock option appear in development options, it din´t show up. so i just gave up and installed lineage 19.1 but if i can i want to lock the bootloader again.
    So, the OEM lock/unlock thing comes with a pretty big caveat, and you need to be aware of it: loss of data.

    Every time you lock or unlock your bootloader, a wipe data is triggered.

    Now, for as far as I know, to lock the bootloader, you need two things:
    1. Stock ROM. Don't do this on a custom ROM!
    2. following command, in Terminal/Cmd Prompt
    fastboot oem lock

    Of course, you need to be in fastboot mode, so if you're not, and if you're booted and connected via USB (USB debugging needs to be ON and RSA fingerprinting accepted), do:

    adb devices
    It should display your device here. This is just to make sure ADB is working properly.

    adb reboot bootloader
    At this point, the phone should reboot into bootloader, so now you can do the lock command

    fastboot oem lock
    Data should be erased and, in case it doesn't automatically boot up, you can reboot the phone.

    Don't worry about the OEM unlocking option in Developer Options. You just make sure the stock ROM is functional before attempting to relock the bootloader.