OnePlus has carved out a space for itself in the smartphone market as the most affordable flagship, despite recent competition from Huawei. Their latest flagship, the OnePlus 6 has been out for days now and it can already be rooted, such is its popularity. However, for the time being, there is no working build of TWRP available for the device. Users looking to root the device will have to rely on a patched boot image and Magisk to achieve root access. Before you can root OnePlus 6, you’ll need to unlock the bootloader. There are still more requirements to unlock the bootloader of the OnePlus 6.
Unlock OnePlus 6 Bootloader
- Power off your phone.
- Press and hold the Volume Up and Power button together on your OnePlus 5 until it boots into fastboot mode.
- Connect it to your PC via a USB cable and make sure the connection isn’t loose.
- Now go to the ADB installation folder on your PC. (C:Program Files (x86)Minimal ADB and Fastboot)
- Type in cmd in the address bar and hit enter to open a command prompt window in the folder.
- Now let’s see if your device is properly connected to your PC. To do this, type the command given below and hit enter.
- If your device is connected, you will see your phone’s serial number and if you don’t, you should check if you have installed all the required drivers.
- Type the command below to unlock your bootloader if your device is detected. Remember this will wipe everything on your phone.
fastboot oem unlock
- On your phone, you will be warned about unlocking the bootloader, press the Volume Up button to highlight Yes and the Power button to select it.
- When your device reboots, power it off again and boot into recovery mode. To do this, press and hold the Power and Volume Down buttons together for a few seconds.
- In the stock OnePlus recovery, wipe all user data and then power off your device again.
Root OnePlus 6 with Magisk
- Download the patched boot image for the OnePlus 6 running on Oxygen OS 5.1.5 (source: ). Transfer this downloaded image to the ADB installation folder. This is usually the platform-tools folder in C: drive (C:platform-tools) or the Minimal ADB and Fastboot folder in the Program Files (x86) folder (C:Program Files (x86)Minimal ADB and Fastboot) unless you changed it during installation.
- Reboot your OnePlus 6 in fastboot mode again, as mentioned earlier.
- Connect your phone to the computer and run the ADB command interface. To do this, go to the ADB installation folder on your PC. (C:Program Files (x86)Minimal ADB and Fastboot). Then, type in cmd in the address bar and hit enter to open a command prompt window in the folder.
- Boot your device using the patched boot image via the following command.
fastboot boot patched_boot_magisk1642.img
Here, patched_boot_magisk1642.img is the name of the downloaded boot image file.
- This will boot your device as it normally does. When your device boots up, download the Magisk Manager APK from this link:
Download Magisk Manager
Once downloaded, tap on the download notification to install the APK.
- Launch the Magisk Manager app and it should show that you’re rooted. This is temporary, however.
- Go to the Magisk Manager Settings and tap on Update channel then change it to Beta.
- On the Magisk main screen, check the boxes next to Preserve force encryption and Preserve AVB 2.0/dm-verity
- Below this, tap on Install and select Direct Install (Recommended) and wait for the boot.img to be patched. Reboot your device when prompted.
You can now enjoy root access on your OnePlus 6. Enjoy!
>> Source Link