pymobiledevice3 4.14.6__py3-none-any.whl → 7.0.6__py3-none-any.whl
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.
- misc/plist_sniffer.py +15 -15
- misc/remotexpc_sniffer.py +29 -28
- misc/understanding_idevice_protocol_layers.md +15 -10
- pymobiledevice3/__main__.py +317 -127
- pymobiledevice3/_version.py +22 -4
- pymobiledevice3/bonjour.py +358 -113
- pymobiledevice3/ca.py +253 -16
- pymobiledevice3/cli/activation.py +31 -23
- pymobiledevice3/cli/afc.py +49 -40
- pymobiledevice3/cli/amfi.py +16 -21
- pymobiledevice3/cli/apps.py +87 -42
- pymobiledevice3/cli/backup.py +160 -90
- pymobiledevice3/cli/bonjour.py +44 -40
- pymobiledevice3/cli/cli_common.py +204 -198
- pymobiledevice3/cli/companion_proxy.py +14 -14
- pymobiledevice3/cli/crash.py +105 -56
- pymobiledevice3/cli/developer/__init__.py +62 -0
- pymobiledevice3/cli/developer/accessibility/__init__.py +65 -0
- pymobiledevice3/cli/developer/accessibility/settings.py +43 -0
- pymobiledevice3/cli/developer/arbitration.py +50 -0
- pymobiledevice3/cli/developer/condition.py +33 -0
- pymobiledevice3/cli/developer/core_device.py +294 -0
- pymobiledevice3/cli/developer/debugserver.py +244 -0
- pymobiledevice3/cli/developer/dvt/__init__.py +438 -0
- pymobiledevice3/cli/developer/dvt/core_profile_session.py +295 -0
- pymobiledevice3/cli/developer/dvt/simulate_location.py +56 -0
- pymobiledevice3/cli/developer/dvt/sysmon/__init__.py +69 -0
- pymobiledevice3/cli/developer/dvt/sysmon/process.py +188 -0
- pymobiledevice3/cli/developer/fetch_symbols.py +108 -0
- pymobiledevice3/cli/developer/simulate_location.py +51 -0
- pymobiledevice3/cli/diagnostics/__init__.py +75 -0
- pymobiledevice3/cli/diagnostics/battery.py +47 -0
- pymobiledevice3/cli/idam.py +42 -0
- pymobiledevice3/cli/lockdown.py +108 -103
- pymobiledevice3/cli/mounter.py +158 -99
- pymobiledevice3/cli/notification.py +38 -26
- pymobiledevice3/cli/pcap.py +45 -24
- pymobiledevice3/cli/power_assertion.py +18 -17
- pymobiledevice3/cli/processes.py +17 -23
- pymobiledevice3/cli/profile.py +165 -109
- pymobiledevice3/cli/provision.py +35 -34
- pymobiledevice3/cli/remote.py +217 -129
- pymobiledevice3/cli/restore.py +159 -143
- pymobiledevice3/cli/springboard.py +63 -53
- pymobiledevice3/cli/syslog.py +193 -86
- pymobiledevice3/cli/usbmux.py +73 -33
- pymobiledevice3/cli/version.py +5 -7
- pymobiledevice3/cli/webinspector.py +376 -214
- pymobiledevice3/common.py +3 -1
- pymobiledevice3/exceptions.py +182 -58
- pymobiledevice3/irecv.py +52 -53
- pymobiledevice3/irecv_devices.py +1489 -464
- pymobiledevice3/lockdown.py +473 -275
- pymobiledevice3/lockdown_service_provider.py +15 -8
- pymobiledevice3/osu/os_utils.py +27 -9
- pymobiledevice3/osu/posix_util.py +34 -15
- pymobiledevice3/osu/win_util.py +14 -8
- pymobiledevice3/pair_records.py +102 -21
- pymobiledevice3/remote/common.py +8 -4
- pymobiledevice3/remote/core_device/app_service.py +94 -67
- pymobiledevice3/remote/core_device/core_device_service.py +17 -14
- pymobiledevice3/remote/core_device/device_info.py +5 -5
- pymobiledevice3/remote/core_device/diagnostics_service.py +19 -4
- pymobiledevice3/remote/core_device/file_service.py +53 -23
- pymobiledevice3/remote/remote_service_discovery.py +79 -45
- pymobiledevice3/remote/remotexpc.py +73 -44
- pymobiledevice3/remote/tunnel_service.py +442 -317
- pymobiledevice3/remote/utils.py +14 -13
- pymobiledevice3/remote/xpc_message.py +145 -125
- pymobiledevice3/resources/dsc_uuid_map.py +19 -19
- pymobiledevice3/resources/firmware_notifications.py +20 -16
- pymobiledevice3/resources/notifications.txt +144 -0
- pymobiledevice3/restore/asr.py +27 -27
- pymobiledevice3/restore/base_restore.py +110 -21
- pymobiledevice3/restore/consts.py +87 -66
- pymobiledevice3/restore/device.py +59 -12
- pymobiledevice3/restore/fdr.py +46 -48
- pymobiledevice3/restore/ftab.py +19 -19
- pymobiledevice3/restore/img4.py +163 -0
- pymobiledevice3/restore/mbn.py +587 -0
- pymobiledevice3/restore/recovery.py +151 -151
- pymobiledevice3/restore/restore.py +562 -544
- pymobiledevice3/restore/restore_options.py +131 -110
- pymobiledevice3/restore/restored_client.py +51 -31
- pymobiledevice3/restore/tss.py +385 -267
- pymobiledevice3/service_connection.py +252 -59
- pymobiledevice3/services/accessibilityaudit.py +202 -120
- pymobiledevice3/services/afc.py +962 -365
- pymobiledevice3/services/amfi.py +24 -30
- pymobiledevice3/services/companion.py +23 -19
- pymobiledevice3/services/crash_reports.py +71 -47
- pymobiledevice3/services/debugserver_applist.py +3 -3
- pymobiledevice3/services/device_arbitration.py +8 -8
- pymobiledevice3/services/device_link.py +101 -79
- pymobiledevice3/services/diagnostics.py +973 -967
- pymobiledevice3/services/dtfetchsymbols.py +8 -8
- pymobiledevice3/services/dvt/dvt_secure_socket_proxy.py +4 -4
- pymobiledevice3/services/dvt/dvt_testmanaged_proxy.py +4 -4
- pymobiledevice3/services/dvt/instruments/activity_trace_tap.py +85 -74
- pymobiledevice3/services/dvt/instruments/application_listing.py +2 -3
- pymobiledevice3/services/dvt/instruments/condition_inducer.py +7 -6
- pymobiledevice3/services/dvt/instruments/core_profile_session_tap.py +466 -384
- pymobiledevice3/services/dvt/instruments/device_info.py +20 -11
- pymobiledevice3/services/dvt/instruments/energy_monitor.py +1 -1
- pymobiledevice3/services/dvt/instruments/graphics.py +1 -1
- pymobiledevice3/services/dvt/instruments/location_simulation.py +1 -1
- pymobiledevice3/services/dvt/instruments/location_simulation_base.py +10 -10
- pymobiledevice3/services/dvt/instruments/network_monitor.py +17 -17
- pymobiledevice3/services/dvt/instruments/notifications.py +1 -1
- pymobiledevice3/services/dvt/instruments/process_control.py +35 -10
- pymobiledevice3/services/dvt/instruments/screenshot.py +2 -2
- pymobiledevice3/services/dvt/instruments/sysmontap.py +15 -15
- pymobiledevice3/services/dvt/testmanaged/xcuitest.py +42 -52
- pymobiledevice3/services/file_relay.py +10 -10
- pymobiledevice3/services/heartbeat.py +9 -8
- pymobiledevice3/services/house_arrest.py +16 -15
- pymobiledevice3/services/idam.py +20 -0
- pymobiledevice3/services/installation_proxy.py +173 -81
- pymobiledevice3/services/lockdown_service.py +20 -10
- pymobiledevice3/services/misagent.py +22 -19
- pymobiledevice3/services/mobile_activation.py +147 -64
- pymobiledevice3/services/mobile_config.py +331 -294
- pymobiledevice3/services/mobile_image_mounter.py +141 -113
- pymobiledevice3/services/mobilebackup2.py +203 -145
- pymobiledevice3/services/notification_proxy.py +11 -11
- pymobiledevice3/services/os_trace.py +134 -74
- pymobiledevice3/services/pcapd.py +314 -302
- pymobiledevice3/services/power_assertion.py +10 -9
- pymobiledevice3/services/preboard.py +4 -4
- pymobiledevice3/services/remote_fetch_symbols.py +21 -14
- pymobiledevice3/services/remote_server.py +176 -146
- pymobiledevice3/services/restore_service.py +16 -16
- pymobiledevice3/services/screenshot.py +15 -12
- pymobiledevice3/services/simulate_location.py +7 -7
- pymobiledevice3/services/springboard.py +15 -15
- pymobiledevice3/services/syslog.py +5 -5
- pymobiledevice3/services/web_protocol/alert.py +11 -11
- pymobiledevice3/services/web_protocol/automation_session.py +251 -239
- pymobiledevice3/services/web_protocol/cdp_screencast.py +46 -37
- pymobiledevice3/services/web_protocol/cdp_server.py +19 -19
- pymobiledevice3/services/web_protocol/cdp_target.py +411 -373
- pymobiledevice3/services/web_protocol/driver.py +114 -111
- pymobiledevice3/services/web_protocol/element.py +124 -111
- pymobiledevice3/services/web_protocol/inspector_session.py +106 -102
- pymobiledevice3/services/web_protocol/selenium_api.py +49 -49
- pymobiledevice3/services/web_protocol/session_protocol.py +18 -12
- pymobiledevice3/services/web_protocol/switch_to.py +30 -27
- pymobiledevice3/services/webinspector.py +189 -155
- pymobiledevice3/tcp_forwarder.py +87 -69
- pymobiledevice3/tunneld/__init__.py +0 -0
- pymobiledevice3/tunneld/api.py +63 -0
- pymobiledevice3/tunneld/server.py +603 -0
- pymobiledevice3/usbmux.py +198 -147
- pymobiledevice3/utils.py +14 -11
- {pymobiledevice3-4.14.6.dist-info → pymobiledevice3-7.0.6.dist-info}/METADATA +55 -28
- pymobiledevice3-7.0.6.dist-info/RECORD +188 -0
- {pymobiledevice3-4.14.6.dist-info → pymobiledevice3-7.0.6.dist-info}/WHEEL +1 -1
- pymobiledevice3/cli/developer.py +0 -1215
- pymobiledevice3/cli/diagnostics.py +0 -99
- pymobiledevice3/tunneld.py +0 -524
- pymobiledevice3-4.14.6.dist-info/RECORD +0 -168
- {pymobiledevice3-4.14.6.dist-info → pymobiledevice3-7.0.6.dist-info}/entry_points.txt +0 -0
- {pymobiledevice3-4.14.6.dist-info → pymobiledevice3-7.0.6.dist-info/licenses}/LICENSE +0 -0
- {pymobiledevice3-4.14.6.dist-info → pymobiledevice3-7.0.6.dist-info}/top_level.txt +0 -0
pymobiledevice3/common.py
CHANGED
|
@@ -2,9 +2,11 @@ from pathlib import Path
|
|
|
2
2
|
|
|
3
3
|
from pymobiledevice3.osu.os_utils import get_os_utils
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
_OS_UTILS = get_os_utils()
|
|
6
|
+
_HOMEFOLDER = _OS_UTILS.get_homedir() / ".pymobiledevice3"
|
|
6
7
|
|
|
7
8
|
|
|
8
9
|
def get_home_folder() -> Path:
|
|
9
10
|
_HOMEFOLDER.mkdir(exist_ok=True, parents=True)
|
|
11
|
+
_OS_UTILS.chown_to_non_sudo_if_needed(_HOMEFOLDER)
|
|
10
12
|
return _HOMEFOLDER
|
pymobiledevice3/exceptions.py
CHANGED
|
@@ -1,20 +1,74 @@
|
|
|
1
1
|
__all__ = [
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
2
|
+
"AccessDeniedError",
|
|
3
|
+
"AfcException",
|
|
4
|
+
"AfcFileNotFoundError",
|
|
5
|
+
"AlreadyMountedError",
|
|
6
|
+
"AmfiError",
|
|
7
|
+
"ArbitrationError",
|
|
8
|
+
"ArgumentError",
|
|
9
|
+
"BadCommandError",
|
|
10
|
+
"BadDevError",
|
|
11
|
+
"CannotStopSessionError",
|
|
12
|
+
"CloudConfigurationAlreadyPresentError",
|
|
13
|
+
"ConnectionFailedError",
|
|
14
|
+
"ConnectionFailedToUsbmuxdError",
|
|
15
|
+
"ConnectionTerminatedError",
|
|
16
|
+
"CoreDeviceError",
|
|
17
|
+
"DeprecationError",
|
|
18
|
+
"DeveloperModeError",
|
|
19
|
+
"DeveloperModeIsNotEnabledError",
|
|
20
|
+
"DeviceAlreadyInUseError",
|
|
21
|
+
"DeviceHasPasscodeSetError",
|
|
22
|
+
"DeviceNotFoundError",
|
|
23
|
+
"DeviceVersionNotSupportedError",
|
|
24
|
+
"DisableMemoryLimitError",
|
|
25
|
+
"DvtDirListError",
|
|
26
|
+
"DvtException",
|
|
27
|
+
"ExtractingStackshotError",
|
|
28
|
+
"FatalPairingError",
|
|
29
|
+
"FeatureNotSupportedError",
|
|
30
|
+
"GetProhibitedError",
|
|
31
|
+
"IRecvError",
|
|
32
|
+
"IRecvNoDeviceConnectedError",
|
|
33
|
+
"IncorrectModeError",
|
|
34
|
+
"InspectorEvaluateError",
|
|
35
|
+
"InternalError",
|
|
36
|
+
"InvalidConnectionError",
|
|
37
|
+
"InvalidHostIDError",
|
|
38
|
+
"InvalidServiceError",
|
|
39
|
+
"LaunchingApplicationError",
|
|
40
|
+
"LockdownError",
|
|
41
|
+
"MessageNotSupportedError",
|
|
42
|
+
"MissingValueError",
|
|
43
|
+
"MuxException",
|
|
44
|
+
"MuxVersionError",
|
|
45
|
+
"NoDeviceConnectedError",
|
|
46
|
+
"NotEnoughDiskSpaceError",
|
|
47
|
+
"NotMountedError",
|
|
48
|
+
"NotPairedError",
|
|
49
|
+
"NotTrustedError",
|
|
50
|
+
"NotificationTimeoutError",
|
|
51
|
+
"OSNotSupportedError",
|
|
52
|
+
"PairingDialogResponsePendingError",
|
|
53
|
+
"PairingError",
|
|
54
|
+
"PasscodeRequiredError",
|
|
55
|
+
"PasswordRequiredError",
|
|
56
|
+
"ProfileError",
|
|
57
|
+
"PyMobileDevice3Exception",
|
|
58
|
+
"QuicProtocolNotSupportedError",
|
|
59
|
+
"RSDRequiredError",
|
|
60
|
+
"RemoteAutomationNotEnabledError",
|
|
61
|
+
"RemotePairingCompletedError",
|
|
62
|
+
"SetProhibitedError",
|
|
63
|
+
"StartServiceError",
|
|
64
|
+
"SysdiagnoseTimeoutError",
|
|
65
|
+
"TSSError",
|
|
66
|
+
"TunneldConnectionError",
|
|
67
|
+
"UnrecognizedSelectorError",
|
|
68
|
+
"UnsupportedCommandError",
|
|
69
|
+
"UserDeniedPairingError",
|
|
70
|
+
"WebInspectorNotEnabledError",
|
|
71
|
+
"WirError",
|
|
18
72
|
]
|
|
19
73
|
|
|
20
74
|
from typing import Optional
|
|
@@ -53,7 +107,10 @@ class PasswordRequiredError(PairingError):
|
|
|
53
107
|
|
|
54
108
|
|
|
55
109
|
class StartServiceError(PyMobileDevice3Exception):
|
|
56
|
-
|
|
110
|
+
def __init__(self, service_name: str, message: str) -> None:
|
|
111
|
+
super().__init__()
|
|
112
|
+
self.service_name = service_name
|
|
113
|
+
self.message = message
|
|
57
114
|
|
|
58
115
|
|
|
59
116
|
class FatalPairingError(PyMobileDevice3Exception):
|
|
@@ -109,9 +166,10 @@ class ArgumentError(PyMobileDevice3Exception):
|
|
|
109
166
|
|
|
110
167
|
|
|
111
168
|
class AfcException(PyMobileDevice3Exception, OSError):
|
|
112
|
-
def __init__(self, message, status):
|
|
169
|
+
def __init__(self, message: str, status: str, filename: Optional[str] = None) -> None:
|
|
113
170
|
OSError.__init__(self, status, message)
|
|
114
171
|
self.status = status
|
|
172
|
+
self.filename = filename
|
|
115
173
|
|
|
116
174
|
|
|
117
175
|
class AfcFileNotFoundError(AfcException):
|
|
@@ -119,113 +177,131 @@ class AfcFileNotFoundError(AfcException):
|
|
|
119
177
|
|
|
120
178
|
|
|
121
179
|
class DvtException(PyMobileDevice3Exception):
|
|
122
|
-
"""
|
|
180
|
+
"""Domain exception for DVT operations."""
|
|
181
|
+
|
|
123
182
|
pass
|
|
124
183
|
|
|
125
184
|
|
|
126
185
|
class UnrecognizedSelectorError(DvtException):
|
|
127
|
-
"""
|
|
186
|
+
"""Attempted to call an unrecognized selector from DVT."""
|
|
187
|
+
|
|
128
188
|
pass
|
|
129
189
|
|
|
130
190
|
|
|
131
191
|
class DvtDirListError(DvtException):
|
|
132
|
-
"""
|
|
192
|
+
"""Raise when directory listing fails."""
|
|
193
|
+
|
|
133
194
|
pass
|
|
134
195
|
|
|
135
196
|
|
|
136
197
|
class NotMountedError(PyMobileDevice3Exception):
|
|
137
|
-
"""
|
|
198
|
+
"""Given image for umount wasn't mounted in the first place"""
|
|
199
|
+
|
|
138
200
|
pass
|
|
139
201
|
|
|
140
202
|
|
|
141
203
|
class AlreadyMountedError(PyMobileDevice3Exception):
|
|
142
|
-
"""
|
|
204
|
+
"""Given image for mount has already been mounted in the first place"""
|
|
205
|
+
|
|
143
206
|
pass
|
|
144
207
|
|
|
145
208
|
|
|
146
209
|
class MissingManifestError(PyMobileDevice3Exception):
|
|
147
|
-
"""
|
|
210
|
+
"""No manifest could be found"""
|
|
211
|
+
|
|
148
212
|
pass
|
|
149
213
|
|
|
150
214
|
|
|
151
215
|
class UnsupportedCommandError(PyMobileDevice3Exception):
|
|
152
|
-
"""
|
|
216
|
+
"""Given command isn't supported for this iOS version"""
|
|
217
|
+
|
|
153
218
|
pass
|
|
154
219
|
|
|
155
220
|
|
|
156
221
|
class ExtractingStackshotError(PyMobileDevice3Exception):
|
|
157
|
-
"""
|
|
222
|
+
"""Raise when stackshot is not received in the core profile session."""
|
|
223
|
+
|
|
158
224
|
pass
|
|
159
225
|
|
|
160
226
|
|
|
161
227
|
class ConnectionTerminatedError(PyMobileDevice3Exception):
|
|
162
|
-
"""
|
|
228
|
+
"""Raise when a connection is terminated abruptly."""
|
|
229
|
+
|
|
163
230
|
pass
|
|
164
231
|
|
|
165
232
|
|
|
166
233
|
class StreamClosedError(ConnectionTerminatedError):
|
|
167
|
-
"""
|
|
234
|
+
"""Raise when trying to send a message on a closed stream."""
|
|
235
|
+
|
|
168
236
|
pass
|
|
169
237
|
|
|
170
238
|
|
|
171
239
|
class WebInspectorNotEnabledError(PyMobileDevice3Exception):
|
|
172
|
-
"""
|
|
240
|
+
"""Raise when Web Inspector is not enabled."""
|
|
241
|
+
|
|
173
242
|
pass
|
|
174
243
|
|
|
175
244
|
|
|
176
245
|
class RemoteAutomationNotEnabledError(PyMobileDevice3Exception):
|
|
177
|
-
"""
|
|
246
|
+
"""Raise when Web Inspector remote automation is not enabled."""
|
|
247
|
+
|
|
178
248
|
pass
|
|
179
249
|
|
|
180
250
|
|
|
181
251
|
class WirError(PyMobileDevice3Exception):
|
|
182
|
-
"""
|
|
252
|
+
"""Raise when Webinspector WIR command fails."""
|
|
253
|
+
|
|
183
254
|
pass
|
|
184
255
|
|
|
185
256
|
|
|
186
257
|
class InternalError(PyMobileDevice3Exception):
|
|
187
|
-
"""
|
|
258
|
+
"""Some internal Apple error"""
|
|
259
|
+
|
|
188
260
|
pass
|
|
189
261
|
|
|
190
262
|
|
|
191
263
|
class ArbitrationError(PyMobileDevice3Exception):
|
|
192
|
-
"""
|
|
264
|
+
"""Arbitration failed"""
|
|
265
|
+
|
|
193
266
|
pass
|
|
194
267
|
|
|
195
268
|
|
|
196
269
|
class DeviceAlreadyInUseError(ArbitrationError):
|
|
197
|
-
"""
|
|
270
|
+
"""Device is already checked-in by someone"""
|
|
198
271
|
|
|
199
272
|
@property
|
|
200
273
|
def message(self):
|
|
201
|
-
return self.args[0].get(
|
|
274
|
+
return self.args[0].get("message")
|
|
202
275
|
|
|
203
276
|
@property
|
|
204
277
|
def owner(self):
|
|
205
|
-
return self.args[0].get(
|
|
278
|
+
return self.args[0].get("owner")
|
|
206
279
|
|
|
207
280
|
@property
|
|
208
281
|
def result(self):
|
|
209
|
-
return self.args[0].get(
|
|
282
|
+
return self.args[0].get("result")
|
|
210
283
|
|
|
211
284
|
|
|
212
285
|
class DeveloperModeIsNotEnabledError(PyMobileDevice3Exception):
|
|
213
|
-
"""
|
|
286
|
+
"""Raise when mounting failed because developer mode is not enabled."""
|
|
287
|
+
|
|
214
288
|
pass
|
|
215
289
|
|
|
216
290
|
|
|
217
291
|
class DeveloperDiskImageNotFoundError(PyMobileDevice3Exception):
|
|
218
|
-
"""
|
|
292
|
+
"""Failed to locate the correct DeveloperDiskImage.dmg"""
|
|
293
|
+
|
|
219
294
|
pass
|
|
220
295
|
|
|
221
296
|
|
|
222
297
|
class DeveloperModeError(PyMobileDevice3Exception):
|
|
223
|
-
"""
|
|
298
|
+
"""Raise when amfid failed to enable developer mode."""
|
|
299
|
+
|
|
224
300
|
pass
|
|
225
301
|
|
|
226
302
|
|
|
227
303
|
class LockdownError(PyMobileDevice3Exception):
|
|
228
|
-
"""
|
|
304
|
+
"""lockdown general error"""
|
|
229
305
|
|
|
230
306
|
def __init__(self, message: str, identifier: Optional[str] = None) -> None:
|
|
231
307
|
super().__init__(message)
|
|
@@ -241,7 +317,8 @@ class SetProhibitedError(LockdownError):
|
|
|
241
317
|
|
|
242
318
|
|
|
243
319
|
class PairingDialogResponsePendingError(PairingError):
|
|
244
|
-
"""
|
|
320
|
+
"""User hasn't yet confirmed the device is trusted"""
|
|
321
|
+
|
|
245
322
|
pass
|
|
246
323
|
|
|
247
324
|
|
|
@@ -254,7 +331,8 @@ class InvalidHostIDError(PairingError):
|
|
|
254
331
|
|
|
255
332
|
|
|
256
333
|
class MissingValueError(LockdownError):
|
|
257
|
-
"""
|
|
334
|
+
"""raised when attempting to query non-existent domain/key"""
|
|
335
|
+
|
|
258
336
|
pass
|
|
259
337
|
|
|
260
338
|
|
|
@@ -263,7 +341,8 @@ class InvalidConnectionError(LockdownError):
|
|
|
263
341
|
|
|
264
342
|
|
|
265
343
|
class PasscodeRequiredError(LockdownError):
|
|
266
|
-
"""
|
|
344
|
+
"""passcode must be present for this action"""
|
|
345
|
+
|
|
267
346
|
pass
|
|
268
347
|
|
|
269
348
|
|
|
@@ -304,8 +383,14 @@ class InvalidServiceError(LockdownError):
|
|
|
304
383
|
|
|
305
384
|
|
|
306
385
|
class InspectorEvaluateError(PyMobileDevice3Exception):
|
|
307
|
-
def __init__(
|
|
308
|
-
|
|
386
|
+
def __init__(
|
|
387
|
+
self,
|
|
388
|
+
class_name: str,
|
|
389
|
+
message: str,
|
|
390
|
+
line: Optional[int] = None,
|
|
391
|
+
column: Optional[int] = None,
|
|
392
|
+
stack: Optional[list[str]] = None,
|
|
393
|
+
):
|
|
309
394
|
super().__init__()
|
|
310
395
|
self.class_name = class_name
|
|
311
396
|
self.message = message
|
|
@@ -314,10 +399,8 @@ class InspectorEvaluateError(PyMobileDevice3Exception):
|
|
|
314
399
|
self.stack = stack
|
|
315
400
|
|
|
316
401
|
def __str__(self) -> str:
|
|
317
|
-
stack_trace =
|
|
318
|
-
return
|
|
319
|
-
f'Line: {self.line} Column: {self.column}\n'
|
|
320
|
-
f'Stack: {stack_trace}')
|
|
402
|
+
stack_trace = "\n".join([f"\t - {frame}" for frame in self.stack])
|
|
403
|
+
return f"{self.class_name}: {self.message}.\nLine: {self.line} Column: {self.column}\nStack: {stack_trace}"
|
|
321
404
|
|
|
322
405
|
|
|
323
406
|
class LaunchingApplicationError(PyMobileDevice3Exception):
|
|
@@ -337,7 +420,8 @@ class CoreDeviceError(PyMobileDevice3Exception):
|
|
|
337
420
|
|
|
338
421
|
|
|
339
422
|
class AccessDeniedError(PyMobileDevice3Exception):
|
|
340
|
-
"""
|
|
423
|
+
"""Need extra permissions to execute this command"""
|
|
424
|
+
|
|
341
425
|
pass
|
|
342
426
|
|
|
343
427
|
|
|
@@ -346,22 +430,25 @@ class NoSuchBuildIdentityError(PyMobileDevice3Exception):
|
|
|
346
430
|
|
|
347
431
|
|
|
348
432
|
class MobileActivationException(PyMobileDevice3Exception):
|
|
349
|
-
"""
|
|
433
|
+
"""Mobile activation can not be done"""
|
|
434
|
+
|
|
350
435
|
pass
|
|
351
436
|
|
|
352
437
|
|
|
353
438
|
class NotEnoughDiskSpaceError(PyMobileDevice3Exception):
|
|
354
|
-
"""
|
|
439
|
+
"""Computer does not have enough disk space for the intended operation"""
|
|
440
|
+
|
|
355
441
|
pass
|
|
356
442
|
|
|
357
443
|
|
|
358
444
|
class DeprecationError(PyMobileDevice3Exception):
|
|
359
|
-
"""
|
|
445
|
+
"""The requested action/service/method is deprecated"""
|
|
446
|
+
|
|
360
447
|
pass
|
|
361
448
|
|
|
362
449
|
|
|
363
450
|
class RSDRequiredError(PyMobileDevice3Exception):
|
|
364
|
-
"""
|
|
451
|
+
"""The requested action requires an RSD object"""
|
|
365
452
|
|
|
366
453
|
def __init__(self, identifier: str) -> None:
|
|
367
454
|
self.identifier = identifier
|
|
@@ -369,7 +456,8 @@ class RSDRequiredError(PyMobileDevice3Exception):
|
|
|
369
456
|
|
|
370
457
|
|
|
371
458
|
class SysdiagnoseTimeoutError(PyMobileDevice3Exception, TimeoutError):
|
|
372
|
-
"""
|
|
459
|
+
"""Timeout collecting new sysdiagnose archive"""
|
|
460
|
+
|
|
373
461
|
pass
|
|
374
462
|
|
|
375
463
|
|
|
@@ -380,13 +468,49 @@ class SupportError(PyMobileDevice3Exception):
|
|
|
380
468
|
|
|
381
469
|
|
|
382
470
|
class OSNotSupportedError(SupportError):
|
|
383
|
-
"""
|
|
471
|
+
"""Operating system is not supported."""
|
|
472
|
+
|
|
384
473
|
pass
|
|
385
474
|
|
|
386
475
|
|
|
387
476
|
class FeatureNotSupportedError(SupportError):
|
|
388
|
-
"""
|
|
477
|
+
"""Feature has not been implemented for OS."""
|
|
389
478
|
|
|
390
479
|
def __init__(self, os_name, feature):
|
|
391
480
|
super().__init__(os_name)
|
|
392
481
|
self.feature = feature
|
|
482
|
+
|
|
483
|
+
|
|
484
|
+
class QuicProtocolNotSupportedError(PyMobileDevice3Exception):
|
|
485
|
+
"""QUIC tunnel support was removed on iOS 18.2+"""
|
|
486
|
+
|
|
487
|
+
pass
|
|
488
|
+
|
|
489
|
+
|
|
490
|
+
class RemotePairingCompletedError(PyMobileDevice3Exception):
|
|
491
|
+
"""
|
|
492
|
+
Raised upon pairing completion using the `remotepairingdeviced` service (RemoteXPC).
|
|
493
|
+
|
|
494
|
+
remotepairingdeviced closes connection after pairing, so client must re-establish it after pairing is
|
|
495
|
+
completed.
|
|
496
|
+
"""
|
|
497
|
+
|
|
498
|
+
pass
|
|
499
|
+
|
|
500
|
+
|
|
501
|
+
class DisableMemoryLimitError(PyMobileDevice3Exception):
|
|
502
|
+
"""Disabling memory limit fails."""
|
|
503
|
+
|
|
504
|
+
pass
|
|
505
|
+
|
|
506
|
+
|
|
507
|
+
class ProtocolError(PyMobileDevice3Exception):
|
|
508
|
+
"""An unexpected protocol message was received"""
|
|
509
|
+
|
|
510
|
+
pass
|
|
511
|
+
|
|
512
|
+
|
|
513
|
+
class TSSError(PyMobileDevice3Exception):
|
|
514
|
+
"""An unexpected message was received from apple ticket server"""
|
|
515
|
+
|
|
516
|
+
pass
|