After unlocking the bootloader, it is also necessary to know how to lock it. Preventing security vulnerabilities is one of the most important things when sending the phone for service, installing the firmware and closing the lock. You will now see how to close the lock after unlocking.
Be sure you’re on stock ROM before lock bootloader
First of all, you should make sure that your device is completely factory software installed. Your device may become unusable if you lock the bootloader while a system change, root and similar things are done. The right thing to do is to reinstall the stock ROM on your device.
Enable developer options
Go to “Settings” on your OnePlus device, scroll down to “About phone,” and tap on it. Look for “Build number” and tap it seven times. This will enable developer options on your device.
Enable USB Debugging
Go back to “Settings” and tap on “System” and then “Developer options.” Scroll down and find “USB debugging” and toggle it on.
Boot your device into Fastboot mode
- Open CMD and type “adb reboot bootloader”
- Give USB debugging access on your phone.
- Your phone should be in fastboot mode.
Check if your device is detected
Open a command prompt or terminal on your computer and type “fastboot devices” to check if your device is detected. If your device is detected, you will see its serial number.
Lock the bootloader
Type “fastboot flashing lock” or “fastboot oem lock” and press Enter.
Allow bootloader locking
A notification will appear on your screen. Select “lock the bootloader” option using volume and power buttons. Your OnePlus device will reboot, and the bootloader will be locked.
That’s it! You have successfully did lock bootloader process of your OnePlus device.