Registry / data / ipsw-parser

ipsw-parser

JSON →
library1.6.0pypypi✓ verified 35d ago

ipsw-parser is a Python 3 utility for parsing and extracting data from Apple IPSW (iPhone Software) firmware files. It provides programmatic access to various components within an IPSW, such as kernelcaches, build manifests, and device class hashes (DSC). The library is actively maintained with frequent minor updates, currently at version 1.6.0.

datadevopsserialization
Install & Compatibility
Where this runs
tested against v1.7.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✓ —
✓ 4.8s
py 3.11
✓ —
✓ 4.95s
py 3.12
✓ —
✓ 4.55s
py 3.13
✕ build_error
✕ build_error
py 3.9
✓ —
✓ 5.4s
49MB installed
● package 49MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

from ipsw_parser.ipsw import IPSW
from ipsw_parser.exceptions import IPSWError

This quickstart demonstrates how to initialize the `IPSW` parser with a firmware file, retrieve basic information like the device class and build ID, and extract common components such as the kernelcache and device class hashes (DSC).

from ipsw_parser.ipsw import IPSW from ipsw_parser.exceptions import IPSWError import os # For demonstration, assume an IPSW file exists or is specified via environment variable. # Replace 'path/to/your/firmware.ipsw' with an actual path to an IPSW file. # You can often find these files on websites like ipsw.me ipsw_file_path = os.environ.get('IPSW_FILE_PATH', 'path/to/your/firmware.ipsw') if not os.path.exists(ipsw_file_path): print(f"Warning: IPSW file not found at '{ipsw_file_path}'. Please provide a valid path.") print("Skipping quickstart example as no IPSW file is available.") else: try: # Initialize the IPSW parser with the file path ipsw = IPSW(ipsw_file_path) print(f"Successfully loaded IPSW from: {ipsw.path}") # Access basic information print(f"Device Class: {ipsw.build_identity.device_class}") print(f"Build ID: {ipsw.build_identity.build_id}") # Example: Extract the kernelcache # This will extract to a default temporary location or specified directory kernel_path = ipsw.extract_kernelcache() print(f"Kernelcache extracted to: {kernel_path}") # Example: Extract the device class hashes (DSC) if available # Note: In v1.5.0+, dsc extraction logic was moved to a separate module. # This example uses the primary IPSW object method which wraps the new logic. dsc_path = ipsw.extract_dsc() if dsc_path: print(f"Device Class Hashes (DSC) extracted to: {dsc_path}") else: print("No DSC found or extracted.") except IPSWError as e: print(f"Error parsing IPSW file: {e}") except FileNotFoundError: print(f"Error: The specified IPSW file '{ipsw_file_path}' was not found.") except Exception as e: print(f"An unexpected error occurred: {e}")
ipsw-parser --version
Debug
Known footguns
breakingStarting with version 1.4.0, functionality previously included in `ipsw-parser` was moved into the `pymobiledevice3` library. If your code relied on specific functions or classes that are no longer present, you will encounter `AttributeError` or `ModuleNotFoundError`.
breakingSupport for Python 3.8 was officially removed in version 1.3.8. Attempting to use `ipsw-parser` on Python 3.8 or older will result in installation issues or runtime errors.
gotchaIn version 1.5.0, the internal logic for DSC (Device Class Hash) extraction was refactored and split into its own module. While the top-level `ipsw.extract_dsc()` method should remain stable, direct imports to internal DSC-related functions might require updates.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
19 hits · last 30 days
ahrefsbot
4
bytedance
3
dotbot
2
script
1
Resources