ipsw-parser 1.9.1__tar.gz → 1.9.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ipsw_parser-1.9.1 → ipsw_parser-1.9.2}/.github/workflows/python-app.yml +7 -0
- {ipsw_parser-1.9.1 → ipsw_parser-1.9.2}/PKG-INFO +1 -1
- {ipsw_parser-1.9.1 → ipsw_parser-1.9.2}/ipsw_parser/_version.py +3 -3
- {ipsw_parser-1.9.1 → ipsw_parser-1.9.2}/ipsw_parser/dsc.py +10 -6
- {ipsw_parser-1.9.1 → ipsw_parser-1.9.2}/ipsw_parser.egg-info/PKG-INFO +1 -1
- ipsw_parser-1.9.2/ipsw_parser.egg-info/scm_version.json +8 -0
- {ipsw_parser-1.9.1 → ipsw_parser-1.9.2}/tests/test_dsc.py +29 -3
- ipsw_parser-1.9.1/ipsw_parser.egg-info/scm_version.json +0 -8
- {ipsw_parser-1.9.1 → ipsw_parser-1.9.2}/.gitattributes +0 -0
- {ipsw_parser-1.9.1 → ipsw_parser-1.9.2}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {ipsw_parser-1.9.1 → ipsw_parser-1.9.2}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {ipsw_parser-1.9.1 → ipsw_parser-1.9.2}/.github/workflows/codeql.yml +0 -0
- {ipsw_parser-1.9.1 → ipsw_parser-1.9.2}/.github/workflows/python-publish.yml +0 -0
- {ipsw_parser-1.9.1 → ipsw_parser-1.9.2}/.gitignore +0 -0
- {ipsw_parser-1.9.1 → ipsw_parser-1.9.2}/.pre-commit-config.yaml +0 -0
- {ipsw_parser-1.9.1 → ipsw_parser-1.9.2}/CODE_OF_CONDUCT.md +0 -0
- {ipsw_parser-1.9.1 → ipsw_parser-1.9.2}/LICENSE +0 -0
- {ipsw_parser-1.9.1 → ipsw_parser-1.9.2}/README.md +0 -0
- {ipsw_parser-1.9.1 → ipsw_parser-1.9.2}/ipsw_parser/__init__.py +0 -0
- {ipsw_parser-1.9.1 → ipsw_parser-1.9.2}/ipsw_parser/__main__.py +0 -0
- {ipsw_parser-1.9.1 → ipsw_parser-1.9.2}/ipsw_parser/archive.py +0 -0
- {ipsw_parser-1.9.1 → ipsw_parser-1.9.2}/ipsw_parser/build_identity.py +0 -0
- {ipsw_parser-1.9.1 → ipsw_parser-1.9.2}/ipsw_parser/build_manifest.py +0 -0
- {ipsw_parser-1.9.1 → ipsw_parser-1.9.2}/ipsw_parser/component.py +0 -0
- {ipsw_parser-1.9.1 → ipsw_parser-1.9.2}/ipsw_parser/exceptions.py +0 -0
- {ipsw_parser-1.9.1 → ipsw_parser-1.9.2}/ipsw_parser/firmware.py +0 -0
- {ipsw_parser-1.9.1 → ipsw_parser-1.9.2}/ipsw_parser/ipsw.py +0 -0
- {ipsw_parser-1.9.1 → ipsw_parser-1.9.2}/ipsw_parser/process.py +0 -0
- {ipsw_parser-1.9.1 → ipsw_parser-1.9.2}/ipsw_parser/py.typed +0 -0
- {ipsw_parser-1.9.1 → ipsw_parser-1.9.2}/ipsw_parser.egg-info/SOURCES.txt +0 -0
- {ipsw_parser-1.9.1 → ipsw_parser-1.9.2}/ipsw_parser.egg-info/dependency_links.txt +0 -0
- {ipsw_parser-1.9.1 → ipsw_parser-1.9.2}/ipsw_parser.egg-info/entry_points.txt +0 -0
- {ipsw_parser-1.9.1 → ipsw_parser-1.9.2}/ipsw_parser.egg-info/requires.txt +0 -0
- {ipsw_parser-1.9.1 → ipsw_parser-1.9.2}/ipsw_parser.egg-info/scm_file_list.json +0 -0
- {ipsw_parser-1.9.1 → ipsw_parser-1.9.2}/ipsw_parser.egg-info/top_level.txt +0 -0
- {ipsw_parser-1.9.1 → ipsw_parser-1.9.2}/pyproject.toml +0 -0
- {ipsw_parser-1.9.1 → ipsw_parser-1.9.2}/pytest.ini +0 -0
- {ipsw_parser-1.9.1 → ipsw_parser-1.9.2}/requirements.txt +0 -0
- {ipsw_parser-1.9.1 → ipsw_parser-1.9.2}/setup.cfg +0 -0
- {ipsw_parser-1.9.1 → ipsw_parser-1.9.2}/tests/test_archive_backends.py +0 -0
- {ipsw_parser-1.9.1 → ipsw_parser-1.9.2}/tests/test_firmware.py +0 -0
- {ipsw_parser-1.9.1 → ipsw_parser-1.9.2}/tests/test_kernelcache.py +0 -0
- {ipsw_parser-1.9.1 → ipsw_parser-1.9.2}/tests/test_process.py +0 -0
- {ipsw_parser-1.9.1 → ipsw_parser-1.9.2}/tests/test_sandbox_profiles.py +0 -0
|
@@ -15,6 +15,13 @@ jobs:
|
|
|
15
15
|
matrix:
|
|
16
16
|
python-version: [ "3.9", "3.10", "3.11", "3.12", "3.13", "3.14" ]
|
|
17
17
|
os: [ ubuntu-latest, macos-latest, windows-latest ]
|
|
18
|
+
# ubuntu-latest (26.04) has no prebuilt Python 3.9; keep covering it on 24.04.
|
|
19
|
+
exclude:
|
|
20
|
+
- python-version: "3.9"
|
|
21
|
+
os: ubuntu-latest
|
|
22
|
+
include:
|
|
23
|
+
- python-version: "3.9"
|
|
24
|
+
os: ubuntu-24.04
|
|
18
25
|
|
|
19
26
|
steps:
|
|
20
27
|
- uses: actions/checkout@v2
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '1.9.
|
|
22
|
-
__version_tuple__ = version_tuple = (1, 9,
|
|
21
|
+
__version__ = version = '1.9.2'
|
|
22
|
+
__version_tuple__ = version_tuple = (1, 9, 2)
|
|
23
23
|
|
|
24
|
-
__commit_id__ = commit_id = '
|
|
24
|
+
__commit_id__ = commit_id = 'ge54c7c84d'
|
|
@@ -14,7 +14,15 @@ DSC_DIRECTORIES = (
|
|
|
14
14
|
# Some devices report the cryptex through its /System/Cryptexes/OS symlink instead
|
|
15
15
|
"System/Cryptexes/OS/System/Library/Caches/com.apple.dyld",
|
|
16
16
|
)
|
|
17
|
-
|
|
17
|
+
# The main cache file is the one with no extension: its subcaches and symbols are named after it
|
|
18
|
+
# (`.01`, `.25.dylddata`, `.symbols`...). Its own name varies beyond the architecture, e.g.
|
|
19
|
+
# `dyld_shared_cache_arm64e_x1`.
|
|
20
|
+
DSC_NAME_PATTERN = "dyld_shared_cache_*"
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def find_dsc(directory: Path) -> list[Path]:
|
|
24
|
+
"""Return the main dyld shared cache files which are directly under ``directory``."""
|
|
25
|
+
return sorted(file for file in directory.glob(DSC_NAME_PATTERN) if "." not in file.name and file.is_file())
|
|
18
26
|
|
|
19
27
|
|
|
20
28
|
def split_dsc(root: Path) -> list[Path]:
|
|
@@ -29,11 +37,7 @@ def split_dsc(root: Path) -> list[Path]:
|
|
|
29
37
|
"""
|
|
30
38
|
split: list[Path] = []
|
|
31
39
|
for directory in DSC_DIRECTORIES:
|
|
32
|
-
for
|
|
33
|
-
dsc = root / directory / name
|
|
34
|
-
if not dsc.exists():
|
|
35
|
-
continue
|
|
36
|
-
|
|
40
|
+
for dsc in find_dsc(root / directory):
|
|
37
41
|
logger.info(f"splitting DSC: {dsc}")
|
|
38
42
|
try:
|
|
39
43
|
run("ipsw", "dyld", "split", dsc, "-o", root)
|
|
@@ -8,11 +8,13 @@ from ipsw_parser.process import ProcessExecutionError
|
|
|
8
8
|
CRYPTEX_SYMLINK_DSC = "System/Cryptexes/OS/System/Library/Caches/com.apple.dyld/dyld_shared_cache_arm64e"
|
|
9
9
|
CRYPTEX_DSC = "private/preboot/Cryptexes/OS/System/Library/Caches/com.apple.dyld/dyld_shared_cache_arm64e"
|
|
10
10
|
SYSTEM_DSC = "System/Library/Caches/com.apple.dyld/dyld_shared_cache_arm64e"
|
|
11
|
+
SUFFIXED_DSC = "System/Cryptexes/OS/System/Library/Caches/com.apple.dyld/dyld_shared_cache_arm64e_x1"
|
|
12
|
+
SUBCACHE_EXTENSIONS = (".01", ".25.dylddata", ".26.dyldreadonly", ".79.dyldlinkedit", ".symbols")
|
|
11
13
|
|
|
12
14
|
|
|
13
15
|
def _create(root: Path, path: str) -> Path:
|
|
14
16
|
file = root / path
|
|
15
|
-
file.parent.mkdir(parents=True)
|
|
17
|
+
file.parent.mkdir(parents=True, exist_ok=True)
|
|
16
18
|
file.write_bytes(b"dsc")
|
|
17
19
|
return file
|
|
18
20
|
|
|
@@ -29,7 +31,7 @@ def commands(monkeypatch: pytest.MonkeyPatch) -> list[tuple[str, ...]]:
|
|
|
29
31
|
return commands
|
|
30
32
|
|
|
31
33
|
|
|
32
|
-
@pytest.mark.parametrize("path", [SYSTEM_DSC, CRYPTEX_DSC, CRYPTEX_SYMLINK_DSC])
|
|
34
|
+
@pytest.mark.parametrize("path", [SYSTEM_DSC, CRYPTEX_DSC, CRYPTEX_SYMLINK_DSC, SUFFIXED_DSC])
|
|
33
35
|
def test_split_dsc_finds_the_cache(tmp_path: Path, commands: list[tuple[str, ...]], path: str) -> None:
|
|
34
36
|
cache = _create(tmp_path, path)
|
|
35
37
|
|
|
@@ -37,6 +39,30 @@ def test_split_dsc_finds_the_cache(tmp_path: Path, commands: list[tuple[str, ...
|
|
|
37
39
|
assert commands == [("ipsw", "dyld", "split", str(cache), "-o", str(tmp_path))]
|
|
38
40
|
|
|
39
41
|
|
|
42
|
+
@pytest.mark.parametrize("path", [SYSTEM_DSC, SUFFIXED_DSC])
|
|
43
|
+
def test_split_dsc_splits_only_the_main_cache_file(tmp_path: Path, commands: list[tuple[str, ...]], path: str) -> None:
|
|
44
|
+
cache = _create(tmp_path, path)
|
|
45
|
+
for extension in SUBCACHE_EXTENSIONS:
|
|
46
|
+
_create(tmp_path, path + extension)
|
|
47
|
+
|
|
48
|
+
assert dsc.split_dsc(tmp_path) == [cache]
|
|
49
|
+
assert commands == [("ipsw", "dyld", "split", str(cache), "-o", str(tmp_path))]
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def test_split_dsc_splits_every_architecture(tmp_path: Path, commands: list[tuple[str, ...]]) -> None:
|
|
53
|
+
caches = [_create(tmp_path, SYSTEM_DSC[:-1]), _create(tmp_path, SYSTEM_DSC)]
|
|
54
|
+
|
|
55
|
+
assert dsc.split_dsc(tmp_path) == caches
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def test_split_dsc_ignores_subcaches_without_their_main_cache(tmp_path: Path, commands: list[tuple[str, ...]]) -> None:
|
|
59
|
+
for extension in SUBCACHE_EXTENSIONS:
|
|
60
|
+
_create(tmp_path, SUFFIXED_DSC + extension)
|
|
61
|
+
|
|
62
|
+
assert dsc.split_dsc(tmp_path) == []
|
|
63
|
+
assert commands == []
|
|
64
|
+
|
|
65
|
+
|
|
40
66
|
def test_split_dsc_extracts_a_cache_the_splitter_refuses(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> None:
|
|
41
67
|
cache = _create(tmp_path, CRYPTEX_DSC)
|
|
42
68
|
commands: list[tuple[str, ...]] = []
|
|
@@ -56,7 +82,7 @@ def test_split_dsc_extracts_a_cache_the_splitter_refuses(tmp_path: Path, monkeyp
|
|
|
56
82
|
]
|
|
57
83
|
|
|
58
84
|
|
|
59
|
-
@pytest.mark.parametrize("path", [CRYPTEX_DSC, CRYPTEX_SYMLINK_DSC])
|
|
85
|
+
@pytest.mark.parametrize("path", [CRYPTEX_DSC, CRYPTEX_SYMLINK_DSC, SUFFIXED_DSC])
|
|
60
86
|
def test_device_support_layout_removes_the_split_cryptex_cache(
|
|
61
87
|
tmp_path: Path, monkeypatch: pytest.MonkeyPatch, commands: list[tuple[str, ...]], path: str
|
|
62
88
|
) -> None:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|