Completely wipe your device:Is there any comprehensive guide on how to flash the downgrade images using fastboot?
I have successfully extracted the payload.bin using payload_dumper, and I was able to repair a broken recovery with the latest firmware, but I can't figure out how to get the system partition working again.
fastboot -w
Once that is done, you may start off by flashing the Fastboot ROM files via the below commands:
fastboot flash boot boot.img
fastboot flash dtbo dtbo.img
fastboot flash modem modem.img
fastboot flash recovery recovery.img
fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
fastboot --disable-verity --disable-verification flash vbmeta_system vbmeta_system.img
One-half of the commands have been flashed in the Fastboot Mode, the other half will now be flashed in the FastbootD Mode. So use the below command to boot your device to FastbootD Mode
fastboot reboot fastboot
Your device will now boot to FastbootD, you may now flash the rest of the commands:
fastboot flash abl abl.img
fastboot flash aop aop.img
fastboot flash bluetooth bluetooth.img
fastboot flash devcfg devcfg.img
fastboot flash dsp dsp.img
fastboot flash featenabler featenabler.img
fastboot flash hyp hyp.img
fastboot flash imagefv imagefv.img
fastboot flash keymaster keymaster.img
fastboot flash oplusstanvbk oplusstanvbk.img
fastboot flash odm odm.img
fastboot flash qupfw qupfw.img
fastboot flash tz tz.img
fastboot flash uefisecapp uefisecapp.img
fastboot flash xbl xbl.img
fastboot flash xbl_config xbl_config.img
fastboot flash system system.img
fastboot flash vendor vendor.img
fastboot flash product product.img
Once that is done, you could now reboot the device back to Fastboot Mode from the current FastbootD Mode. Use the below command for that:
fastboot reboot bootloader
Finally, you may now reboot the device to the OS via the following command:
fastboot reboot
Or you can do it in a more comfortable way with the application of this thread:

[TOOL][Windows] Fastboot Enhance [Payload Dumper & Image Flasher]
Fastboot Enhance What it can do? - Show fastboot vars - Switch between fastbootd & bootloader - Switch between A & B slot - Flash Payload.bin in fastbootd - Flash images - Erase partitions - Delete logical partitions - Create logical partitions...
