[OnePlus 7 Pro Guides, News, & Discussion] egandt:
First there are shortcuts for this, but I wanted to be sure I covered every step and where one is at each point, since it can be helpful for recovery or simply to see where one is. There are of course other ways but I just went through on a GM1917 and verified each of these steps, so that others do not need to piece together multiple threads. I'm assuming here we want to start from scratch, never a bad idea if you are willing to lose data, or else you have no choice and need to start from scratch.

Posts used:

https://xdaforums.com/oneplus-7-pro/how-to/rom-stock-fastboot-roms-oneplus-7-pro-t3931424

https://xdaforums.com/oneplus-7-pro/how-to/oneplus-7-pro-global-repo-oxygen-os-t3930585

https://xdaforums.com/oneplus-7-pro/development/recovery-unofficial-twrp-recovery-t3931322

https://xdaforums.com/android/software/universal-dm-verity-forceencrypt-t3817389

I'm going to disable Encryption as well, because when written TWRP was not decrypting it and also because I find it a pain and simply put I do not need it on my phone, but those steps are optionally shown below, as well as root.

Next I'm doing this using files for the GM1917 (US/Internaltional), but you can replace both the fastboot version and the OTA for your device and the current version.

Before you begin: I'm assuming an unlocked boot loader

Be warned the steps below result in total loss of all DATA on the phone

Time: This takes about 45 minutes to an hour to complete.

I'm assuming you can get to fastboot mode, beyond that your phone can be seriously messed up, but as we are starting from scratch it should be ok.

Boot into Fastboot mode: (Vol- & Vol+ & power)

Use: 9.5.3-GM21AA-OnePlus7ProOxygen_21.O.07_OTA_007_all_1905120542_aa37bad-FASTBOOT to restore a prestine copy of 9.5.3 to slot A (only writes slot A)

Force it to power off on reboot (Vol+ & Power)

Reboot to fastboot mode (vol- & vol+ & power)

Now you should check which slot are you using with this command "fastboot getvar current-slot"

Now you should change the slot in use with this command "fastboot --set-active=*" you should replace with the slot is not in use, for example if you are using slot a the command will be "fastboot --set-active=b"

Now you should flash the twrp in the boot partion using this command "fastboot flash boot twrp.img"

Now reboot the device with in recovery mode scrolling the menu with the volume button and selecting "Recovery Mode" with the power button

Now we have TWRP on Slot B and 9.5.3 on Slot A we are on Slot B

If asked to decrypt, if not skip this step: Format Data, Then Internal Storage, Data and cache

Upload the 9.5.4 OTA Image: adb push OnePlus7ProOxygen_21.O.08_OTA_008_all_1905230032_1ef7fd0dc3.zip /cache

Upload the twrp image: adb.exe push test-twrp-3.3.1-2-guacamole.img /cache

Now Install 9.5.4: using TWRP to slot B

- Install -> /cache -> OnePlus7ProOxygen_21.O.08_OTA_008_all_1905230032_1ef7fd0dc3.zip

Go in advanced menu

Click on "Install Recovery Ramdisk"

Choose the recoveryimgfilename.img

Swipe to install

Reboot -> Select Slot A

Reboot Select Recovery

We now have TWRP on slots A and B. 9.5.3 on Slot A and 9.5.4 on Slot B

Back in TWRP we are now on Slot A:

Upload the 9.5.4 OTA Image: adb push OnePlus7ProOxygen_21.O.08_OTA_008_all_1905230032_1ef7fd0dc3.zip /cache

Upload the twrp image: adb.exe push test-twrp-3.3.1-2-guacamole.img /cache

Now Install 9.5.4: using TWRP to slot B

- Install -> /cache -> OnePlus7ProOxygen_21.O.08_OTA_008_all_1905230032_1ef7fd0dc3.zip

Go in advanced menu

Click on "Install Recovery Ramdisk"

Choose the recoveryimgfilename.img

Swipe to install

We now have TWRP on slots A and B. 9.5.4 Slots A and B

At this point you can boot up 9.5.4 Stock from Slot A by selecting Reboot System or we can root / disable encryption

To disable encryption (suggested if you do not care as it makes TWRP easier):

Optional: block the ROM from encrypting storage as we can not currently decrypt.

upload the zip: adb push Disable_Dm-Verity_ForceEncrypt_05.21.2019.zip /cache

- Install -> /cache -> Disable_Dm-Verity_ForceEncrypt_05.21.2019.zip

Note: this only affects the current slot (A in this case) which is fine

Reboot->System

At this point you have 9.5.4 Stock without Encryption on Slot A, With Encryption (and unused) on Slot B, and TWRP on Slots A and B.

Complete inital setup (I do the minimal at this point)

- Set a password, to verify if Dm-Verity_ForceEncrypt is working or not

Enable Developers Options

Enable Advanced Reboot in Developers Options

Note: My suggestion is to now power off and restart to ensure you have Wifi, as this is picky for some reason, and it is best to be sure.

Power -> Off

Power back on and verify that Wifi is still working, it should be.

If you want root:

Power -> Recovery

Upload Magisk: adb push Magisk-v19.2.zip /cache

- Install -> /cache -> Magisk-v19.2.zip

Wipe Dalvik

Reboot System

Finally: Verify that Safenet is passing in Magisk, it should be

You have 9.5.4 Stock with Encryption and Root on Slot A, With Encryption (and unused) on Slot B, and TWRP on Slots A and B. I hope having this in one place can help others, as I've tried to lay out exactly what I did each step of the way.

Parting suggestion: Maybe a good time to create a backup, one with EFS and Modem to just to be safe!

ERIC