OnePlus is one of the very few manufacturers that encourages rooting its devices. It's no wonder, then, that the OnePlus 6T is the best phone right now if you want to tinker with custom ROMs. It's just as straightforward to unlock a OnePlus phone as it is a Pixel, and doing so lets you install additional frameworks like Xposed or flash custom ROMs.
Before you root the phone, you'll have to unlock the bootloader and install a custom recovery like TWRP. You'll also need a Mac or PC to send commands to your phone, and a few tools:
- TWRP 3.2.3 custom recovery (.img file)
- TWRP 3.2.3 custom recovery (.zip file)
- Minimal ADB and Fastboot (for Windows users)
- Magisk v17.3 (.zip file)
I'll be using the OnePlus 6T as a reference device for this guide, but the steps outlined below should work for older devices as well. Just make sure you download the TWRP recovery for your OnePlus device.
How to unlock the bootloader on your OnePlus phone
Unlocking the bootloader lets you easily flash custom ROMs onto your device. Before we start, it's advisable to back up the data on your phone.
- Open Settings from the app drawer or home screen.
- Scroll down to the bottom of the page.
Tap About phone.
- Tap the build number seven times.
- Go back and tap the System sub-menu.
Tap Developer options.
- Toggle OEM unlocking and enter the device PIN.
- Tap Enable.
Scroll down and toggle USB debugging.
Now the bootloader is ready to be unlocked. Connect your OnePlus phone to your PC via the bundled USB cable and extract Minimal ADB and Fastboot. Launch a command window in that folder by holding down the Shift key on your keyboard, right-clicking with your mouse and selecting Open PowerShell window here from the context menu. Once you get PowerShell running, key in the following command:
adb reboot bootloader
The device will boot into the fastboot menu, and you'll be able to see the bootloader status — whether it's locked or unlocked — at the bottom of the menu. Enter the following command to unlock the bootloader:
fastboot oem unlock
Once you issue the command, you'll see a confirmation message on your device. Use the volume keys to select UNLOCK THE BOOTLOADER and hit the power button to confirm your choice. You'll see a short message saying the bootloader has been unlocked, and the device will be reset.
Go through the initial configuration to set up your apps onto the device, and you'll once again have to enable developer options and toggle USB debugging.
How to unlock the bootloader on the T-Mobile OnePlus 6T
If you're using the T-Mobile variant of the OnePlus 6T, you'll first have to get an unlock code from the carrier before you can unlock the bootloader. Make sure you read T-Mobile's SIM unlock policy before getting started, and if you're eligible, you'll be able to request a code by using T-Mobile's Device Unlock app.
If your phone doesn't already have the app installed, you'll have to get a code by talking to T-Mobile's customer care. Once you have the code, you can follow the steps outlined above to toggle OEM unlocking and USB debugging.
Get your device's IMEI number by dialing *#06#. We'll need this later, so jot it down somewhere. Now connect your T-Mobile OnePlus 6T to your PC via the USB cable that came with the phone, and extract Minimal ADB and Fastboot. If you're using a Mac, you can just launch a command window and key in the commands listed below.
Launch a command window in that folder by holding down the Shift key on your keyboard, right-clicking with your mouse and selecting Open PowerShell window here from the context menu. Once you get PowerShell running, key in the following command:
adb reboot bootloader
The device will boot into the fastboot menu. View the unlock code by entering the following command:
fastboot oem get_unlock_code
Now, you'll have to get an unlock token from OnePlus. Enter your device's IMEI number, your email address, and the unlock code that you see in the command window at OnePlus' unlock service page and hit Submit.
You'll receive the unlock token (in .bin format) in your email. Move that to the Minimal ADB and Fastboot folder and enter the following:
fastboot flash cust-unlock <unlock_token.bin>
Your T-Mobile OnePlus 6T is finally ready to be unlocked. Key in the following command to unlock the bootloader:
fastboot oem unlock
How to root your OnePlus phone
Once you've unlocked the bootloader and set up your phone, it's time to install a custom recovery. TWRP lets you root your OnePlus device via the Magisk module, and make it easier down the line to flash custom ROMs. Take the downloaded TWRP .img file you downloaded above and move it to the Minimal ADB and Fastboot folder.
Connect your OnePlus phone to the PC via the bundled USB cable, and move the TWRP and Magisk .zip files to your device's internal storage using Windows' file explorer.
Re-do the steps outlined above to launch a command window from within the Minimal ADB and Fastboot folder. Once you have PowerShell running, enter the following command to boot into fastboot mode:
adb reboot bootloader
In the fastboot menu, enter the following command to install TWRP:
fastboot boot twrp-3.2.3-1-fajita.img
You'll see the Team Win logo flash at boot. Enter your password, and slide your finger across the Swipe To Allow Modifications option at the bottom of the page to get started. Hit the Install button to proceed and select the TWRP 3.2.3.zip file from your device's internal storage. Slide to confirm Flash to install the custom recovery. Once TWRP has been installed, your device will reboot.
To root your OnePlus phone with Magisk, power off the device and boot into TWRP by holding down the volume down and power buttons simultaneously. From the TWRP menu, select Install and navigate to the Magisk .zip file. Once the installation is done, select Reboot to boot back to your home screen.
Your OnePlus device should now be rooted, and you'll see a Magisk Manager app that will let you install additional modules. Rooting your phone normally breaks Google Pay functionality, but Magisk offers a nifty workaround:
- Open Magisk Manager from the app drawer.
- Tap the three horizontal lines at the top left corner.
- Select Magisk Hide.
Scroll down and select the check box next to Google Pay.
Magisk Hide essentially hides the fact that your phone is rooted, making it possible to run services like Google Pay. You can enable it by individually whitelisting apps from the Magisk Hide menu.
That's all there is to it. Run into any issues while rooting your OnePlus device? Let me know in the comments below.
We may earn a commission for purchases using our links. Learn more.