pyimg4
A Python library/CLI tool for parsing Apple's Image4 format.
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 pyimg4uv
uv add pyimg4poetry
poetry add pyimg4Installing 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
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
developer-disk-imageFetches Apple's DeveloperDiskImage files…
copyleft · top 15,000 on PyPI
ipsw-parserParses and extracts data from iOS IPSW firmware…
copyleft · top 15,000 on PyPI
apple-compressPython bindings for Apple's libcompression…
unclear · top 15,000 on PyPI
la-panicParses iPhone crash reports (IPS files) to…
copyleft · top 15,000 on PyPI
pyaxmlparserParses Android APK files to extract metadata…
permissive · top 15,000 on PyPI
pymobiledevice3A pure Python library and command-line tool for…
copyleft · top 15,000 on PyPI
wallet-py3kGenerates Apple Wallet (.pkpass) files from…
unclear · top 15,000 on PyPI
pyiosbackupParses and decrypts iOS device backups,…
copyleft · top 15,000 on PyPI
pyapns-clientSends Apple Push Notifications to iOS, macOS,…
permissive · top 5,000 on PyPI
pycrashreportParses Apple crash reports (iOS, macOS) into a…
copyleft · top 15,000 on PyPI