Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Installation details

The minimal quick start (clone, build, install) lives in the FAT documentation. This page is the full installation reference: installer options, external tools, and optional components.

Release downloads

Choose a bundle for your operating system and CPU from FAT Releases. Binary bundles contain fat (fat.exe on Windows), the matching share/fat runtime data, and dependency license notices. Choose the target matching your machine:

SystemCPUTarget
macOSApple Siliconaarch64-apple-darwin
macOSIntelx86_64-apple-darwin
Linuxx86-64x86_64-unknown-linux-gnu
LinuxARM64aarch64-unknown-linux-gnu
Windowsx86-64x86_64-pc-windows-msvc

Linux x86-64 requires glibc 2.35 or newer; Linux ARM64 requires glibc 2.39 or newer. The archives are tested on Ubuntu 22.04 (x86-64), Ubuntu 24.04 (ARM64), and Fedora 42 (both CPUs).

Verify the archive against its adjacent .sha256 file, extract it, and keep the executable and share directory together:

# Substitute the target from the release's asset list.
shasum -a 256 -c firmware-analysis-toolkit-TARGET.tar.gz.sha256
tar -xzf firmware-analysis-toolkit-TARGET.tar.gz
cd firmware-analysis-toolkit-TARGET
./fat --version
./fat data verify
./fat doctor
export PATH="$PWD:$PATH"

On Windows, use Get-FileHash to compare the ZIP’s SHA-256 with its .sha256 file, extract with Expand-Archive, and run .\fat.exe data verify from the extracted directory. The Windows binary supports native analysis commands; workflows using Linux filesystem semantics or external Unix tools should run under WSL with the Linux build.

Cargo installations

FAT is published on crates.io as firmware-analysis-toolkit. cargo install and cargo binstall install only the fat executable; neither provides share/fat. With cargo-binstall available, the prebuilt archive for this platform is fetched instead of compiling:

cargo binstall firmware-analysis-toolkit

Compiling from source needs Rust 1.91 or newer and a C compiler:

cargo install --locked firmware-analysis-toolkit

Then install the runtime data for the installed version:

fat data install --release
fat data verify
fat doctor

--release downloads fat-data-<version>.zip and its .sha256 from the GitHub release, verifies the digest and the manifest, and activates the data. To install from a downloaded archive instead (offline or pinned installs):

version="$(fat --version | awk '{print $2}')"
base="https://github.com/attify/firmware-analysis-toolkit/releases/download/v$version"
curl -fLO "$base/fat-data-$version.zip" -fLO "$base/fat-data-$version.zip.sha256"
[ "$(cat "fat-data-$version.zip.sha256")" = "$(shasum -a 256 "fat-data-$version.zip" | cut -d' ' -f1)" ]
fat data install --archive "./fat-data-$version.zip"

Use sha256sum in place of shasum -a 256 on Linux. Installed data lands in the platform user data root (~/Library/Application Support/FAT on macOS, $XDG_DATA_HOME/fat or ~/.local/share/fat on Linux, %LOCALAPPDATA%\FAT on Windows) and is discovered automatically; set FAT_DATA_DIR to use an unversioned tree instead. Without the bundle, identification, inspection, carving, and analysis work, while kernel recipes, bootloader profiles, emulation, and Android helpers report a missing runtime resource. The source installer below installs both the executable and its runtime data.

Upgrading from FAT 1.x

FAT 2 is a Rust CLI with a new installation and project workflow. Install it in a separate directory, run fat doctor, and create a project with fat new ./firmware.bin. Use the fat commands in the quick start; the FAT 1.x setup.sh, fat.py, and fat.config instructions apply to the older release. Keep existing FAT 1.x workspaces until you have recreated the projects you need in FAT 2.

Arch Linux and Omarchy

Use a regular account with sudo access. The host package setup was validated on Omarchy 4.0.4 (x86-64), using an 8 GB VM and two build jobs. A clean Arch installation was not separately tested.

Install FAT and the default extraction engine

Install the prerequisites with a full system upgrade, then initialize Rust. If you already installed Rust through rustup, omit rustup from the package list below:

sudo pacman -Syu --needed git rustup python
rustup default stable
rustc --version  # must be 1.91 or newer

The installer requires Rust and Python to be present; --install-system-deps does not bootstrap them.

Clone FAT, or use your existing checkout, and run the installer as your regular user:

git clone https://github.com/attify/firmware-analysis-toolkit.git
cd firmware-analysis-toolkit
./scripts/install.sh --install-system-deps --jobs 2
export PATH="$HOME/.local/bin:$HOME/.cargo/bin:$PATH"

This installs FAT, its runtime data, and pinned binwalk-ng 4.0.0 (executable: binwalk). Existing installations follow the Binwalk migration policy. Use --jobs 1 if the build runs short of memory. Add the PATH export to your shell’s startup file to keep it in future sessions.

The installer uses Arch packages when /etc/os-release identifies Arch/Manjaro directly or an otherwise unrecognized distribution declares arch in ID_LIKE, as Omarchy does. Explicitly supported distribution IDs take precedence.

7zip is the current Arch package name; the installer’s p7zip request resolves through its compatibility alias on the tested host.

Verify the installed CLI and data:

fat --version
fat data verify
fat doctor --strict

The installer verifies ZIP and SquashFS extraction through Binwalk, plus an LZO round trip. To repeat that check from the checkout:

python3 scripts/smoke-test-extraction.py --fat "$HOME/.local/bin/fat" \
  --expected-binwalk-version 'binwalk-ng 4.0.0' --format-helpers

Add the tools your workflow needs

Each group is optional; the default extraction setup above does not need all of them.

WorkflowArch packages or setup
Binary triage and fat decompilesudo pacman -S --needed radare2 r2ghidra
Ghidra headless analysis and taint normalizationsudo pacman -S --needed ghidra jdk21-openjdk, then export GHIDRA_HOME=/opt/ghidra
ARM and MIPS system emulationsudo pacman -S --needed qemu-system-arm qemu-system-mips
User-mode emulation and debuggingsudo pacman -S --needed qemu-user gdb
Bootloader terminal sessionssudo pacman -S --needed tmux
Python tool environmentssudo pacman -S --needed python-pip python-pipx
Container backendsSee the Docker steps below
Binary taint analysisFollow Optional angr setup
Joern CPG analysisFollow the upstream installation guide; put its joern and C/C++ frontend commands on PATH

r2ghidra supplies the radare2 decompiler plugin used by fat decompile. Installing standalone Ghidra does not install that plugin. The Ghidra package above was tested with JDK 21; follow the package’s Java requirement if a later release changes it.

For Docker, install and start the service:

sudo pacman -S --needed docker
sudo systemctl start docker
sudo docker run --rm hello-world

FAT must also be able to contact Docker as the user running FAT. Configure rootless Docker or your intended Docker access method using the upstream post-installation guide, then verify docker info without sudo. Membership in the docker group grants root-level privileges. Installing Docker or QEMU alone does not configure a FirmAE, Firmadyne, or EMUX backend; fat doctor reports missing bundles and recipes separately.

For native unblob, install the Python application and common extractors:

sudo pacman -S --needed python-pipx erofs-utils lz4 lzop zstd partclone unarchiver android-tools
pipx install unblob
pipx install jefferson
pipx install ubi-reader
unblob --show-external-dependencies

The extraction profile supplies Sasquatch, which unblob can also use. These packages still do not supply every unblob extractor. Treat missing entries in the dependency report as unavailable format support. Follow unblob’s extractor installation instructions for the remaining formats, or use its upstream Docker distribution:

docker pull ghcr.io/onekey-sec/unblob:latest
docker run --rm --network none ghcr.io/onekey-sec/unblob:latest --show-external-dependencies

The container supplied all reported extractors and recovered a test SquashFS file on the validated host. Follow the upstream container usage instructions to mount your input and output directories. This is a separate unblob invocation; it does not add those extractors to the host’s native unblob installation.

fat doctor --strict requires a usable extraction engine. It does not verify every unblob extractor, the angr Python environment, or a successful firmware boot. The synthetic extraction check above tests a real extraction operation.

Installer options

The source installer requires Rust 1.91+ and Python 3. Use --install-system-deps for a fresh installation: it installs the build dependencies and extraction utilities, including 7z, SquashFS tools, and lzop. The extraction profile builds pinned binwalk-ng and Sasquatch in the selected prefix.

./scripts/install.sh --install-system-deps
# CLI and runtime data only, with paths containing spaces:
./scripts/install.sh --profile core --prefix "$HOME/FAT tools" \
  --data-dir "$HOME/FAT data"
OptionEffect
--profile core|extractionCLI plus runtime data, optionally with Binwalk (default: extraction)
--prefix PATHInstall under PATH (default: ~/.local); add its bin directory to your shell’s PATH
--data-dir PATHStore data there and link PREFIX/share/fat for automatic discovery; refuse an existing conflicting path
--jobs N, --nativeChoose build concurrency or optimize Rust binaries for this CPU
--testRun locked workspace tests before installation
--dry-runPrint mutating commands without executing them or deleting temporary files
--skip-extraction-smokeExplicitly skip the synthetic extraction check

No FAT_DATA_DIR export is needed for installer-managed custom data. An existing FAT_DATA_DIR environment override still takes precedence; unset it to use the installation’s data. Keep the linked custom directory in place when using FAT.

Binwalk migration

The extraction profile installs binwalk-ng 4.0.0 and Sasquatch sasquatch-v4.5.1-6. The Binwalk command remains binwalk. Rerun the installer to upgrade an existing installation and add the extraction helpers:

./scripts/install.sh --install-system-deps --prefix "$HOME/.local"
export PATH="$HOME/.local/bin:$PATH"
binwalk --version  # binwalk-ng 4.0.0

Older Binwalk and Sasquatch executables in PREFIX/bin are replaced; matching managed installations are reused. Tools elsewhere on PATH are preserved. Conflicting executable symlinks are refused; use a separate prefix in that case. Keep PREFIX/bin first on PATH.

Sasquatch is built from a checksum-verified source release, including sasquatch-v4be for big-endian SquashFS v4. lzop is installed through the system package manager with --install-system-deps; without that option, it must already be available. The installer verifies ZIP and SquashFS extraction through Binwalk and an LZO compression/decompression round trip.

Automatic extraction still tries FAT’s native engine first. Other specialized Binwalk formats may need additional tools from the upstream dependency guide.

External tools

FAT orchestrates external tools. Install only those needed for your workflow; fat doctor reports what it finds. For binwalk and unblob, strict mode requires a bounded version probe to succeed, not merely a matching executable name.

ToolNeeded forTypical installation
binwalkFirmware extraction./scripts/install.sh --profile extraction installs pinned binwalk-ng 4.0.0
unblobAlternative extractionpipx install unblob, plus its external extractors
debugfsext filesystem extraction and ext2 repairbrew install e2fsprogs or apt install e2fsprogs
radare2Binary triage and symbol resolutionbrew install radare2 or apt install radare2
r2ghidrafat decompileInstall the radare2 plugin; Arch: pacman -S radare2 r2ghidra
GhidraHeadless analysis and taint normalizationInstall from ghidra-sre.org and set GHIDRA_HOME
JoernCPG proof stageInstall from joern.io
QEMUSystem-mode emulationbrew install qemu or apt install qemu-system
DockerContainerized emulation backendsFollow the Docker installation guide
GDBDebugger integrationgdb or gdb-multiarch, with support for the target architecture
tmuxBootloader emulation sessionspacman -S tmux, apt install tmux, or brew install tmux
Python 3Discovery runnersapt install python3
Python 3.10+ and angrOptional binary taint engineIsolated environment in Optional angr setup

Optional angr setup

Python alone does not install angr. Following the upstream installation guidance, create an isolated environment with Python 3.10 or newer:

python3 -m venv "$HOME/.local/share/fat-angr-venv"
"$HOME/.local/share/fat-angr-venv/bin/python" -m pip install angr pyyaml
export FAT_PYTHON="$HOME/.local/share/fat-angr-venv/bin/python"
"$FAT_PYTHON" -c 'import angr, yaml; print(angr.__version__)'

Keep FAT_PYTHON set in shells running FAT. On Debian/Ubuntu, install python3-venv if environment creation is unavailable. fat doctor --strict checks extraction-engine readiness; it does not validate the optional angr environment. The import command above checks that environment without running firmware analysis.

For angr releases that provide the optional Unicorn extra, install it in the same environment if you need native execution acceleration:

"$FAT_PYTHON" -m pip install 'angr[unicorn]'

This resolved the optional Unicorn loading warning with angr 10.0.0 on the tested Omarchy host. Normal SSH login shells and non-interactive SSH commands can load different startup files; export FAT_PYTHON explicitly in scripts or one-shot SSH commands instead of assuming an interactive shell configuration was loaded.

macOS ext2 builder image

FAT_EXT2_BUILDER_IMAGE may point to an operator-provided image pinned by digest. FAT does not pull that image or install packages at runtime. The builder disables networking, mounts firmware source read-only, enables no-new-privileges, and uses five narrow capabilities.