[OnePlus 7T Guides, News, & Discussion] ziddey:
You should be taking dumps before flashing anything anyway.

Find a copy of your boot.img or a similar (optionally pre-rooted) one. Save to internal storage and patch with magisk if necessary. Then fastboot boot it to have temporary root. From there you can dd all your partitions.

You can skip sda-sdf and userdata. Note system/vendor/product are in the super partition in Android 10.

For your convenience:

dd if=/dev/block/by-name/ALIGN_TO_128K_1 of=/sdcard/dump/ALIGN_TO_128K_1.img
dd if=/dev/block/by-name/ALIGN_TO_128K_2 of=/sdcard/dump/ALIGN_TO_128K_2.img
dd if=/dev/block/by-name/LOGO_a of=/sdcard/dump/LOGO_a.img
dd if=/dev/block/by-name/LOGO_b of=/sdcard/dump/LOGO_b.img
dd if=/dev/block/by-name/abl_a of=/sdcard/dump/abl_a.img
dd if=/dev/block/by-name/abl_b of=/sdcard/dump/abl_b.img
dd if=/dev/block/by-name/aging of=/sdcard/dump/aging.img
dd if=/dev/block/by-name/aging_mod of=/sdcard/dump/aging_mod.img
dd if=/dev/block/by-name/aop_a of=/sdcard/dump/aop_a.img
dd if=/dev/block/by-name/aop_b of=/sdcard/dump/aop_b.img
dd if=/dev/block/by-name/apdp of=/sdcard/dump/apdp.img
dd if=/dev/block/by-name/bluetooth_a of=/sdcard/dump/bluetooth_a.img
dd if=/dev/block/by-name/bluetooth_b of=/sdcard/dump/bluetooth_b.img
dd if=/dev/block/by-name/boot_a of=/sdcard/dump/boot_a.img
dd if=/dev/block/by-name/boot_b of=/sdcard/dump/boot_b.img
dd if=/dev/block/by-name/carrier of=/sdcard/dump/carrier.img
dd if=/dev/block/by-name/catecontentfv of=/sdcard/dump/catecontentfv.img
dd if=/dev/block/by-name/catefv of=/sdcard/dump/catefv.img
dd if=/dev/block/by-name/cateloader of=/sdcard/dump/cateloader.img
dd if=/dev/block/by-name/cdt of=/sdcard/dump/cdt.img
dd if=/dev/block/by-name/cmnlib64_a of=/sdcard/dump/cmnlib64_a.img
dd if=/dev/block/by-name/cmnlib64_b of=/sdcard/dump/cmnlib64_b.img
dd if=/dev/block/by-name/cmnlib_a of=/sdcard/dump/cmnlib_a.img
dd if=/dev/block/by-name/cmnlib_b of=/sdcard/dump/cmnlib_b.img
dd if=/dev/block/by-name/config of=/sdcard/dump/config.img
dd if=/dev/block/by-name/core_nhlos of=/sdcard/dump/core_nhlos.img
dd if=/dev/block/by-name/ddr of=/sdcard/dump/ddr.img
dd if=/dev/block/by-name/devcfg_a of=/sdcard/dump/devcfg_a.img
dd if=/dev/block/by-name/devcfg_b of=/sdcard/dump/devcfg_b.img
dd if=/dev/block/by-name/devinfo of=/sdcard/dump/devinfo.img
dd if=/dev/block/by-name/dip of=/sdcard/dump/dip.img
dd if=/dev/block/by-name/dsp_a of=/sdcard/dump/dsp_a.img
dd if=/dev/block/by-name/dsp_b of=/sdcard/dump/dsp_b.img
dd if=/dev/block/by-name/dtbo_a of=/sdcard/dump/dtbo_a.img
dd if=/dev/block/by-name/dtbo_b of=/sdcard/dump/dtbo_b.img
dd if=/dev/block/by-name/frp of=/sdcard/dump/frp.img
dd if=/dev/block/by-name/fsc of=/sdcard/dump/fsc.img
dd if=/dev/block/by-name/fsg of=/sdcard/dump/fsg.img
dd if=/dev/block/by-name/fw_ufs1_a of=/sdcard/dump/fw_ufs1_a.img
dd if=/dev/block/by-name/fw_ufs1_b of=/sdcard/dump/fw_ufs1_b.img
dd if=/dev/block/by-name/fw_ufs2_a of=/sdcard/dump/fw_ufs2_a.img
dd if=/dev/block/by-name/fw_ufs2_b of=/sdcard/dump/fw_ufs2_b.img
dd if=/dev/block/by-name/fw_ufs3_a of=/sdcard/dump/fw_ufs3_a.img
dd if=/dev/block/by-name/fw_ufs3_b of=/sdcard/dump/fw_ufs3_b.img
dd if=/dev/block/by-name/fw_ufs4_a of=/sdcard/dump/fw_ufs4_a.img
dd if=/dev/block/by-name/fw_ufs4_b of=/sdcard/dump/fw_ufs4_b.img
dd if=/dev/block/by-name/fw_ufs5_a of=/sdcard/dump/fw_ufs5_a.img
dd if=/dev/block/by-name/fw_ufs5_b of=/sdcard/dump/fw_ufs5_b.img
dd if=/dev/block/by-name/hyp_a of=/sdcard/dump/hyp_a.img
dd if=/dev/block/by-name/hyp_b of=/sdcard/dump/hyp_b.img
dd if=/dev/block/by-name/imagefv_a of=/sdcard/dump/imagefv_a.img
dd if=/dev/block/by-name/imagefv_b of=/sdcard/dump/imagefv_b.img
dd if=/dev/block/by-name/keymaster_a of=/sdcard/dump/keymaster_a.img
dd if=/dev/block/by-name/keymaster_b of=/sdcard/dump/keymaster_b.img
dd if=/dev/block/by-name/keystore of=/sdcard/dump/keystore.img
dd if=/dev/block/by-name/limits of=/sdcard/dump/limits.img
dd if=/dev/block/by-name/logdump of=/sdcard/dump/logdump.img
dd if=/dev/block/by-name/logfs of=/sdcard/dump/logfs.img
dd if=/dev/block/by-name/mdm1m9kefs1 of=/sdcard/dump/mdm1m9kefs1.img
dd if=/dev/block/by-name/mdm1m9kefs2 of=/sdcard/dump/mdm1m9kefs2.img
dd if=/dev/block/by-name/mdm1m9kefs3 of=/sdcard/dump/mdm1m9kefs3.img
dd if=/dev/block/by-name/mdm1m9kefsc of=/sdcard/dump/mdm1m9kefsc.img
dd if=/dev/block/by-name/mdm1oemnvbktmp of=/sdcard/dump/mdm1oemnvbktmp.img
dd if=/dev/block/by-name/mdm_oem_dycnvbk of=/sdcard/dump/mdm_oem_dycnvbk.img
dd if=/dev/block/by-name/mdm_oem_stanvbk of=/sdcard/dump/mdm_oem_stanvbk.img
dd if=/dev/block/by-name/mdmddr of=/sdcard/dump/mdmddr.img
dd if=/dev/block/by-name/mdtp_a of=/sdcard/dump/mdtp_a.img
dd if=/dev/block/by-name/mdtp_b of=/sdcard/dump/mdtp_b.img
dd if=/dev/block/by-name/mdtpsecapp_a of=/sdcard/dump/mdtpsecapp_a.img
dd if=/dev/block/by-name/mdtpsecapp_b of=/sdcard/dump/mdtpsecapp_b.img
dd if=/dev/block/by-name/metadata of=/sdcard/dump/metadata.img
dd if=/dev/block/by-name/misc of=/sdcard/dump/misc.img
dd if=/dev/block/by-name/modem_a of=/sdcard/dump/modem_a.img
dd if=/dev/block/by-name/modem_b of=/sdcard/dump/modem_b.img
dd if=/dev/block/by-name/modemst1 of=/sdcard/dump/modemst1.img
dd if=/dev/block/by-name/modemst2 of=/sdcard/dump/modemst2.img
dd if=/dev/block/by-name/msadp of=/sdcard/dump/msadp.img
dd if=/dev/block/by-name/multiimgoem_a of=/sdcard/dump/multiimgoem_a.img
dd if=/dev/block/by-name/multiimgoem_b of=/sdcard/dump/multiimgoem_b.img
dd if=/dev/block/by-name/oem_dycnvbk of=/sdcard/dump/oem_dycnvbk.img
dd if=/dev/block/by-name/oem_stanvbk of=/sdcard/dump/oem_stanvbk.img
dd if=/dev/block/by-name/op1 of=/sdcard/dump/op1.img
dd if=/dev/block/by-name/op2 of=/sdcard/dump/op2.img
dd if=/dev/block/by-name/opproduct_a of=/sdcard/dump/opproduct_a.img
dd if=/dev/block/by-name/opproduct_b of=/sdcard/dump/opproduct_b.img
dd if=/dev/block/by-name/param of=/sdcard/dump/param.img
dd if=/dev/block/by-name/persist of=/sdcard/dump/persist.img
dd if=/dev/block/by-name/qupfw_a of=/sdcard/dump/qupfw_a.img
dd if=/dev/block/by-name/qupfw_b of=/sdcard/dump/qupfw_b.img
dd if=/dev/block/by-name/rawdump of=/sdcard/dump/rawdump.img
dd if=/dev/block/by-name/recovery_a of=/sdcard/dump/recovery_a.img
dd if=/dev/block/by-name/recovery_b of=/sdcard/dump/recovery_b.img
dd if=/dev/block/by-name/reserve1 of=/sdcard/dump/reserve1.img
dd if=/dev/block/by-name/reserve2 of=/sdcard/dump/reserve2.img
dd if=/dev/block/by-name/reserve3 of=/sdcard/dump/reserve3.img
dd if=/dev/block/by-name/reserve4 of=/sdcard/dump/reserve4.img
#dd if=/dev/block/by-name/sda of=/sdcard/dump/sda.img
#dd if=/dev/block/by-name/sdb of=/sdcard/dump/sdb.img
#dd if=/dev/block/by-name/sdc of=/sdcard/dump/sdc.img
#dd if=/dev/block/by-name/sdd of=/sdcard/dump/sdd.img
#dd if=/dev/block/by-name/sde of=/sdcard/dump/sde.img
#dd if=/dev/block/by-name/sdf of=/sdcard/dump/sdf.img
dd if=/dev/block/by-name/secdata of=/sdcard/dump/secdata.img
dd if=/dev/block/by-name/splash of=/sdcard/dump/splash.img
dd if=/dev/block/by-name/spunvm of=/sdcard/dump/spunvm.img
dd if=/dev/block/by-name/ssd of=/sdcard/dump/ssd.img
dd if=/dev/block/by-name/storsec_a of=/sdcard/dump/storsec_a.img
dd if=/dev/block/by-name/storsec_b of=/sdcard/dump/storsec_b.img
dd if=/dev/block/by-name/super of=/sdcard/dump/super.img
dd if=/dev/block/by-name/toolsfv of=/sdcard/dump/toolsfv.img
dd if=/dev/block/by-name/tz_a of=/sdcard/dump/tz_a.img
dd if=/dev/block/by-name/tz_b of=/sdcard/dump/tz_b.img
dd if=/dev/block/by-name/uefisecapp_a of=/sdcard/dump/uefisecapp_a.img
dd if=/dev/block/by-name/uefisecapp_b of=/sdcard/dump/uefisecapp_b.img
dd if=/dev/block/by-name/uefivarstore of=/sdcard/dump/uefivarstore.img
#dd if=/dev/block/by-name/userdata of=/sdcard/dump/userdata.img
dd if=/dev/block/by-name/vbmeta_a of=/sdcard/dump/vbmeta_a.img
dd if=/dev/block/by-name/vbmeta_b of=/sdcard/dump/vbmeta_b.img
dd if=/dev/block/by-name/vbmeta_system_a of=/sdcard/dump/vbmeta_system_a.img
dd if=/dev/block/by-name/vbmeta_system_b of=/sdcard/dump/vbmeta_system_b.img
dd if=/dev/block/by-name/xbl_a of=/sdcard/dump/xbl_a.img
dd if=/dev/block/by-name/xbl_b of=/sdcard/dump/xbl_b.img
dd if=/dev/block/by-name/xbl_config_a of=/sdcard/dump/xbl_config_a.img
dd if=/dev/block/by-name/xbl_config_b of=/sdcard/dump/xbl_config_b.img

With the dump, you should make a note of the active slot.

fastboot getvar all

look for current-slot

Of course, create /sdcard/dump before dumping, and adb pull /sdcard/dump after. super.img will be big.