Squashfs devs already made patches for adding qshs and shsq magic numbers support with LZMA.
It would be nice to apply them to 7-zip as well.
Do you think it's applicable?
Off topic: Could there be a way by which Squashfs can be modifiable as well? I'm having trouble rebuilding with mksquashfs, even when setting it to use the magic number the original file was compiled with.
I'm trying to edit a file in a router firmware:
I used the 'dd' command to copy the squashfs + lzma portion of the file:
I applied the patch above, edited the mksquashfs.c file, line 5287, and replaced SQUASHFS_MAGIC with SQUASHFS_MAGIC_LZMA_SWAP and compiled it (I tried the SQUASHFS_MAGIC_LZMA, but the output file was the exact opposite of what I expected).
When I ran mksquashfs with the proper settings, it gave a file with the destined LZMA magic number, but its "structure", as revealed by binwalk, was totally different than that of the unmodified filesystem.
Hence, if you could add squashfs read\write functionality, with magic number support, to 7-zip, such that it rebuilds the filesystem with the exact settings, you'd do us a great favor (since a majority of WAG320N owners suffer from its lack of customization).
I changed Squashfs code for new version already.
If next alpha version of 7-zip will not support some Squashfs archives, please write here again.
Hello Igor, I found a Squashfs archive which is not supported. I think the problem is that the big-endian encoding is not supported, because other archives with little-endian works.
Hope you can look into that issue and perhaps implement a fix in the next version. Here is the fiel:
there is no SquashFS signature.
Hmm strange. It's definitely a squashfs3 image with lzma compression...
Do you need something from me to help you?
Search in google:
So what is that KERNEL_MAGIC file?
There is lzma stream probably from offset 0x1C
But first 28 bytes is some header.
Do you know the format of that header?
Yeah that's the LZMA compressed squashfs image. But as i found out it's a very special format so I think you don't need to integrate it ;-)
After three hours I finally managed to unpack it with freetz-linux (screenshot 2).