--- id: pyimg4 version: "0.8.8" 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) license_treatment: permissive maintenance: active --- # pyimg4 — A Python library/CLI tool for parsing Apple's Image4 format. License: permissive · Maintenance: active · Downloads: 331.2K/mo ## 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 above — 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 pip install pyimg4 uv add pyimg4 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_current - Install friction: low - Maintenance: active - Downloads: 331.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags apple image4 parser, img4 format tool, ios firmware parsing, image4 manifest extraction, img4 cli tool, iboot image parsing, apple firmware analysis, firmware-analysis, apple-ecosystem, binary-format [View on SkillFed](https://skillfed.io/packages/pyimg4) · [View on PyPI](https://pypi.org/project/pyimg4/)