How to decrypt data partition, and re-encrypt data partition on OnePlus 5.
Decrypt data partition with magisk:
1. Go to “Wipe” section, tap “Format Data”, and type “yes”
2. Transfer Rom and no_verity_op5.zip to the device over MTP
3. Go to “Install” section, select ROM, and swipe to confirm the flash
4. Go to “Install” section, select magisk.zip, and swipe to confirm the flash
5. Go to “Install” section, select no_verity_op5.zip, and swipe to confirm the flash
6. Reboot
PS. you should format data before flashing no_verity_op5.zip.
Re-Encrypt data partition:
1. Go to “Wipe” section, tap “Format Data”, and type “yes”
2. Transfer stock Oxygen Rom to the device over MTP
3. Go to “Install” section, select the Oxygen rom, and swipe to confirm the flash
4. Reboot
Ref:
https://forum.xda-developers.com/oneplus-5/how-to/guide-how-to-decrypt-data-partition-t3642144