erofs-utils icon indicating copy to clipboard operation
erofs-utils copied to clipboard

Does not unpack Amlogic S905X5M firmware images

Open blackeangel opened this issue 9 months ago • 3 comments

Hello. Neither system nor vendor from the Amlogic S905X5M firmware wants to be unpacked. Vendor image The image is not mounted via mount, only via erofsfuse.

Image

blackeangel avatar May 14 '25 10:05 blackeangel

https://github.com/torvalds/linux/blob/5723cc3450bccf7f98f227b9723b5c9f6b3af1c5/fs/erofs/decompressor_deflate.c#L64-L67

	if (dfl->windowbits > MAX_WBITS) {
		erofs_err(sb, "unsupported windowbits %u", dfl->windowbits);
		return -EOPNOTSUPP;
	}

The compression format parameters used by this erofs image were modified or corrupted. If you need to extract files, try the built-in f2fs.erofs in the firmware, where the parameter --extract=out is similar to -o out. If you need selinux context, you can use the --only-cfg parameter in extract.erofs,Only extracting configuration information will not cause errors.

sekaiacg avatar May 18 '25 07:05 sekaiacg

We got root and pulled out the erofs utilities from there: dump, fsck mkfs. When running fsck.erofs, we saw that there is some "crypto" compression algorithm.

Image

Searching the Internet, I could not find any information on this matter, except for some patch, which was offered, perhaps, by an AMLOGIC employee.Link on the info

There is a fork on GitHub that can be merged with your extractor. Please add it to your extractor.

blackeangel avatar May 18 '25 12:05 blackeangel

Can confirm this crypto algorithm applies for a few devices across AMLogic chipsets (S904X and S905X)

Any update or progress for this?

RickyDivjakovski avatar Nov 11 '25 20:11 RickyDivjakovski