2.6 KiB
2.6 KiB
Rooting a OnePlus 6T
The easiest way to root a OnePlus 6T handset is to flash it with LineageOS. Recent versions of LineageOS allow you to enable/disable 'root' directly from the system's settings menu, making it ideal for reverse engineering applications which have root detection.
At the time of writing, the latest version of LineageOS is v18.1 (Android 11), and can be downloaded from here. The official LineageOS installation instructions can be found on its wiki.
N.B. Some applications (annoyingly) require the Google apps suite in order to run. These can be downloaded from here.
Requirements
- Android Platform Tools.
- An OEM unlocked bootloader.
- LineageOS recovery image.
- Partition copy utility.
- LineageOS system image.
- Google apps suite.
Instructions
Unlocking the OnePlus 6T bootloader
- Boot into the device's bootloader.
- If ADB is enabled on the handset, this can be achieved using
adb reboot bootloader
. - Otherwise, with the device powered off, hold
Volume Up
+Volume Down
+Power
.
- If ADB is enabled on the handset, this can be achieved using
- Run
fastboot oem unlock
. - Reboot the device.
Flashing the LineageOS bootloader
- Boot into the device's bootloader.
- If ADB is enabled on the handset, this can be achieved using
adb reboot bootloader
. - Otherwise, with the device powered off, hold
Volume Up
+Volume Down
+Power
.
- If ADB is enabled on the handset, this can be achieved using
- Flash the recovery image using
fastboot flash boot <recovery_filename>.img
.
Safeguarding the partitions
- Download the parition copy utility from here.
- Sideload the
copy-partitions-20210323_1922.zip
package.- On the handset, select 'Apply Update', then 'Apply from ADB'.
- Run
adb sideload copy-partitions-20210323_1922.zip
. - Accept the signature verification warning.
- Reboot to recovery by selecting 'Advanced', then 'Reboot to recovery'.
Installing LineageOS
- Perform a factory reset.
- On the handset, select 'Factory Reset', then 'Format data / factory reset'.
- Sideload the LineageOS package.
- On the handset, select 'Apply Update', then 'Apply from ADB'.
- Run
adb sideload <lineageos_image>.zip
. - If the process succeeds the output will stop at 47% and report adb: failed to read command.
- Reboot to recovery by selecting 'Advanced', then 'Reboot to recovery'.
- Sideload the Google apps package BEFORE BOOTING INTO THE OS.
- On the handset, select 'Apply Update', then 'Apply from ADB'.
- Run
adb sideload <google_apps>.zip
. - Accept the signature verification warning.
- Reboot!