The OnePlus 5 had been in the public's hands for only 20 hours before the XDA developers released a custom recovery image for it. The installation process is simple enough, but it can be a little confusing if you redesign Android.
If you're an old soul, you'll be glad to know that there is nothing new or otherwise to install TWRP on the OnePlus 5. Just unlock your bootloader and then flicker the TWRP image with fastboot. This makes it incredibly easy to flash a root ZIP file like Magisk, and we'll show you how to do that with a separate tutorial linked to it at the end. But if that sounds like I'm speaking in another language, read on and everything will be clear.
Before You If you want to start changing the OnePlus 5, you must unlock the bootloader. Otherwise, you are completely excluded from the system partition. However, before you can unlock the bootloader, you need to enable a single option in your phone's Settings menu.
Turn off the device completely. Then turn the phone back on by pressing and holding the volume up and down buttons for about ten seconds until the bootloader menu appears. Release the volume and power buttons and release the phone in this menu.
Step 2: Unlock Your Boot Loader
If your phone is in boot loader mode, connect it to your computer using the USB data cable Open a command prompt or a terminal window. You must change the directories to the platform-tools folder in your ADB and Fastboot installation directory. This can be done with the cd
For Windows users, this directory is usually located at "C: Program Files (x86) Android android" -sdk platform-tools "(without the quotes, of course) .For Mac and Linux users, this location hangs depending on where you extracted the ADB folder when you installed the utility, so look for your hard disk drive for the platform-tools folder.
At the Command Prompt or Terminal Window Type the following command in the correct directory :
fastboot flashing unlock
Note: Linux, Mac, and Windows PowerShell users must add a period and a slash ( ./ ) B. ./ Fastboot flashes unlock  How to Unlock the Bootloader on Your OnePlus 5 & Install TWRP Recovery ” width=”532″ height=”532″ style=”max-width:532px;height:auto;”/>