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.

Write a comment

  • reload, if the code cannot be seen

Recent Comments

Kim
But what happens if this is not an edu account. This was not very helpful. >:-( Didn't even mention the other case.
solomon
Its not working still please fix this
Susana
Hi,
thanks for the help (nougat) worked on the description. Fantastic:-)
ARTHUR UMAR
how to fix error code hf-01