When I flash my Nexus 7 2013 with a rebuilt aosp system.img using fastboot, the data in the partition (as read back by dd) is very slightly different from the system.img data used to flash it. A block of "20..." bytes appears to have moved.
Any idea why? The partition isn't mounted rw at any point (that messes it up even further by setting the superblock s_mtime and s_wtime values).
Update: Actually it seems that just a byte at offset 0x560 has been changed from 0x00 to 0x02. Now that I dig into the details, this is the s_flags of the superblock, with 0x02 representing "Unsigned directory hash in use", which would make some sense (although "Signed directory hash in use" would make more sense given I'm using dm-verity).
I still don't think it should be modifying the data given that it is never mounted rw though...