1) Go to Settings -> About Phone and tap the build number a few times until you unlock the developer options. Go back to the main setting screen and near the bottom of the menu, access the developer options.
2) In the developer options, enable USB debugging and OEM unlocking. The OEM unlocking will give a warning message and will ask for your PIN/password.
3) Connect the phone to the PC, and in the folder with the adb/fastboot files hold shift and right click, and select the open command window option.
4) Enter the follow code:
And this should trigger an option on the phone to authorise the PC. Check the always allow option and tap ok.
5) Now enter this to reboot into fastboot mode:
The phone will reboot and you'll see a screen stating fastboot mode when it's done.
6) Back on the PC in the command window, type the following:
And this should confirm the PC can see the phone in fastboot mode. If not, replug the USB cable and do the command again and that usually sorts it.
7) Now do:
This will warn you that it will factory reset the phone while unlocking the bootloader. Accept this and the phone will start wiping itself while unlocking the bootloader.
8) Once it's done it should automatically reboot, if not just hold the power button to power off and hold again to power on. Skip the setup stages and go back to the settings to enable developer options and USB debugging. Reconnect to PC and do "adb devices" again to reauthorise your PC.
9) Reboot back into fastboot mode with "adb reboot bootloader" again. Make sure twrp.img is in the adb/fastboot folder. Now do the following to flash TWRP:
Code:
fastboot flash recovery twrp.img
When that's done hold the power button to power off the device and unplug from the PC.
10) Hold volume down and the power button at the same time, when the phone vibrates, let go of the power button. When you see the TWRP screen, let go of the volume down key. Now reconnect it to the PC, and copy the Oxygen OS zip file onto the phone. When that is done, on the phone select wipe and wipe the system, data, cache and dalvik cache partitions. Be careful not to wipe any other partitions. Press the home button once that's done and select Install. Select the Oxygen OS zip file you just copied over to the phone, and it will begin installing that, this will take about 10 minutes or so. When it is done select the reboot option.
Now you'll have the proper stock Oxygen OS ROM on your phone without any hidden adware. Don't worry about the recovery as well, for some reason when first booting into Oxygen OS, it reflashes the stock OnePlus recovery back, noticed that on both my OP2 and my sister's OPX. So your phone will be 100% stock.
Optional, boot back into fastboot mode and do the following to lock the bootloader:
Not really needed if you one day plan to try custom ROMs in the future, but apparently new versions of the SafetyNet API checks to see if the bootloader is unlocked and any apps that uses this will refuse to run (Android Pay, Pokémon GO, etc).