Let’s learn how to unlock bootloader in OnePlus devices.
What is a Bootloader?
Bootloader is a software between the phone and the Android operating system. When a device is switched on, it triggers the bootloader and it starts the Android OS. It also contains an additional layer of security which loads the OS that passes the security check. Hence, to install any custom software, you first need to unlock the bootloader to bypass this security layer.
How to Unlock Bootloader in OnePlus Devices?
Enabling Developer Options & USB Debugging
Enable Developer Options on your smartphone. It is a generic process that is usually the same for all android smartphones.
- Go to the phone Settings -> About Phone.
- Find the build number of your device and tap on the build number 7 times to enable developer options.
- Open Developer Options -> Find OEM Unlocking and enable it.
- Now, find USB Debugging, and enable that too.
- Connect your smartphone to your PC and allow USB debugging when asked on your smartphone.
Installing Minimal ADB and Fastboot Tools
Download and install Minimal ADB and Fastboot Tools here.
You can also follow our guide on Installing ADB and Fastboot in Windows Without Android SDK
Extract the file and double click on the .exe file to install the tool. The process is fairly simple. We will need it to unlock the bootloader as well as flash custom recovery on an Android device.
After installation is complete, open the Terminal and navigate to the folder which contains the ADB Tools.
After you are in the directory, follow the set of codes:
This should bring up a random string that indicates that the device is connected. If there is a blank space, there are four possibilities:
- USB Debugging is not enabled,
- Authorization issue with USB Debugging
- Faulty Cable,
- The cable is not connected correctly.
Check all of these and try again.
adb reboot bootloader
This launches the smartphone in Fastboot Mode. This mode enables users to make changes to the android system and to unlock the bootloader.
Type the following code to unlock your bootloader:
fastboot oem unlock
And you just learned how to unlock bootloader in OnePlus device. It is relatively easy to unlock the bootloader on a OnePlus device.
Installing Custom Recovery
After you have learned how to unlock bootloader in OnePlus, you need to download and install a custom recovery on your smartphone if you want to root or install a custom ROM on your device.
TWRP is one of the most popular choices for a custom recovery for an Android device. Check the list of supported OnePlus devices here and download the .img file for your respective device from the TWRP Website.
Rename the file as recovery and place it in the folder with ADB and Fastboot tools.
Open the Terminal on your PC and navigate to the adb folder. Now type in the following commands:
fastboot flash recovery recovery.img
This will flash the custom recovery on your OnePlus device. Now you can easily root your OnePlus device via Magisk.
Check out these articles for your respective Android version:
- How to Root Any Android 10 Q Device
- How to Root Any Android 11 Device