BotoX / Dahua-Firmware-Mod-Kit

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

XZ compression not supported #2

Closed EtoTen closed 7 years ago

EtoTen commented 7 years ago

I was trying to extract the files from "General_IPC-HX4X2X-Themis_Eng_N_V2.400.0000.15.R.20160615" which is for an Amcrest IP4M-1025E (Dahua re-brand).

And got an error saying that unsquashf doesn't support xz compression. I guess they are using xz compression vs gzip for some reason in this package.

I installed

sudo apt-get install lzma-dev

sudo apt-get install liblzma-dev

Then I went in and had to edit your squashfs-tools fork...

Edited line 29 of the Makefile, uncommented #XZ_SUPPORT = 1 and recompiled / reinstalled.

Everything worked after this.

BotoX commented 7 years ago

Oh indeed the Makefile for squashfs-tools had these disabled by default. I enabled it now: https://github.com/BotoX/squashfs-tools/commit/bea2520e1ab909483313fef85585f6963ef36ccf Thanks.