skillfed

ubi-reader

Extract files from UBI and UBIFS images.

ubi-reader v0.8.14 110.3K downloads/30d#12,475 on PyPI
Copyleft license GNU GPL Active released

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-reader

uv

uv add ubi-reader

poetry

poetry add ubi-reader

Installing 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

License :: Other/Proprietary LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

Tags

extract UBI UBIFS imagesNAND dump extractionUBI filesystem analysismtd-utils parameter generationembedded filesystem recoveryflash memory image tools
firmware-extractionembedded-systemsforensics

More Utilities packages