ipsw-parser 1.3.9__tar.gz → 1.4.1__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.3.9 → ipsw_parser-1.4.1}/PKG-INFO +2 -2
- {ipsw_parser-1.3.9 → ipsw_parser-1.4.1}/ipsw_parser/_version.py +9 -4
- {ipsw_parser-1.3.9 → ipsw_parser-1.4.1}/ipsw_parser/build_identity.py +0 -36
- {ipsw_parser-1.3.9 → ipsw_parser-1.4.1}/ipsw_parser/build_manifest.py +2 -0
- {ipsw_parser-1.3.9 → ipsw_parser-1.4.1}/ipsw_parser/component.py +0 -9
- {ipsw_parser-1.3.9 → ipsw_parser-1.4.1}/ipsw_parser.egg-info/PKG-INFO +2 -2
- {ipsw_parser-1.3.9 → ipsw_parser-1.4.1}/ipsw_parser.egg-info/SOURCES.txt +0 -1
- ipsw_parser-1.3.9/ipsw_parser/img4.py +0 -138
- {ipsw_parser-1.3.9 → ipsw_parser-1.4.1}/.gitattributes +0 -0
- {ipsw_parser-1.3.9 → ipsw_parser-1.4.1}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {ipsw_parser-1.3.9 → ipsw_parser-1.4.1}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {ipsw_parser-1.3.9 → ipsw_parser-1.4.1}/.github/workflows/codeql.yml +0 -0
- {ipsw_parser-1.3.9 → ipsw_parser-1.4.1}/.github/workflows/python-app.yml +0 -0
- {ipsw_parser-1.3.9 → ipsw_parser-1.4.1}/.github/workflows/python-publish.yml +0 -0
- {ipsw_parser-1.3.9 → ipsw_parser-1.4.1}/.gitignore +0 -0
- {ipsw_parser-1.3.9 → ipsw_parser-1.4.1}/.pre-commit-config.yaml +0 -0
- {ipsw_parser-1.3.9 → ipsw_parser-1.4.1}/CODE_OF_CONDUCT.md +0 -0
- {ipsw_parser-1.3.9 → ipsw_parser-1.4.1}/LICENSE +0 -0
- {ipsw_parser-1.3.9 → ipsw_parser-1.4.1}/README.md +0 -0
- {ipsw_parser-1.3.9 → ipsw_parser-1.4.1}/ipsw_parser/__init__.py +0 -0
- {ipsw_parser-1.3.9 → ipsw_parser-1.4.1}/ipsw_parser/__main__.py +0 -0
- {ipsw_parser-1.3.9 → ipsw_parser-1.4.1}/ipsw_parser/exceptions.py +0 -0
- {ipsw_parser-1.3.9 → ipsw_parser-1.4.1}/ipsw_parser/firmware.py +0 -0
- {ipsw_parser-1.3.9 → ipsw_parser-1.4.1}/ipsw_parser/ipsw.py +0 -0
- {ipsw_parser-1.3.9 → ipsw_parser-1.4.1}/ipsw_parser.egg-info/dependency_links.txt +0 -0
- {ipsw_parser-1.3.9 → ipsw_parser-1.4.1}/ipsw_parser.egg-info/entry_points.txt +0 -0
- {ipsw_parser-1.3.9 → ipsw_parser-1.4.1}/ipsw_parser.egg-info/requires.txt +0 -0
- {ipsw_parser-1.3.9 → ipsw_parser-1.4.1}/ipsw_parser.egg-info/top_level.txt +0 -0
- {ipsw_parser-1.3.9 → ipsw_parser-1.4.1}/pyproject.toml +0 -0
- {ipsw_parser-1.3.9 → ipsw_parser-1.4.1}/pytest.ini +0 -0
- {ipsw_parser-1.3.9 → ipsw_parser-1.4.1}/requirements.txt +0 -0
- {ipsw_parser-1.3.9 → ipsw_parser-1.4.1}/setup.cfg +0 -0
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
# file generated by
|
|
1
|
+
# file generated by setuptools-scm
|
|
2
2
|
# don't change, don't track in version control
|
|
3
|
+
|
|
4
|
+
__all__ = ["__version__", "__version_tuple__", "version", "version_tuple"]
|
|
5
|
+
|
|
3
6
|
TYPE_CHECKING = False
|
|
4
7
|
if TYPE_CHECKING:
|
|
5
|
-
from typing import Tuple
|
|
8
|
+
from typing import Tuple
|
|
9
|
+
from typing import Union
|
|
10
|
+
|
|
6
11
|
VERSION_TUPLE = Tuple[Union[int, str], ...]
|
|
7
12
|
else:
|
|
8
13
|
VERSION_TUPLE = object
|
|
@@ -12,5 +17,5 @@ __version__: str
|
|
|
12
17
|
__version_tuple__: VERSION_TUPLE
|
|
13
18
|
version_tuple: VERSION_TUPLE
|
|
14
19
|
|
|
15
|
-
__version__ = version = '1.
|
|
16
|
-
__version_tuple__ = version_tuple = (1,
|
|
20
|
+
__version__ = version = '1.4.1'
|
|
21
|
+
__version_tuple__ = version_tuple = (1, 4, 1)
|
|
@@ -110,42 +110,6 @@ class BuildIdentity(UserDict):
|
|
|
110
110
|
def get_component(self, name: str, **args) -> Component:
|
|
111
111
|
return Component(self, name, **args)
|
|
112
112
|
|
|
113
|
-
def populate_tss_request_parameters(self, parameters: dict, additional_keys: Optional[list[str]] = None) -> None:
|
|
114
|
-
""" equivalent to idevicerestore:tss_parameters_add_from_manifest """
|
|
115
|
-
key_list = ['ApBoardID', 'ApChipID']
|
|
116
|
-
if additional_keys is None:
|
|
117
|
-
key_list += ['UniqueBuildID', 'Ap,OSLongVersion', 'Ap,OSReleaseType', 'Ap,ProductType', 'Ap,SDKPlatform',
|
|
118
|
-
'Ap,SikaFuse', 'Ap,Target', 'Ap,TargetType', 'ApBoardID', 'ApChipID',
|
|
119
|
-
'ApSecurityDomain', 'BMU,BoardID', 'BMU,ChipID', 'BbChipID', 'BbProvisioningManifestKeyHash',
|
|
120
|
-
'BbActivationManifestKeyHash', 'BbCalibrationManifestKeyHash', 'Ap,ProductMarketingVersion',
|
|
121
|
-
'BbFactoryActivationManifestKeyHash', 'BbFDRSecurityKeyHash', 'BbSkeyId', 'SE,ChipID',
|
|
122
|
-
'Savage,ChipID', 'Savage,PatchEpoch', 'Yonkers,BoardID', 'Yonkers,ChipID',
|
|
123
|
-
'Yonkers,PatchEpoch', 'Rap,BoardID', 'Rap,ChipID', 'Rap,SecurityDomain', 'Baobab,BoardID',
|
|
124
|
-
'Baobab,ChipID', 'Baobab,ManifestEpoch', 'Baobab,SecurityDomain', 'eUICC,ChipID',
|
|
125
|
-
'PearlCertificationRootPub', 'Timer,BoardID,1', 'Timer,BoardID,2', 'Timer,ChipID,1',
|
|
126
|
-
'Timer,ChipID,2', 'Timer,SecurityDomain,1', 'Timer,SecurityDomain,2', 'Manifest',
|
|
127
|
-
]
|
|
128
|
-
else:
|
|
129
|
-
key_list += additional_keys
|
|
130
|
-
|
|
131
|
-
for k in key_list:
|
|
132
|
-
try:
|
|
133
|
-
v = self[k]
|
|
134
|
-
if isinstance(v, str) and v.startswith('0x'):
|
|
135
|
-
v = int(v, 16)
|
|
136
|
-
parameters[k] = v
|
|
137
|
-
except KeyError:
|
|
138
|
-
pass
|
|
139
|
-
|
|
140
|
-
if additional_keys is None:
|
|
141
|
-
# special treat for RequiresUIDMode
|
|
142
|
-
info = self.get('Info')
|
|
143
|
-
if info is None:
|
|
144
|
-
return
|
|
145
|
-
requires_uid_mode = info.get('RequiresUIDMode')
|
|
146
|
-
if requires_uid_mode is not None:
|
|
147
|
-
parameters['RequiresUIDMode'] = requires_uid_mode
|
|
148
|
-
|
|
149
113
|
def extract_dsc(self, output: Path, pem_db: Optional[str] = None) -> None:
|
|
150
114
|
build_identity = self.build_manifest.build_identities[0]
|
|
151
115
|
if not build_identity.has_component('Cryptex1,SystemOS'):
|
|
@@ -4,7 +4,6 @@ import os.path
|
|
|
4
4
|
from cached_property import cached_property
|
|
5
5
|
|
|
6
6
|
from ipsw_parser.exceptions import IpswException
|
|
7
|
-
from ipsw_parser.img4 import stitch_component
|
|
8
7
|
|
|
9
8
|
|
|
10
9
|
class TSSResponse(dict):
|
|
@@ -64,11 +63,3 @@ class Component:
|
|
|
64
63
|
self.logger.debug(f'Extracting {os.path.basename(self.path)} ({self.path})')
|
|
65
64
|
return self.build_identity.build_manifest.ipsw.read(self.path)
|
|
66
65
|
return self._data
|
|
67
|
-
|
|
68
|
-
@cached_property
|
|
69
|
-
def personalized_data(self):
|
|
70
|
-
if self._tss is None:
|
|
71
|
-
raise IpswException(f'TSS ticket must be supplied for personalizing component: {self.name}')
|
|
72
|
-
|
|
73
|
-
# stitch ApImg4Ticket into IMG4 file
|
|
74
|
-
return stitch_component(self.name, self.data, self._tss)
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import logging
|
|
2
|
-
|
|
3
|
-
import pyimg4
|
|
4
|
-
from pyimg4 import IM4P
|
|
5
|
-
|
|
6
|
-
logger = logging.getLogger(__name__)
|
|
7
|
-
|
|
8
|
-
COMPONENT_FOURCC = {
|
|
9
|
-
'ACIBT': 'acib',
|
|
10
|
-
'ACIBTLPEM': 'lpbt',
|
|
11
|
-
'ACIWIFI': 'aciw',
|
|
12
|
-
'ANE': 'anef',
|
|
13
|
-
'ANS': 'ansf',
|
|
14
|
-
'AOP': 'aopf',
|
|
15
|
-
'AVE': 'avef',
|
|
16
|
-
'Alamo': 'almo',
|
|
17
|
-
'Ap,ANE1': 'ane1',
|
|
18
|
-
'Ap,ANE2': 'ane2',
|
|
19
|
-
'Ap,ANE3': 'ane3',
|
|
20
|
-
'Ap,AudioAccessibilityBootChime': 'auac',
|
|
21
|
-
'Ap,AudioBootChime': 'aubt',
|
|
22
|
-
'Ap,AudioPowerAttachChime': 'aupr',
|
|
23
|
-
'Ap,BootabilityBrainTrustCache': 'trbb',
|
|
24
|
-
'Ap,CIO': 'ciof',
|
|
25
|
-
'Ap,HapticAssets': 'hpas',
|
|
26
|
-
'Ap,LocalBoot': 'lobo',
|
|
27
|
-
'Ap,LocalPolicy': 'lpol',
|
|
28
|
-
'Ap,NextStageIM4MHash': 'nsih',
|
|
29
|
-
'Ap,RecoveryOSPolicyNonceHash': 'ronh',
|
|
30
|
-
'Ap,RestoreANE1': 'ran1',
|
|
31
|
-
'Ap,RestoreANE2': 'ran2',
|
|
32
|
-
'Ap,RestoreANE3': 'ran3',
|
|
33
|
-
'Ap,RestoreCIO': 'rcio',
|
|
34
|
-
'Ap,RestoreTMU': 'rtmu',
|
|
35
|
-
'Ap,Scorpius': 'scpf',
|
|
36
|
-
'Ap,SystemVolumeCanonicalMetadata': 'msys',
|
|
37
|
-
'Ap,TMU': 'tmuf',
|
|
38
|
-
'Ap,VolumeUUID': 'vuid',
|
|
39
|
-
'Ap,rOSLogo1': 'rlg1',
|
|
40
|
-
'Ap,rOSLogo2': 'rlg2',
|
|
41
|
-
'AppleLogo': 'logo',
|
|
42
|
-
'AudioCodecFirmware': 'acfw',
|
|
43
|
-
'BatteryCharging': 'glyC',
|
|
44
|
-
'BatteryCharging0': 'chg0',
|
|
45
|
-
'BatteryCharging1': 'chg1',
|
|
46
|
-
'BatteryFull': 'batF',
|
|
47
|
-
'BatteryLow0': 'bat0',
|
|
48
|
-
'BatteryLow1': 'bat1',
|
|
49
|
-
'BatteryPlugin': 'glyP',
|
|
50
|
-
'CFELoader': 'cfel',
|
|
51
|
-
'CrownFirmware': 'crwn',
|
|
52
|
-
'DCP': 'dcpf',
|
|
53
|
-
'Dali': 'dali',
|
|
54
|
-
'DeviceTree': 'dtre',
|
|
55
|
-
'Diags': 'diag',
|
|
56
|
-
'EngineeringTrustCache': 'dtrs',
|
|
57
|
-
'ExtDCP': 'edcp',
|
|
58
|
-
'GFX': 'gfxf',
|
|
59
|
-
'Hamm': 'hamf',
|
|
60
|
-
'Homer': 'homr',
|
|
61
|
-
'ISP': 'ispf',
|
|
62
|
-
'InputDevice': 'ipdf',
|
|
63
|
-
'KernelCache': 'krnl',
|
|
64
|
-
'LLB': 'illb',
|
|
65
|
-
'LeapHaptics': 'lphp',
|
|
66
|
-
'Liquid': 'liqd',
|
|
67
|
-
'LoadableTrustCache': 'ltrs',
|
|
68
|
-
'LowPowerWallet0': 'lpw0',
|
|
69
|
-
'LowPowerWallet1': 'lpw1',
|
|
70
|
-
'LowPowerWallet2': 'lpw2',
|
|
71
|
-
'MacEFI': 'mefi',
|
|
72
|
-
'MtpFirmware': 'mtpf',
|
|
73
|
-
'Multitouch': 'mtfw',
|
|
74
|
-
'NeedService': 'nsrv',
|
|
75
|
-
'OS': 'OS\0\0',
|
|
76
|
-
'OSRamdisk': 'osrd',
|
|
77
|
-
'PEHammer': 'hmmr',
|
|
78
|
-
'PERTOS': 'pert',
|
|
79
|
-
'PHLEET': 'phlt',
|
|
80
|
-
'PMP': 'pmpf',
|
|
81
|
-
'PersonalizedDMG': 'pdmg',
|
|
82
|
-
'RBM': 'rmbt',
|
|
83
|
-
'RTP': 'rtpf',
|
|
84
|
-
'Rap,SoftwareBinaryDsp1': 'sbd1',
|
|
85
|
-
'Rap,RTKitOS': 'rkos',
|
|
86
|
-
'Rap,RestoreRTKitOS': 'rrko',
|
|
87
|
-
'RecoveryMode': 'recm',
|
|
88
|
-
'RestoreANS': 'rans',
|
|
89
|
-
'RestoreDCP': 'rdcp',
|
|
90
|
-
'RestoreDeviceTree': 'rdtr',
|
|
91
|
-
'RestoreExtDCP': 'recp',
|
|
92
|
-
'RestoreKernelCache': 'rkrn',
|
|
93
|
-
'RestoreLogo': 'rlgo',
|
|
94
|
-
'RestoreRTP': 'rrtp',
|
|
95
|
-
'RestoreRamDisk': 'rdsk',
|
|
96
|
-
'RestoreSEP': 'rsep',
|
|
97
|
-
'RestoreTrustCache': 'rtsc',
|
|
98
|
-
'SCE': 'scef',
|
|
99
|
-
'SCE1Firmware': 'sc1f',
|
|
100
|
-
'SEP': 'sepi',
|
|
101
|
-
'SIO': 'siof',
|
|
102
|
-
'StaticTrustCache': 'trst',
|
|
103
|
-
'SystemLocker': 'lckr',
|
|
104
|
-
'SystemVolume': 'isys',
|
|
105
|
-
'WCHFirmwareUpdater': 'wchf',
|
|
106
|
-
'ftap': 'ftap',
|
|
107
|
-
'ftsp': 'ftsp',
|
|
108
|
-
'iBEC': 'ibec',
|
|
109
|
-
'iBSS': 'ibss',
|
|
110
|
-
'iBoot': 'ibot',
|
|
111
|
-
'iBootData': 'ibdt',
|
|
112
|
-
'iBootDataStage1': 'ibd1',
|
|
113
|
-
'iBootTest': 'itst',
|
|
114
|
-
'rfta': 'rfta',
|
|
115
|
-
'rfts': 'rfts',
|
|
116
|
-
'Ap,DCP2': 'dcp2',
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
def stitch_component(name: str, im4p_data: bytes, tss):
|
|
121
|
-
logger.info(f'Personalizing IMG4 component {name}...')
|
|
122
|
-
|
|
123
|
-
im4p = IM4P(data=im4p_data)
|
|
124
|
-
|
|
125
|
-
# patch fourcc
|
|
126
|
-
fourcc = COMPONENT_FOURCC.get(name)
|
|
127
|
-
if fourcc is not None:
|
|
128
|
-
im4p.fourcc = fourcc
|
|
129
|
-
|
|
130
|
-
# hack if we have a *-TBM entry for the give
|
|
131
|
-
tbm_dict = tss.get(f'{name}-TBM')
|
|
132
|
-
|
|
133
|
-
im4r = None
|
|
134
|
-
if tbm_dict is not None:
|
|
135
|
-
im4r = pyimg4.IM4R()
|
|
136
|
-
for key in tbm_dict.keys():
|
|
137
|
-
im4r.add_property(pyimg4.RestoreProperty(fourcc=key, value=tbm_dict[key]))
|
|
138
|
-
return pyimg4.IMG4(im4p=im4p, im4m=tss.ap_img4_ticket, im4r=im4r).output()
|
|
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
|