When installing new ROM through fastboot, which .img files must be flashed, with what arguments, and in what order? I own a Oneplus 7T, which runs Android 10 and therefore has no working TWRP to flash ROMs with. It's bootloader is unlocked and is rooted.

When installing a new ROM, whether it is a custom ROM or an update to the current ROM, I install them by extracting the ROM zip, extracting payload.bin, and flashing certain .img files in fastboot, following the instructions found here under the 'Manual Flash' section.

However, I'd like to understand more about this process. The instructions flash less .img files than were extracted. For example, in the recent Oneplus 7T OOS 10.0.11 update, the the number of .img files extracted (31) is less than what was flashed according to the instructions (19). Furthermore, the instructions passed the arguments --disable-verity when flashing two of the .imgs, but not the others.

Therefore, I'm wondering:


What does each .img file do?
Which files must be flashed and in what order?
Why are certain files flashed with certain arguments?
I own a OnePlus 7 and the same developer has answered a similar question in One Plus 7 device forums 

Question


  I just noticed, the script in bat file only flashes 25 .img files, but when I extracted payload.bin in OB2 I saw 32 .img files. Does this mean that the other .img files in payload are not needed? Or can I add the command in bat file to flash other images?


Answer


  They can't be flashed using fastboot, that are the criticals partitions, they are needed and it's for that these fastboot roms can't be used to update or downgrade the software you have on your device, because the fastboot roms can't flash all partitions. This fastboot roms should be used if your system cannot be used and if you don't have access to TWRP



They need to be flashed in the order specified. All of them (see next point) 
.img files replace the file on the device with the one in fastboot ROM, except for critical partitions 
(I am not sure what these are for your device but could be boot loader, OTA, TEE, SoC etc) . This accounts for the difference in number (31 extracted but 19 only flashed). See Irfan's comment 
--disable-verity is only applicable for vbmeta header files. For more details, see How to disable dm-verity on Android with &quot;user&quot; build type ROM? where the concept is well explained, in detail.