Today I wanted to update my phone to oxygen os 9.0.4.
What a time loss.
I had oxygen os 5.0.8 (previous stable) with unlocked booloader, but stock rom. I wanted to go to 9.0.4 but the over the air updates through the graphical user interface did not work. I thought, no problem, I'll just flash it in twrp. It was a lot harder than this.
so with enough tests, what I figured out is that the 9.0.4 contains a firmware+modem update. After you installed those, two changes will be visible
1. upon startup, the phone will complains that dm-verify is not enabled and that the rom might not work
2. the data partition that was encrypted will be unable to be decrypted.
(
https://forum.xda-developers.com/oneplus-3/how-to/op3-flashable-firmware-modem-zips-t3816066)
Reinstalling the previous firmware will fix point 2. However point 1 is permanent.
So after installing the 9.0.4, I was greeted with a unable to decrypt data, please factory reset

Didn't want that. /data was unavailable in twrp too. I was in a chicken and egg issue, because I needed /data to work to push back my backups (system, data) to my phone. also obviously restoring /data from /data would not work. tried "adb backup" and other stuff and none worked. In the end I was able to restore boot, system and data from a OTG external disk.
After restoring old firmware, reboot to twrp (to be able to decrypt /data), restore system , boot and data I thought I was done. Nope. with the bootloader and dm-verify thing, the previous 5.0.8 would not boot. and Here I thought that restoring backup would work

.. nope, they made permanent, not backward-compatible changes to the bootloader.
so went back and reflashed 9.0.4. data can't be decrypted, factory reset, restore /data. now I boot in the new version and my apps are there but the pin don't work.
rm/data/system/locksettings.db in twrp as root. good pin is removed and I have access. now my fingerprint sensor don't work. probably another **** to remove. other solution would be to use a app to backups only specific app, factory reset (fix fingerprint sensor, pin etc), and restore these apps.
anyway I now have a phone that works, but it tooks 5 hours for that. Wish I didn't do that upgrade.