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.

Relock the OnePlus 6 Bootloader Tutorial

  1. Again, make sure you’re one 100% complete stock software from OnePlus
  2. Boot the OnePlus 6 into Fastboot Mode
  3. Connect the OnePlus 6 to the PC with a USB cable
  4. Then open up a Command Prompt in the same folder as your ADB and Fastboot tools
  5. Type the following command. . .
  6. fastboot flashing lock
  7. . . .and press Enter on the keyboard
  8. Look at the new relock bootloader screen of the OnePlus 6
  9. Press the Volume Down button a couple of times to highlight the confirmation option
  10. Then press the Power button to select it
  11. Wait for the OnePlus 6 to reboot, perform a factory data reset, then reboot again
  12. This last boot cycle will take longer than normal as the phone has to setup and activate Android from scratch again
  13. 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.

OnePlus 6 Relock Bootloader Confirm
You’ll be asked to confirm if you want to relock the bootloader of the OnePlus 6.

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.


  1. Since you were already connected to your host via usb, why didn’t you just do ‘adb reboot bootloader’ instead of messing with power and volume buttons?

  2. ADB shows no devices found when booted into bootloader. ADB is able to boot the phone into bootloader just says no device after booting into bootloader

  3. So I had an oem unlocked bootloader on both OnePlus 6T and 7 Pro. Android 9 (last version was 9.0.11, I think)…

    But when I upgraded to Android 10 it re-locked the bootloader. The oem unlock toggle are greyed out. I can’t get fastboot oem unlock nor fastboot oem get_unlock_code to work.

    Any suggestions in getting back oem unlock to work on Android 10 ???


Please enter your comment!
Please enter your name here