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?
- Setup ADB and Fastboot on your device;
- Connect your device to PC and using USB open the command line on your PC;
- Perform the following command to boot your device in a bootloader mode:
adb reboot bootloader
- 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
- As far as the bootloader has been relocked, reboot your device using the next command
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.