Skip to content

Add jzlzma (Ingenic LZ77) detection and extraction#957

Open
CapnRon wants to merge 2 commits into
ReFirmLabs:masterfrom
CapnRon:master
Open

Add jzlzma (Ingenic LZ77) detection and extraction#957
CapnRon wants to merge 2 commits into
ReFirmLabs:masterfrom
CapnRon:master

Conversation

@CapnRon

@CapnRon CapnRon commented Jun 21, 2026

Copy link
Copy Markdown

Adds support for the Ingenic LZ77 variant used in T10/T20/T30/Zeratul SoC firmware for kernel and rootfs images.

Detects the mark_rootfs_lzma wrapper header (magic 0x27051956) and extracts using an embedded Python decompressor that handles wrapped, raw, and standard LZMA Alone formats.

Fixes a minor clap bug in -x/-y flags (num_args = 1.. was eating the positional file argument).

CapnRon and others added 2 commits June 21, 2026 11:27
Detects the mark_rootfs_lzma wrapper (magic 0x27051956) used by Ingenic
T10/T20/T30/Zeratul/etc SoC firmware for kernel and rootfs images.

- src/signatures/jzlzma.rs: magic + parser
- src/structures/jzlzma.rs: header struct parsing
- src/extractors/jzlzma.rs: internal extractor using embedded Python script
- scripts/jzlzma/jzlzma_decompress.py: decompressor (supports wrapped,
  raw, and standard LZMA Alone formats)
- cliparser.rs: fix num_args 1.. to 1 for -x/-y (was eating positional arg)

Signed-off-by: CapnRon <capnron@users.noreply.github.com>
Previously the uImage extractor only carved the payload to disk when the
data CRC matched. Some uImages have a valid header but a mismatched data
CRC (e.g. when the payload uses a different compression than the header
claims). This change warns on CRC mismatch but still carves the data.
@CapnRon

CapnRon commented Jun 21, 2026

Copy link
Copy Markdown
Author

If you like a firmware to test, one is located here with a jzlzma kernel uimage. Another new firmware with a jzlzma rootfs should be added soon that I can link to then

https://github.com/themactep/ipc-firmware/blob/master/wansview_a1-t23zn-atbm6461-stock.bin

@CapnRon

CapnRon commented Jun 21, 2026

Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant