skillfed

pyimg4

A Python library/CLI tool for parsing Apple's Image4 format.

pyimg4 v0.8.8 331.2K downloads/30d#7,520 on PyPI67
Permissive license MIT License Copyright (c) 2025 m1sta Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the… (full text in the JSON record) Active released

What it is and what it does

PyIMG4 is a Python library and CLI tool for reading and working with Apple's Image4 binary format, which is used in iOS firmware and related Apple systems. It exposes four main command groups (im4m for manifests, im4p for payloads, im4r for restore info, and img4 for full Image4 files) and handles compression transparently—using apple-compress on macOS and lzfse elsewhere, with an override environment variable available if needed.

The package targets developers and researchers working with Apple firmware analysis. It requires Python 3.9 or later and depends on pycryptodome, asn1, lzfse, apple-compress, pylzss, and click. The library is in Beta status but has been actively maintained since its first release, with no known security vulnerabilities.

Use it for:

  • Extract and inspect Image4 manifest metadata from Apple firmware files for reverse engineering.
  • Decompress and parse Image4 payloads to analyze firmware components programmatically.
  • Automate Image4 format validation in firmware analysis pipelines.
  • Retrieve restore info from Image4 files for device compatibility research.
  • Build custom tools that read or transform Apple firmware using the library API.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

PyIMG4 parses Apple's Image4 format through a Python library and CLI tool, supporting manifest, payload, and restore info operations with platform-aware compression.

Yes, if you work with Apple firmware analysis or Image4 format manipulation. Low install friction, active maintenance, MIT license, no known vulnerabilities, and a focused feature set make it a straightforward choice. Not relevant for general Python development—install only if you have a specific need to parse or work with Image4 files.

Install

pyimg4 on PyPI

pip

pip install pyimg4

uv

uv add pyimg4

poetry

poetry add pyimg4

Installing pyimg4

Before you install

Low install friction with a pure-wheel distribution. Actively maintained as of 2026-08-10 with 67 repository stars. Six runtime dependencies including cryptographic and compression libraries are all available on PyPI.

License in practice

MIT License permits unrestricted use, modification, and distribution with only attribution and liability disclaimer required—suitable for both open-source and commercial projects.

Quickstart

pip install pyimg4
python3 -c "from pyimg4 import img4; help(img4)"

Requires Python 3.9 or later. LZFSE compression uses apple-compress on macOS and lzfse on other platforms; set PYIMG4_FORCE_LZFSE environment variable to override platform selection if needed.

Verify before relying

  • Whether the package handles all current Apple firmware versions and edge cases.
  • Performance characteristics when processing large or complex Image4 files.
  • Completeness of command coverage for all Image4 operations beyond the four main commands shown.

Package facts

License MIT License Copyright (c) 2025 m1sta Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the… (full text in the JSON record) (permissive)
Python support supports the current Python release (>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies 6 — apple-compress, asn1, click, lzfse, pycryptodome, pylzss
Maintenance actively maintained — 500 days since the last release
Last repo commit
First released
Downloads 331,214/month — #7,520 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pyimg4-0.8.8-py3-none-any.whl

Keywords: iboot, image4, img4, ios, jailbreak

Development Status :: 4 - BetaEnvironment :: ConsoleIntended Audience :: DevelopersIntended Audience :: Science/ResearchProgramming Language :: Python :: 3.9Topic :: Utilities

Tags

apple image4 parserimg4 format toolios firmware parsingimage4 manifest extractionimg4 cli tooliboot image parsingapple firmware analysis
firmware-analysisapple-ecosystembinary-format

More Utilities packages