How to Lock the Bootloader on a Google Pixel Phone: Step-by-Step Guide
Locking the bootloader on a Google Pixel phone is an important security measure that can prevent unauthorized modifications to the operating system. Here is a detailed guide on how to lock the bootloader on a Google Pixel phone including the Google Pixel 7 Pro, Pixel 7, Pixel 6a, Pixel 6, Pixel 6 Pro, Pixel 5 xl, Pixel 5a, Pixel 5, Pixel 4 xl, Pixel 4a 5g, Pixel 4, Pixel 3 xl, Pixel 3 and older models.
The bootloader is a program that is responsible for loading the operating system on your phone. If the bootloader is unlocked, it allows anyone to install custom firmware or modify the operating system, which can potentially expose your phone to security vulnerabilities or even cause permanent damage to the device. By locking the bootloader, you prevent unauthorized modifications to your phone’s operating system, which helps to ensure the security and stability of your device.
Most users are endup bricking their devices not knowing the exact steps on how to safely and use the right method to lock the bootloader. If you try to lock the bootloader on a custom init_boot.img that is rooted with Magisk, will endup bricking your device giving you errors like, “Your device is corrupt” or “No valid operating system could be found.
Requirements:
Before you start, ensure that you fulfil the following requirements before proceeding further:
- Your phone is running on the stock firmware. If your phone is rooted with Magisk, you will need to flash a stock factory image before proceeding with the locking process.
- Enable USB debugging on your phone,
- Locking the bootloader will erase and factory reset your phone so, back up all of your data
- Finally install adb and fastboot drivers on your PC.
How to Lock the Bootloader
The following are steps to safely lock the bootloader on your Google Pixel device without bricking it.
Step 1: Connect Your Phone to Your PC
Connect your Google Pixel phone to your PC using a USB cable.
Step 2: Open Command Prompt
Open a Command Prompt window on your PC.
All ADB and Fastboot commands to lock the bootloader
Step 3: Check Device Connection
In the Command Prompt window, type “adb devices” and press Enter. This will display a list of devices connected to your PC. Check if your phone is recognized by the PC. If your phone is not recognized, make sure that USB debugging is enabled on your phone and that the USB cable is securely connected.
Step 4: Reboot into Fastboot Mode
Type “adb reboot bootloader” in the Command Prompt window and press Enter. This will reboot your phone into fastboot mode.
Step 5: Verify Device Connection in Fastboot Mode
Type “fastboot devices” in the Command Prompt window and press Enter. This command will verify that your phone is connected to your PC in fastboot mode.
Step 6: Lock the Bootloader
Type “fastboot flashing lock” in the Command Prompt window and press Enter. This command will lock the bootloader on your phone. Your phone will prompt you to confirm the locking process. Use the Volume keys to select the option to lock the bootloader and press the Power key to confirm.
If you lock the bootloader you will not be able to install custom operating system on this phone.
Step 7: Restart Your Phone
Type “fastboot reboot” in the Command Prompt window and press Enter. This command will restart your phone.
Step 8: Set Up Your Phone
After your phone has restarted, you will need to set it up like you would normally do after a factory reset. You will also need to re-enable developer options and USB debugging on your phone.
Conclusion
Locking the bootloader on your Google Pixel phone is an important security measure that can help prevent unauthorized modifications to your phone’s operating system. By following the steps outlined in this guide, you can easily lock the bootloader on your Google Pixel phone. Later, if you change your mind, unlocking the bootloader again then follow this unlock guide.