• We are moving to xdaforums.com!

    Posts made between now and when the migration is complete will not be carried over.
    You will be automatically redirected once the migration is complete.

OnePlus 6: Unlock Bootloader | Flash TWRP | Root | Nandroid & EFS Backup !!

Search This thread

Funk Wizard

Forum Moderator
Staff member
Nov 8, 2014
4,824
17,506
New Delhi
OnePlus 9 Pro
OnePlus 6: Unlock Bootloader | Flash TWRP | Root | Nandroid & EFS Backup !!

ijuxHKx.jpg



Q9IP5VP.png



3RVsG8v.png



Before you start, OTA up to the latest System Update available.
Settings > System Updates > Download & Install the latest available


ybQ9okG.jpg


Thank You all for your support :highfive:
Never Settle :fingers-crossed:
 
Last edited:

Funk Wizard

Forum Moderator
Staff member
Nov 8, 2014
4,824
17,506
New Delhi
OnePlus 9 Pro
VOGlyoK.jpg


Introduction​


Rooting OnePlus 6 would give you additional benefits like you can install special apps, Flash Custom ROMs & Custom Mods, you can streamline your phone performance and many extra features. The real performance of an Android smartphone can only be unlocked once it is rooted.

Rooting this device is actually quite a simple and easy process. Before you begin, it is recommended that you at least try to understand what each part of the process will do. Although this guide will elongate each step in order to show all of the details, the method used can be broken up into 3 main steps: ​

1. Unlocking the Bootloader
2. Installing a Custom Recovery
3. Gaining Root Access


Each new step relies on the previous step so please follow the entire process and a basic summary of each part is described as below:

Unlocking Bootloader​​
Opens the door to the internal memory of the device to be written on to. This allows you to flash images onto the main partitions of the phone.​

Installing a Custom Recovery​​
A custom recovery is flashed onto the recovery partition of the device and overwrites the stock recovery that exists by default. Custom recoveries bring lots of functionality and give you the ability to perform wipes, install flashable zips, create full backups of your device (Nandroid backup), and various other features. An unlocked bootloader is needed to install a custom recovery.

Gaining Root Access​​
You can gain root by either flashing via recovery a pre-rooted custom rom, or flashing a zip containing the SuperSU binaries or by Flashing Magisk Zip for a system less root. A custom recovery is necessary to do this.

After completing these steps your phone will be rooted, the phone will have a custom recovery installed and an unlocked bootloader. This, in my opinion, is the a practical and beneficial method for rooting your phone. It will give you some basic adb/fastboot knowledge, and should hopefully help you have a decent understanding of the entire process. This method will work regardless of any android version on the phone.

If you are confused by anything in this guide, I highly suggest getting it clarified being before moving on. Ask your question in this thread and I or someone else will likely answer. Also we would suggest that you read over the whole thread a few times before actually doing anything to the phone.​
 
Last edited:

Funk Wizard

Forum Moderator
Staff member
Nov 8, 2014
4,824
17,506
New Delhi
OnePlus 9 Pro
Setup, Preparation & Prerequisites​​

Basic tasks that may be referred to throughout this guide:​​
Open Command Prompt: Press Shift + Right Click anywhere on the screen and select Open Command Window here

Enter Fastboot/Bootloader Mode: Turn the phone off. Hold volume up + power until the "fastboot" screen appears. [Alternatively, if Advanced Reboot is enabled, you can press Reboot > Bootloader from the power menu.]

Enter Recovery Mode: Turn the phone off. Hold volume down + power until the "OnePlus Logo" screen appears. [Alternatively, if Advanced Reboot is enabled, you can press Reboot -> Recovery from the power menu.]

ADB and Fastboot Drivers Installation​
1. Download & Update OnePlus 6 Drivers From Here
2. Download & Update Fastboot and ADB Binaries/Drivers from Here

3. Run the .exe file downloaded from above as Administrator.
4. Press 'Y' every time the installer asks for.
5. Continue Driver Installation.

Now, ADB and Fastboot have been installed on your PC and should be Working as desired.

Things To Remember​
Show File Extensions
Open a command prompt window and run "Control folders" (without the quotes). Go to the View tab and uncheck the "Hide extensions for known file types" option. This will help avoid confusion when renaming files.

Battery
Ensure that your phone has at least 60% battery remaining, and that your PC is plugged in and wont shut down spontaneously during the process. The procedure doesn't take very long , but its best to have enough charge in case something goes wrong.

Backup (Optional)
Unlocking the bootloader will/should completely wipe all data from the device. This includes apps, settings and even the contents of the internal sdcard (pictures, music, etc.). Copy all important files off the phone onto a PC or upload them to a cloud.

USB Debugging
On your phone go to Settings > About phone > Tap on Build number 7 times. This will enable Developer options. Now go back to Settings > Developer options > Enable USB debugging

Enable OEM Unlocking
On your phone go to Settings > Developer options. Then enable the 'OEM Unlocking' option. Also make sure that from now on, OEM unlocking option is enabled before you reboot as sometimes, it might get disabled itself.

Enable Advanced Reboot
On your phone go to Settings > Developer options. Then enable the 'Advanced Reboot' option.
 
Last edited:

Funk Wizard

Forum Moderator
Staff member
Nov 8, 2014
4,824
17,506
New Delhi
OnePlus 9 Pro
Unlocking Bootloader​

Turn the phone off. Then boot it into fastboot mode by holding volume up + power or select reboot to bootloader if advanced reboot is activated via developer options. The phone will display "fastboot" text indicating that it has successfully entered fastboot mode.

Plug the phone into your PC, then open a command prompt window on the desktop (Shift + Right Click -> Open Command Window here) and type:

Code:
fastboot devices

This command will list the connected devices. If your phones serial number shows up you are good to go and may continue. If the phone is NOT listed this indicates that your drivers are not installed correctly. In order for you to continue you must fix your drivers so that your phone is listed under fastboot devices.

If the phone has been recognized by the command above, proceed to unlocking the bootloader with the following command:

Remember this Step will WIPE EVERYTHING off the phone so Backup all your Data

Code:
fastboot oem unlock

You would be greeted with a Unlock Bootloader Warning page, Hit the Vol button to select Yes and turn it Blue and Hit the Power Button to Execute the selection

Your device will reboot, show you a Secure boot warning, reboot into stock recovery and wipe all data. Once done, your phone will reboot into the OS.

Please continue and follow the next post to install Custom Recovery
 
Last edited:

Funk Wizard

Forum Moderator
Staff member
Nov 8, 2014
4,824
17,506
New Delhi
OnePlus 9 Pro
Flashing TWRP Recovery

Wait until the phone has fully booted up into android, then adjust the following settings on the phone:

USB Debugging
On your phone go to Settings > About phone > Tap on Build number 7 times. This will enable Developer options. Now go back to Settings > Developer options > Enable USB debugging

Enable OEM Unlocking
On your phone go to Settings > Developer options. Then enable the 'OEM Unlocking' option and make sure that from now on, OEM unlocking option is enabled before you reboot. Sometimes, it might get disabled itself.

Enable Advanced Reboot
On your phone go to Settings > Developer options. Then enable the 'Advanced Reboot' option.

The OnePlus 6 uses the newer AB partition scheme first introduced on the Pixel 1. As such there is no recovery partition. Instead, the recovery is part of the boot image. You will temporarily boot TWRP to perform and later perform a more permanent TWRP installation.

Download all the files, place Magisk & TWRP installer zip on Device Internal Memory and TWRP img on your PC

Then boot it into fastboot/bootloader mode by holding volume up + power or selecting the reboot to bootloader via advanced reboot options.

Open a new command prompt in the same location and run the following commands:

Code:
fastboot boot twrp-3.2.2-0-enchilada.img

You will temporarily boot into TWRP

Now in TWRP, tap on Install and browse to the zip and install it (the zip will probably be in /sdcard/Downloads). TWRP will now be installed to both slots. TWRP is now installed.

PS: DO NOT BOOT IN OS JUST YET & CONTINUE TO THE ROOTING POST
 
Last edited:

Funk Wizard

Forum Moderator
Staff member
Nov 8, 2014
4,824
17,506
New Delhi
OnePlus 9 Pro
Gaining Root Access

This is a continued post from the above post...

1. Boot into TWRP Recovery
2. If you want to stay systemless continue without swiping right else Swipe and enable modifications.
3. Select your preferred Language, Tap “Never show this screen on boot again,” and Swipe allow modification.
4. Navigate to Install and select Magisk to root.
5. Swipe to confirm the flash
6. Reboot System

Keep in mind that the first boot after wiping the phone may take longer than usual, as the phone will need to rebuild the dalvik cache and initialize other first boot and might reboot a few times.

* MTP, known as Media Transfer Protocol, is the same way you transfer files from your PC to your device when booted into system.

Congrats! Your Device now has an unlocked bootloader, a custom recovery installed and is rooted !!

Warning: Do not flash partial update OTAs (under 1 GB) on a modified device! If you want to use partial OTAs, you must first flash a full OTA that it applies to, and then flash the partial OTA from stock recovery. Flashing partial OTAs from TWRP will either fail or soft brick your device. You can return to a usable state by flashing full zips in recovery.

Enjoy :fingers-crossed:
 
Last edited:

Funk Wizard

Forum Moderator
Staff member
Nov 8, 2014
4,824
17,506
New Delhi
OnePlus 9 Pro
Making a Nandroid Backup​

Warning: before you make a backup with TWRP you must remove all Lockscreen Security. If you do not do this you will not be able to unlock your device after restoring your backup (entering your pin/pattern/password will result in an "incorrect pin/pattern/password" message), you'll be forced to perform a factory reset to boot into Android.

To remove lockscreen security go to
Settings > Security > Screen Lock and set it to Swipe/None.

A Nandroid Backup is a very important thing to have before installing any custom software on your device. It's basically a backup of your stock system that you can fall back on if anything goes wrong or if you just want your stock ROM back.

You can also use Nandroid Bckup to create a backup of your favorite ROM set up exactly the way you like it. The backup you create can be easily restored using the restore tool in TWRP recovery.

To Create Nandroid Backup:

1. Boot into TWRP Recovery .
2. Go to Backup Menu and select all the listed partitions.
3. Name the Backup if needed (Optional)
4. Swipe to take Backup.
This proces should take 5 to 7 minutes depending upon the size of data.
5. Reboot System when done.

Your Nandroid will be stored in the Backup Folder inside TWRP Folder /sdcard/TWRP/BACKUPS
 
Last edited:

Funk Wizard

Forum Moderator
Staff member
Nov 8, 2014
4,824
17,506
New Delhi
OnePlus 9 Pro
Restoring a Nandroid Backup


1. Boot into TWRP Recovery
2. Go to Restore Menu and select the backup you want to restore.
3. Select the partitions you want to restore.
4. Swipe to Restore. The process will take 5 to 7 minutes.
5. Reboot system once done

Note: If you happened to forget to remove lockscreen security (PIN/Pattern/Password) before creating your backup, and you cannot get into your OS after restoring, you can do the following to fix the issue.

Boot into TWRP
Use the TWRP File Manager and Navigate to /data/sytem/ and delete the following files:

locksettings.db
locksettings.db-shm
locksettings.db-wal.
gatekeeper.password.key
gatekeeper.pattern.key


You may or may not have all the above files so delete the ones you have.

Reboot the phone and (if you've set a PIN) enter it to decrypt the storage one more time. After that you can simply unlock your phone with a swipe.

Upon Boot > Go into Settings > Security > set your preferred unlock method

Android will ask you if you want to set a boot-time code too so select as per convenience.
 
Last edited:

Funk Wizard

Forum Moderator
Staff member
Nov 8, 2014
4,824
17,506
New Delhi
OnePlus 9 Pro
Making an EFS Backup
All too often, we've seen folks who have a corrupted or missing EFS Partition. This results in your IMEI being lost and no cellular activity on the device at all. This can be a royal PITA to fix, and some folks haven't been able to fix it at all. You can take a precautionary measure to safeguard yourself against this by taking a couple of minutes to back up your modemst files.

Download & Open up Terminal Emulator on your phone from here

Once it's open you'll be greeted with a command line prompt, in which you can enter text commands, the first thing you need to do is enable root access by entering this line (press the enter key on your on-screen keyboard after each command to issue it):

Code:
su
If this is the first time you've used Terminal Emulator a Superuser or SuperSU popup will appear, make sure you grant root access.

Now enter these two commands:

Code:
dd if=/dev/block/sdf2 of=/sdcard/modemst1.bin bs=2048

Code:
dd if=/dev/block/sdf3 of=/sdcard/modemst2.bin bs=2048

This will place two files (modemst1.bin & modemst2.bin) on your internal storage.

Make sure you copy them to your PC and Cloud immediately so that you have a backup there to use if you need to restore it in future.

That's it !! In case you ever need to restore Nanroid or EFS Backups, please continue and follow the next post...
 
Last edited:

Funk Wizard

Forum Moderator
Staff member
Nov 8, 2014
4,824
17,506
New Delhi
OnePlus 9 Pro
Restoring an EFS Backup​
If by chance you end up with a corrupt EFS partition all you need to do is flash the files back to your device using fastboot.

Boot into fastboot mode (power + volume up) and connect your phone to your PC via usb cable.

Keep modemst1.bin and modemst2.bin (backed up earlier) on your desktop and open command window there.

These fastboot commands will restore the files:

Code:
fastboot flash modemst1 modemst1.bin

Code:
fastboot flash modemst2 modemst2.bin

Reboot your device.

Code:
fastboot reboot

Now disconnect phone from PC. Your IMEI should be back.

That's it for this guide, Enjoy :highfive:
 
Last edited:

Funk Wizard

Forum Moderator
Staff member
Nov 8, 2014
4,824
17,506
New Delhi
OnePlus 9 Pro
Full Stock Rom:
OOS 5.1.3:
AFH

Changelog:
* Updated Android Security Patch To May
* Preloaded OnePlus Switch Application
* Added Configuration for Notch Show/Hide
* Camera - Support Super Slow Motion (720p at 480fps and 1080p at 240fps)
* Camera - Support Quick Capture in Portrait Mode
* Gallery - Support more actions for recently deleted files
 

Attachments

  • OTA.jpg
    OTA.jpg
    226.8 KB · Views: 24,887
  • Screenshot_20180522-010703.jpg
    Screenshot_20180522-010703.jpg
    144.8 KB · Views: 24,665
Last edited:

KnifeFed

Senior Member
Oct 27, 2007
321
105
2. If you want to stay systemless continue without swiping right else Swipe and enable modifications.
3. Select your preferred Language, Tap “Never show this screen on boot again,” and Swipe allow modification.

These two steps seem a bit conflicting when it comes to enabling system modifications in TWRP. Am I right in that if you don't allow system modifications, you can still flash Magisk and get root access but you won't be able to flash custom ROMs?

---------- Post added at 04:30 AM ---------- Previous post was at 04:28 AM ----------

Is there a difference between backing up EFS via a terminal emulator rather than just doing it via TWRP?
 
  • Like
Reactions: channeledbymodem

Funk Wizard

Forum Moderator
Staff member
Nov 8, 2014
4,824
17,506
New Delhi
OnePlus 9 Pro
These two steps seem a bit conflicting when it comes to enabling system modifications in TWRP. Am I right in that if you don't allow system modifications, you can still flash Magisk and get root access but you won't be able to flash custom ROMs?

---------- Post added at 04:30 AM ---------- Previous post was at 04:28 AM ----------

Is there a difference between backing up EFS via a terminal emulator rather than just doing it via TWRP?

Yes you are right, you can still flash Magisk and get root access if you don't allow modifications. Also there should be no difference between the TWRP EFS backup or the Terminal Emulator EFS backup.

I would still recommend both as backup if you mess up TWRP/OS due to encryption issues, besides that the official twrp for the 6 would still take time so for just wanted to keep both options at your disposal :good:
 

SkandaH

XDA Portal Supporter
Jun 8, 2013
1,038
2,663
Xiaomi Poco F1
OnePlus 7T
Flashing TWRP Recovery

Good to see you here.

Being a device with A/B partitioning, there is no separate /recovery partition as it is fused with /boot. Besides, you've to fiddle with active slots to make it installed. I know the guide is work in progress, but the current state may arise confusions.

:p

Regarding this post, what was the OOS version of the initial build?
 
Last edited:
  • Like
Reactions: Funk Wizard

Funk Wizard

Forum Moderator
Staff member
Nov 8, 2014
4,824
17,506
New Delhi
OnePlus 9 Pro
Good to see you here.

Being a device with A/B partitioning, there is no separate /recovery partition as it is fused with /boot. Besides, you've to fiddle with active slots to make it installed. I know the guide is work in progress, but the current state may arise confusions.

:p

Regarding this post, what was the OOS version of the initial build?

The initial build was 5.1.0 which was a test build
 

Attachments

  • 5.1.0.jpg
    5.1.0.jpg
    199 KB · Views: 3,004
  • Like
Reactions: Titokhan

jordanlaa

New member
Dec 21, 2015
1
0
Sydney
Gaining Root Access


Warning: Do not flash partial update OTAs (under 1 GB) on a modified device! If you want to use partial OTAs, you must first flash a full OTA that it applies to, and then flash the partial OTA from stock recovery. Flashing partial OTAs from TWRP will either fail or soft brick your device. You can return to a usable state by flashing full zips in recovery.

I have my device coming next week and want to get involved with Custom Roms and rooting once some of the incredible devs here develop some stable roms. I was thinking of unlocking the bootloader straight out of the box and then stopping there so that when I decide to proceed I won't need to wipe all user data. If I only unlocked the bootloader, am I still able to apply Oneplus OTA updates through the settings app as usual? This is in reference to your warning: "Warning: Do not flash partial update OTAs (under 1 GB) on a modified device! If you want to use partial OTAs, you must first flash a full OTA that it applies to, and then flash the partial OTA from stock recovery. Flashing partial OTAs from TWRP will either fail or soft brick your device. You can return to a usable state by flashing full zips in recovery."


Thanks for your guide Funk Wizard!
 

cultofluna

Senior Member
Nov 25, 2015
4,112
2,088
Google Pixel 6 Pro
Google Pixel 7
I have my device coming next week and want to get involved with Custom Roms and rooting once some of the incredible devs here develop some stable roms. I was thinking of unlocking the bootloader straight out of the box and then stopping there so that when I decide to proceed I won't need to wipe all user data. If I only unlocked the bootloader, am I still able to apply Oneplus OTA updates through the settings app as usual? This is in reference to your warning: "Warning: Do not flash partial update OTAs (under 1 GB) on a modified device! If you want to use partial OTAs, you must first flash a full OTA that it applies to, and then flash the partial OTA from stock recovery. Flashing partial OTAs from TWRP will either fail or soft brick your device. You can return to a usable state by flashing full zips in recovery."


Thanks for your guide Funk Wizard!
You can just take the partial OTAs with unlocked bootloader..
But if you install custom recovery ( twrp) ..then you have to flash the full rom zip anytime that you want to upgrade..
 

Funk Wizard

Forum Moderator
Staff member
Nov 8, 2014
4,824
17,506
New Delhi
OnePlus 9 Pro
I have my device coming next week and want to get involved with Custom Roms and rooting once some of the incredible devs here develop some stable roms. I was thinking of unlocking the bootloader straight out of the box and then stopping there so that when I decide to proceed I won't need to wipe all user data. If I only unlocked the bootloader, am I still able to apply Oneplus OTA updates through the settings app as usual? This is in reference to your warning: "Warning: Do not flash partial update OTAs (under 1 GB) on a modified device! If you want to use partial OTAs, you must first flash a full OTA that it applies to, and then flash the partial OTA from stock recovery. Flashing partial OTAs from TWRP will either fail or soft brick your device. You can return to a usable state by flashing full zips in recovery."


Thanks for your guide Funk Wizard!

As and when you get the device follow the below:
1. Boot up the device and check for system updates
2. Update to the latest available 5.1.3 as of today or whatever latest at the time you have the device.
3. Unlock the bootloader
4. Continue with TWRP flash & Root (Magisk) as by next week TWRP will be available
4. Set up the device the way you want now like installing you preferred apps and setup your device.
5. There on whenever an update comes download the full zip and flash it via twrp instead of partial OTA's

I will make a separate thread for instruction on how to update just like my threads on 5T & 5, links on my signature.
Those will be self explanatory and tested instructions as I happen to have the device with me.

For anything else you are free to discuss here, I may not be available all the time due to work schedule however I will answer all your concerns once I have access to xda.

Thank you for your patience :highfive:
 

Top Liked Posts

  • There are no posts matching your filters.
  • 136
    OnePlus 6: Unlock Bootloader | Flash TWRP | Root | Nandroid & EFS Backup !!

    ijuxHKx.jpg



    Q9IP5VP.png



    3RVsG8v.png



    Before you start, OTA up to the latest System Update available.
    Settings > System Updates > Download & Install the latest available


    ybQ9okG.jpg


    Thank You all for your support :highfive:
    Never Settle :fingers-crossed:
    89
    VOGlyoK.jpg


    Introduction​


    Rooting OnePlus 6 would give you additional benefits like you can install special apps, Flash Custom ROMs & Custom Mods, you can streamline your phone performance and many extra features. The real performance of an Android smartphone can only be unlocked once it is rooted.

    Rooting this device is actually quite a simple and easy process. Before you begin, it is recommended that you at least try to understand what each part of the process will do. Although this guide will elongate each step in order to show all of the details, the method used can be broken up into 3 main steps: ​

    1. Unlocking the Bootloader
    2. Installing a Custom Recovery
    3. Gaining Root Access


    Each new step relies on the previous step so please follow the entire process and a basic summary of each part is described as below:

    Unlocking Bootloader​​
    Opens the door to the internal memory of the device to be written on to. This allows you to flash images onto the main partitions of the phone.​

    Installing a Custom Recovery​​
    A custom recovery is flashed onto the recovery partition of the device and overwrites the stock recovery that exists by default. Custom recoveries bring lots of functionality and give you the ability to perform wipes, install flashable zips, create full backups of your device (Nandroid backup), and various other features. An unlocked bootloader is needed to install a custom recovery.

    Gaining Root Access​​
    You can gain root by either flashing via recovery a pre-rooted custom rom, or flashing a zip containing the SuperSU binaries or by Flashing Magisk Zip for a system less root. A custom recovery is necessary to do this.

    After completing these steps your phone will be rooted, the phone will have a custom recovery installed and an unlocked bootloader. This, in my opinion, is the a practical and beneficial method for rooting your phone. It will give you some basic adb/fastboot knowledge, and should hopefully help you have a decent understanding of the entire process. This method will work regardless of any android version on the phone.

    If you are confused by anything in this guide, I highly suggest getting it clarified being before moving on. Ask your question in this thread and I or someone else will likely answer. Also we would suggest that you read over the whole thread a few times before actually doing anything to the phone.​
    84
    Unlocking Bootloader​

    Turn the phone off. Then boot it into fastboot mode by holding volume up + power or select reboot to bootloader if advanced reboot is activated via developer options. The phone will display "fastboot" text indicating that it has successfully entered fastboot mode.

    Plug the phone into your PC, then open a command prompt window on the desktop (Shift + Right Click -> Open Command Window here) and type:

    Code:
    fastboot devices

    This command will list the connected devices. If your phones serial number shows up you are good to go and may continue. If the phone is NOT listed this indicates that your drivers are not installed correctly. In order for you to continue you must fix your drivers so that your phone is listed under fastboot devices.

    If the phone has been recognized by the command above, proceed to unlocking the bootloader with the following command:

    Remember this Step will WIPE EVERYTHING off the phone so Backup all your Data

    Code:
    fastboot oem unlock

    You would be greeted with a Unlock Bootloader Warning page, Hit the Vol button to select Yes and turn it Blue and Hit the Power Button to Execute the selection

    Your device will reboot, show you a Secure boot warning, reboot into stock recovery and wipe all data. Once done, your phone will reboot into the OS.

    Please continue and follow the next post to install Custom Recovery
    81
    Setup, Preparation & Prerequisites​​

    Basic tasks that may be referred to throughout this guide:​​
    Open Command Prompt: Press Shift + Right Click anywhere on the screen and select Open Command Window here

    Enter Fastboot/Bootloader Mode: Turn the phone off. Hold volume up + power until the "fastboot" screen appears. [Alternatively, if Advanced Reboot is enabled, you can press Reboot > Bootloader from the power menu.]

    Enter Recovery Mode: Turn the phone off. Hold volume down + power until the "OnePlus Logo" screen appears. [Alternatively, if Advanced Reboot is enabled, you can press Reboot -> Recovery from the power menu.]

    ADB and Fastboot Drivers Installation​
    1. Download & Update OnePlus 6 Drivers From Here
    2. Download & Update Fastboot and ADB Binaries/Drivers from Here

    3. Run the .exe file downloaded from above as Administrator.
    4. Press 'Y' every time the installer asks for.
    5. Continue Driver Installation.

    Now, ADB and Fastboot have been installed on your PC and should be Working as desired.

    Things To Remember​
    Show File Extensions
    Open a command prompt window and run "Control folders" (without the quotes). Go to the View tab and uncheck the "Hide extensions for known file types" option. This will help avoid confusion when renaming files.

    Battery
    Ensure that your phone has at least 60% battery remaining, and that your PC is plugged in and wont shut down spontaneously during the process. The procedure doesn't take very long , but its best to have enough charge in case something goes wrong.

    Backup (Optional)
    Unlocking the bootloader will/should completely wipe all data from the device. This includes apps, settings and even the contents of the internal sdcard (pictures, music, etc.). Copy all important files off the phone onto a PC or upload them to a cloud.

    USB Debugging
    On your phone go to Settings > About phone > Tap on Build number 7 times. This will enable Developer options. Now go back to Settings > Developer options > Enable USB debugging

    Enable OEM Unlocking
    On your phone go to Settings > Developer options. Then enable the 'OEM Unlocking' option. Also make sure that from now on, OEM unlocking option is enabled before you reboot as sometimes, it might get disabled itself.

    Enable Advanced Reboot
    On your phone go to Settings > Developer options. Then enable the 'Advanced Reboot' option.
    74
    Flashing TWRP Recovery

    Wait until the phone has fully booted up into android, then adjust the following settings on the phone:

    USB Debugging
    On your phone go to Settings > About phone > Tap on Build number 7 times. This will enable Developer options. Now go back to Settings > Developer options > Enable USB debugging

    Enable OEM Unlocking
    On your phone go to Settings > Developer options. Then enable the 'OEM Unlocking' option and make sure that from now on, OEM unlocking option is enabled before you reboot. Sometimes, it might get disabled itself.

    Enable Advanced Reboot
    On your phone go to Settings > Developer options. Then enable the 'Advanced Reboot' option.

    The OnePlus 6 uses the newer AB partition scheme first introduced on the Pixel 1. As such there is no recovery partition. Instead, the recovery is part of the boot image. You will temporarily boot TWRP to perform and later perform a more permanent TWRP installation.

    Download all the files, place Magisk & TWRP installer zip on Device Internal Memory and TWRP img on your PC

    Then boot it into fastboot/bootloader mode by holding volume up + power or selecting the reboot to bootloader via advanced reboot options.

    Open a new command prompt in the same location and run the following commands:

    Code:
    fastboot boot twrp-3.2.2-0-enchilada.img

    You will temporarily boot into TWRP

    Now in TWRP, tap on Install and browse to the zip and install it (the zip will probably be in /sdcard/Downloads). TWRP will now be installed to both slots. TWRP is now installed.

    PS: DO NOT BOOT IN OS JUST YET & CONTINUE TO THE ROOTING POST