![Forrest logo](/images/logo.png)
fastboot:tldr:7b5ee
The command "fastboot oem lock" is used in Android devices to lock the bootloader. A bootloader is a program that runs when a device is powered on, and it is responsible for loading the operating system. By default, the bootloader is unlocked, allowing users to modify and customize their device by installing custom recoveries, rooting the device, or flashing custom ROMs.
However, there are situations where it is necessary or preferred to lock the bootloader for security reasons. For example, if a user wants to ensure the integrity and security of their device, they can choose to lock the bootloader to prevent unauthorized modifications or tampering.
When the "fastboot oem lock" command is executed, it sends a command from a connected computer to the Android device's bootloader, instructing it to lock itself. Once locked, the bootloader will restrict the device from booting into custom recoveries or installing unauthorized software. This helps to protect the device against potential security risks and ensures that the user is running an official, unmodified software version.