BotoX / Dahua-Firmware-Mod-Kit

Unpack and repack Dahua IP camera firmware upgrade images.
GNU General Public License v3.0
154 stars 52 forks source link

Rebuilt files differ from originals #17

Open roger- opened 4 years ago

roger- commented 4 years ago

I'm trying to see if I can extract and exactly rebuild the firmware (without modifying anything) for an Amcrest branded IPC-HDBW1120E-W, but my final .bin size is 13013878 vs 13013463 bytes for the original. Furthermore the .img files in the build/ directory don't match the original ones according to diff.

The only real change I had to do was to modify the SD-Zi-Themis.py config based on info in partition-x.cramfs.img.extracted/.

I'm using the versions of cramfsck, mkcramfs, mksquashfs and unsquashfs recommended.

Any ideas why the files aren't matching? Perhaps because the dates aren't the same, but not sure why the file sizes also aren't.

Are they safe to flash?

BotoX commented 4 years ago

Yeah it's not easy to match everything 100%, as such there will always be small differences. Like a different compression library version could explain it. It should be safe to flash regardless.