If you’re done experimenting and are going back to complete stock OxygenOS then you’ll want to follow these steps to relock the OnePlus 6 bootloader.
So, last week I showed you the entire process on how to unlock the bootloader of the OnePlus 6. This is required if you want to install any bit of higher level code onto your smartphone that is not officially approved by OnePlus themselves. This includes the core elements that make up an Android device including a custom kernel, a custom ROM, a custom recovery, and even just gaining root access to your smartphone since these all need to make changes to the system partition of Android.
I keep my bootloader unlocked on my devices that I plan on personally using but not everyone is willing to do this. It can even be a security alert if you’re currently trying to sell a smartphone too. Think about it, buying a smartphone with an unlocked bootloader can have any kind of malicious software installed on it and it can go by virtually undetected unless you know what you’re looking for. So, if you’re just worried and you want to go back to complete stock, or if you plan on selling the device to someone else then you’ll likely want to relock the Bootloader of the OnePlus 6.
Fair warning ahead of time. You do not want to have any kind of custom software on your smartphone as you’re about to relock the bootloader. Remember, the platform is programmed to reject pieces of software that aren’t approved by OnePlus so unless you have removed all custom changes (I personally recommend going through a complete unbrick process) to bring you back to complete stock OxygenOS then please do not go through the process of relocking the bootloader.
In order to complete the tutorial below, you're going to need some things set up ahead of time. Please follow the how to install ADB and Fastboot tools guide if you haven't done so already. Then you will need to follow the how to enable Developer Mode guide, as well as the tutorial that shows you how to enable USB Debugging Mode.
You will then need to open a command prompt within the within the same folder as your ADB and Fastboot tools and execute the "adb devices" command (without quotes) to start the ADB service. Then connect the device to the PC with a USB cable and you should see the prompt to grant USB Debugging Mode access from the PC the phone is connected to.
Once granted, you can then test this by running the command "adb devices" again (without quotes) in a command prompt or PowerShell to make sure the computer recognizes the device.
Relock the OnePlus 6 Bootloader Tutorial
- Again, make sure you’re one 100% complete stock software from OnePlus
- Boot the OnePlus 6 into Fastboot Mode
- Connect the OnePlus 6 to the PC with a USB cable
- Then open up a Command Prompt in the same folder as your ADB and Fastboot tools
- Type the following command. . .
- fastboot flashing lock
- . . .and press Enter on the keyboard
- Look at the new relock bootloader screen of the OnePlus 6
- Press the Volume Down button a couple of times to highlight the confirmation option
- Then press the Power button to select it
- Wait for the OnePlus 6 to reboot, perform a factory data reset, then reboot again
- This last boot cycle will take longer than normal as the phone has to setup and activate Android from scratch again
- Disable the OEM Unlock feature
So, for the third and final warning, please do not attempt to relock the OnePlus 6 bootloader when you have 3rd-party software installed on the system partition. The reason why I recommend you going through the unbrick process is because that will assuredly bring you back to stock everything on the phone. While in some cases simply uninstalling a modification from the developer community may end up leaving some spare files behind due to not cleaning everything up properly.
And just like I warned when unlocking the OnePlus 6 bootloader, this will wipe all of the data off your smartphone. So please backup as much of your data as possible before you begin. Once you are sure you’re ready then we can start by booting the OnePlus 6 into Fastboot Mode. Then you will need to connect the phone to the PC with a USB cable and then you can go ahead and open up a Command Prompt. If you can, open this up in the same folder as the ADB and Fastboot tools or you will need to browse to that folder manually.
When you’re ready to get to the good part, go ahead and type the fastboot flashing lock command in the Command Prompt and then press the Enter button on the keyboard. Assuming everything went okay up until now, you should instantly see the screen of the OnePlus 6 change to the lock bootloader warning screen. Just like when unlocking it, we want to press the Volume Down button a couple of times to select the option that will lock the bootloader and then press the Power button to select it.
The OnePlus 6 will reboot very quickly as it goes into the factory data reset process for security reasons. When it finishes then it will automatically reboot again and it will begin to boot back into OxygenOS and the Android activation screen. Remember, we just did a factory data reset so this first boot cycle will take much longer than you may be used to. You can follow along with me in the embedded video above if you’d like, but just know that this part can take a few minutes to finish up.
So be patient and you will be taken to the Android activation screen for OxygenOS. After you have set your phone back up to how you like it, you’ll want to dive back into the Developer Options menu so that you can disable the OEM Unlock toggle that we enabled to unlock the bootloader.
If this tutorial helped you in any way, please consider donating via PayPal, Patreon, Cryptocurrency, or GoFundMe. If you can't afford to donate then sharing this on social networks such as Facebook, Twitter, XDA, forums, etc. will also help a lot. I would also appreciate suggestions for Android tips and tutorials that you would like to see in the future.