{
  "added_at": "2026-11-03",
  "additional_evidence_urls": [
    "https://github.com/onekey-sec/ubi_reader/blob/5f45e50c813599d689b8cf88e12e7c79dec1728f/pyproject.toml",
    "https://github.com/onekey-sec/ubi_reader/blob/5f45e50c813599d689b8cf88e12e7c79dec1728f/LICENSE",
    "https://github.com/onekey-sec/ubi_reader/blob/5f45e50c813599d689b8cf88e12e7c79dec1728f/ubireader/scripts/ubireader_extract_files.py",
    "https://github.com/onekey-sec/ubi_reader/blob/5f45e50c813599d689b8cf88e12e7c79dec1728f/ubireader/ubifs/decrypt.py",
    "https://github.com/onekey-sec/ubi_reader/blob/5f45e50c813599d689b8cf88e12e7c79dec1728f/tests/test_ubifs_output.py",
    "https://github.com/onekey-sec/ubi_reader/blob/5f45e50c813599d689b8cf88e12e7c79dec1728f/.github/workflows/tests.yml",
    "https://github.com/onekey-sec/ubi_reader/releases/tag/0.8.16",
    "https://pypi.org/project/ubi-reader/0.8.16/",
    "https://github.com/onekey-sec/unblob/blob/0f40c3c6940fa2bcfd2945f519fe8caf99e31e44/pyproject.toml"
  ],
  "category": "firmware",
  "description_en": "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.",
  "description_zh": "读取 UBI 和 UBIFS 镜像的 Python 模块与命令行脚本，通过定位文件中首个 UBI 或 UBIFS 数据来处理镜像，也适用于原始 NAND 转储。它们可提取文件或完整的 UBI、UBIFS 镜像，列出并复制单个文件，显示 UBI 头部、卷表以及 UBIFS 的超级节点和主节点，并能在提取失败时按条件搜索物理擦除块进行调试。ubireader_utils_info 还能推算出 mtd-utils 参数，生成按相同规格重建镜像所需的 shell 脚本和配置文件。",
  "entry_url": "https://awesomerea.org/resources/ubi-reader/",
  "entry_url_zh": "https://awesomerea.org/zh/resources/ubi-reader/",
  "evidence_url": "https://github.com/onekey-sec/ubi_reader/blob/5f45e50c813599d689b8cf88e12e7c79dec1728f/README.md",
  "group": "tools",
  "id": "ubi-reader",
  "json_url": "https://awesomerea.org/resources/ubi-reader/record.json",
  "kind": "tool",
  "markdown_url": "https://awesomerea.org/resources/ubi-reader/index.md",
  "markdown_url_zh": "https://awesomerea.org/zh/resources/ubi-reader/index.md",
  "name": "UBI Reader",
  "name_zh": "UBI Reader UBI/UBIFS 镜像读取工具",
  "record_type": "resource",
  "relationship": "foundation",
  "requirements": [
    "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."
  ],
  "requirements_zh": [
    "审阅对象为 main 分支提交 5f45e50（2026-09-13）。最新版本为 0.8.16，于 2026-09-04 发布在 GitHub，并以 ubi-reader 包名发布到 PyPI；pyproject 列出的作者为 ONEKEY 和 Jason Pruitt，所审阅的 unblob main 提交依赖 ubi-reader>=0.8.15。README 提到的独立 testing 分支提供修复工具和用于损坏镜像的参数覆盖功能，最后更新于 2018 年。",
    "需要 Python 3.10+，可从 PyPI 安装，或用 Poetry 从源码安装；依赖包括用于 LZO 的 lzallright、zstandard 和 cryptography。提取时创建特殊文件需要 root 权限，套接字文件默认跳过，除非修改 settings.py。采用 fscrypt v1 策略加密的文件只有在用户提供主密钥时才会被解密。",
    "输入为用户自行提供的 UBI 或 UBIFS 镜像或 NAND 转储。仓库没有提交任何固件或闪存镜像；唯一的测试检查提取文件名时防止路径穿越的保护逻辑，CI 在 Python 3.10 上用 pytest 运行该测试。",
    "README 列出的已知问题：不会重放日志，因此无法恢复未提交的数据；视 NAND 的转储方式而定，数据位可能未经纠错。自动推测失败时可手动指定偏移以及 PEB 或 LEB 大小。采用 GPL-3.0（LICENSE；pyproject 写作 GNU GPL）；提取出的固件内容仍归各厂商所有。"
  ],
  "targets": [
    "firmware"
  ],
  "url": "https://github.com/onekey-sec/ubi_reader",
  "verification": "source-reviewed",
  "verified_at": "2026-10-27"
}
