How to Relock Bootloader via Fastboot on Android devices?

In spite of having an unlocked bootloader is useful in many ways, for example, a kernel firmware and recovery (factory images), installing an alternative custom recovery image (TWRP) and getting root access, its presence can also lead to block certain services on your device for security reasons. So, you might want to relock a bootloader to use those services.

Several months ago Google released an update for defense system SafetyNet. Now, when running this app a device bootloader status (relock or not) is also examined. Certain services, for example Android Pay, might be disabled due to that status.

Mercifully, having a relocked bootloader can solve the problem of services running. Naturally, when installing a relocked bootloader on your device, you will lose all advantages, which come with its unlock status.

The fastboot commands necessary to reboot a bootloader are not the same for all devices. Hence we had to consolidate a list of all known Fastboot commands, which you can use to relock a bootloader on your device employing the instructions below.

How to relock Bootloader via Fastboot?

  1. Setup ADB and Fastboot on your device;
  2. Connect your device to PC and using USB open the command line on your PC;
  3. Perform the following command to boot your device in a bootloader mode:

    adb reboot bootloader

  4. Now, run a command to reboot a bootloader. You don’t have to employ all commands below. It is just fine to use one, which works for you. Have you found it? Go to the next step.

    fastboot oem lock
    fastboot flashing lock
    fastboot oem relock

  5. As far as the bootloader has been relocked, reboot your device using the next command

    fastboot reboot

That’s just it! If you have other ways to solve the problem (there are many of them, we have chosen the easiest one), please, share your experience with us in Comments below.

About Gavin

Editor @ android-fix.com. Gavin is a mechanical engineer by trade, but he's also a tech enthusiast. He spends his time working on Android-Fix and enjoys blogging about the latest trends in the mobile industry. His hobbies include cooking, traveling, and playing soccer with friends.

7 thoughts on “How to Relock Bootloader via Fastboot on Android devices?”

  1. hi there, i did this method because my phone does not have OEM Lockink option in developer settings. i both try this on windows 10 and 7 but the result is same. my drivers up to date. everythigs is fine but whenever i try to command in cmd, till \”adb reboot bootlader\” is ok, but after \”fastboot oem lock\” cmd says <waiting for any device> and it stucks. i cant write any comand nothing happens. as i said i did all what i needed to do. usb debugging is enable. i tried another usb port another pc. every time it stucks there. and i really have to relock the oem because of frp lock issue. i rooted my phone and i cant add my google account to me phone because of frp lock. i need your help, thank you.

    Reply
    • Hi Fatih Gunes, My name is Raghav and i am from India. The problem you are facing is dur to outdated drivers for adb devices.
      When you enter fastboot mode by entering adb fastboot reboot, go to manage device drivers on your pc and there will be showing a yellow mark on the adb device drivers tab. Just update that driver and your problem will be solved. Check if your device supports fastboot by typing fastboot devices after entering fastboot mode. I hope this will help you
      Thank you.

      Reply
  2. root@my-desktop:/home/myuser/Downloads/flashtools# fastboot flashing lock

    FAILED (remote: password wrong)
    finished. total time: 0.003s

    WTF?!

    Reply

Leave a Comment