ubi-reader
Extract files from UBI and UBIFS images.
What it is and what it does
UBI Reader is a Python tool for extracting and analyzing UBI (Unsorted Block Images) and UBIFS (UBI Filesystems) from NAND device dumps. It includes both a library for programmatic use and command-line scripts for common tasks like file extraction, directory listing, and image analysis. The package depends on cryptography, lzallright, and zstandard for compression and encryption handling.
The tool is designed for firmware extraction, forensics, and embedded device analysis. It searches for UBI/UBIFS data within a dump file and extracts the filesystem contents or generates configuration suitable for rebuilding images with mtd-utils. Known limitations include lack of journal replay (uncommitted data may be lost), potential NAND bit errors if not corrected upstream, and special file handling that may require elevated privileges.
Use it for:
- Extract firmware files from embedded device NAND dumps for analysis or recovery.
- List and copy individual files from a UBIFS image without full extraction.
- Analyze UBI image structure and generate shell scripts and config files for recreating images.
- Debug corrupted or problematic UBI images using override parameters and block-level inspection.
- Forensic examination of flash storage from routers, IoT devices, or other embedded systems.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Extracts files and analyzes the structure of UBI and UBIFS filesystem images, typically from NAND device dumps, and can generate parameters for recreating images with mtd-utils.
Yes, if you work with embedded device firmware or NAND flash analysis. Low install friction, active maintenance, no known vulnerabilities, and a focused feature set for a specialized task. The copyleft license is a consideration if you plan to redistribute derivative work. Not relevant for general application development.
Install
ubi-reader on PyPI
pip
pip install ubi-readeruv
uv add ubi-readerpoetry
poetry add ubi-readerInstalling ubi-reader
Before you install
Low install friction with a pure-Python wheel and only three runtime dependencies (cryptography, lzallright, zstandard). Active maintenance as of 59 days ago, supporting modern Python versions from 3.10 through 3.14.
License in practice
Licensed under GNU GPL with copyleft treatment, meaning any derivative work or distribution must also be GPL-licensed. This is a strong copyleft obligation that affects downstream use and modification.
Quickstart
pip install ubi_reader
ubireader_extract_files path/to/nand_dump.bin
# Extracts to ./ubifs-root/ by default
Requires Python 3.10 or later. Creating special files (sockets, devices) requires root or sudo privileges.
Verify before relying
- Whether journal replay is planned or if uncommitted data loss is acceptable for your use case.
- Whether error correction for NAND bit errors is handled or if raw dumps need pre-processing.
- Performance characteristics on large NAND dumps or images.
Package facts
| License | GNU GPL (copyleft) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — cryptography, lzallright, zstandard |
| Maintenance | actively maintained — 59 days since the last release |
| First released | |
| Downloads | 110,266/month — #12,475 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: ubi_reader-0.8.14-py3-none-any.whl
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
littlefs-pythonlittlefs-python provides a Python interface to…
unclear · top 5,000 on PyPI
ipsw-parserParses and extracts data from iOS IPSW firmware…
copyleft · top 15,000 on PyPI
minidumpParses Microsoft minidump files and reads…
permissive · top 15,000 on PyPI
esp-coredumpRetrieves and analyzes core dumps from ESP32…
permissive · top 5,000 on PyPI
micawberExtracts rich metadata (title, author,…
unclear · top 15,000 on PyPI
azure-ai-vision-imageanalysisCalls Azure's Computer Vision service to…
permissive · top 15,000 on PyPI
uefi-firmwareParses, extracts, and recreates UEFI firmware…
permissive · top 15,000 on PyPI
container-inspectorAnalyzes Docker images, containers, and virtual…
permissive · top 15,000 on PyPI
pymupdfPyMuPDF extracts, renders, converts, and…
agpl · top 1,000 on PyPI
psd-toolspsd-tools reads and writes Adobe Photoshop…
permissive · top 15,000 on PyPI