Tool
UBI Reader
Python module and command-line scripts that read UBI and UBIFS images, including ones inside raw NAND dumps, by locating the first UBI or UBIFS data in a file. They extract files or whole UBI and UBIFS images, list and copy single files, display UBI headers, volume tables and the UBIFS super and master nodes, and search physical erase blocks when debugging failed extractions. ubireader_utils_info also derives the mtd-utils parameters, written as a shell script and config file, needed to rebuild an image to the same specification.
- Targets
- Firmware
- Category
- Firmware tools
- Relationship
- Foundation tool
- Sources reviewed
Requirements & limits
- Reviewed at main commit 5f45e50 (2026-09-13). The latest release is 0.8.16, published on 2026-09-04 on GitHub and as the ubi-reader package on PyPI; pyproject lists ONEKEY and Jason Pruitt as authors, and unblob's reviewed main commit depends on ubi-reader>=0.8.15. The README's separate testing branch, with repair tools and parameter overrides for broken images, was last updated in 2018.
- Requires Python 3.10+, installed from PyPI or from source with Poetry; dependencies are lzallright for LZO, zstandard and cryptography. Creating special files during extraction needs root, and socket files are skipped unless settings.py is changed. Files encrypted with an fscrypt v1 policy are decrypted only when the user supplies the master key.
- Input is a UBI or UBIFS image or NAND dump that the user supplies. The repository commits no firmware or flash images; its only test checks the guard against path traversal in extracted file names, and CI runs it with pytest on Python 3.10.
- Known issues in the README: the journal is not replayed, so uncommitted data is not recovered, and depending on how the NAND was dumped the data bits may not be error-corrected. Offsets and PEB or LEB sizes can be given when guessing fails. GPL-3.0 (LICENSE; pyproject says GNU GPL); extracted firmware contents keep their vendors' rights. This review ran nothing.
About this entry
The description was reviewed against primary sources. This does not establish runtime testing, security auditing or verified compatibility.
Primary sources
- README.md GitHub · onekey-sec/ubi_reader · Revision 5f45e50
- pyproject.toml GitHub · onekey-sec/ubi_reader · Revision 5f45e50
- LICENSE GitHub · onekey-sec/ubi_reader · Revision 5f45e50
- ubireader/scripts/ubireader_extract_files.py GitHub · onekey-sec/ubi_reader · Revision 5f45e50
- ubireader/ubifs/decrypt.py GitHub · onekey-sec/ubi_reader · Revision 5f45e50
- tests/test_ubifs_output.py GitHub · onekey-sec/ubi_reader · Revision 5f45e50
- .github/workflows/tests.yml GitHub · onekey-sec/ubi_reader · Revision 5f45e50
- https://github.com/onekey-sec/ubi_reader/releases/tag/0.8.16
- https://pypi.org/project/ubi-reader/0.8.16/
- pyproject.toml GitHub · onekey-sec/unblob · Revision 0f40c3c
More in Firmware and hardware
- payload-dumper-go · Tool
- mithril · Tool
- img4tool · Tool
- ThinkPad IMX471: recovering camera tuning for Linux · Case study
- MXQ PRO RK3229: an Android firmware investigation and Linux repurposing · Case study
- iCSee LocalMod: a stock-firmware camera control extension · Case study