As we know the normal Magic number is 0x73717368("hsqs").
But some vendors modified the
squashfs
format to support LZMA, and changed the magic to 0x71736873("shsq").
But now, squashfs has already supported LZMA. Thus we can modify our binary image and let
unsquashfs do its work.
Open image with a hex edtor or create your own tool.
Change the magic "shsq" to "hsqs" at the beginning of the image.
Change
.compression_id(image_header[20]) from "1-GZIP" to "2-LZMA"
run
unsquashfs as usual.
ref:https://dr-emann.github.io/squashfs/