Extracting firmware
Extraction turns a firmware image into published files plus a manifest that explains every recognized branch. FAT’s native pipeline is deterministic and does not execute recovered programs.
Projects first
fat new ./firmware.bin
fat extract .fat-projects/firmware
A project records the source identity and owns extraction, analysis, sessions, and runtime state. Use --name to override the derived slug and --projects-dir to place the project elsewhere.
Use case-sensitive storage when firmware contains names such as libip6t_HL.so and libip6t_hl.so. On macOS, create a case-sensitive APFS volume or disk image:
fat new ./firmware.bin --projects-dir /Volumes/FAT/projects
fat extract /Volumes/FAT/projects/firmware
Choose an engine
fat extract .fat-projects/firmware --extractor auto --json > extraction.json
fat extract .fat-projects/firmware --extractor native
fat extract .fat-projects/firmware --extractor all
| Engine | Behavior |
|---|---|
auto (default) | Native first, with external fallback when native recovery is incomplete |
native | Built-in decoders only; never invokes external fallback |
binwalk | External binwalk-ng only |
unblob | External unblob only |
all | Runs every engine without skipping |
--force reruns extraction and overwrites existing artifacts. --extract-timeout SECS bounds a stalled external engine; 0 disables the timeout. The default is FAT_EXTRACT_TIMEOUT or 1800 seconds.
Read the manifest, not just the directory
The extraction manifest is work/extraction-manifest.json. Its important fields are:
recovery_status:rootfs_recovered,files_only, orpartial;artifacts: per-artifact lineage, decoder, output path, counts, timing, and failure reason;kernel_paths: kernel candidates, which are not inferred from directory names.
work/native-artifacts.json preserves native outcomes when the command cannot produce a final manifest. A successful exit and a directory full of files do not establish complete rootfs recovery; inspect unresolved branches in artifacts.
Gzip members are published under artifact-ID/format directories such as work/extractions/native/0004-gzip. The directory name identifies the artifact and compression format, not a kernel role.
Native format support
| Format | Support |
|---|---|
| ZIP, TAR, gzip | Recursive container extraction |
| SquashFS 2/3/4 | Both byte orders; zlib, LZMA, and XZ codecs |
| CramFS | Bounded native decoder |
| JFFS2 | CRC-validated nodes, inode versions, dirent deletions, both byte orders |
| JFFS2 fragments | Uncompressed, copy, zero-filled, and zlib |
Unsupported codecs, incomplete files, and exceeded limits remain explicit unresolved outcomes. SquashFS special device entries are counted and omitted; ownership, timestamps, and xattrs are not restored. TAR hard links and sparse entries are unsupported.
JFFS2 discovery joins nodes across erased gaps of at most 64 KiB. It does not infer partition boundaries, ECC/OOB layouts, or missing fragments. Filenames and symlink targets currently require UTF-8.
Limits
Default native limits are:
| Resource | Limit |
|---|---|
| Input | 512 MiB |
| Single output file | 256 MiB |
| Cumulative output, including symlink targets | 1 GiB |
| Output entries | 262,144 |
| Artifacts | 4,096 |
| Container depth | 8 |
| Path components | 64 |
| Shared metadata/fragment cache | 16 MiB |
Carve a known region
When you already know the offset and size, skip full extraction:
fat carve --file firmware.bin --offset 0x200000 --size 0x100000 --output part.bin
fat carve --file firmware.bin --offset 0x200000 --format squashfs --output fs.sqsh
fat extract-payload --file firmware.bin --offset 0x40 --format gzip
carve extracts a byte range or a format-sized object; extract-payload extracts a payload fragment at a known offset. Both accept --project to resolve the primary firmware image from a project.
Next: Filesystem analysis.