pymobiledevice3 4.21.10__py3-none-any.whl → 4.22.1__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.
Potentially problematic release.
This version of pymobiledevice3 might be problematic. Click here for more details.
- pymobiledevice3/_version.py +2 -2
- pymobiledevice3/cli/diagnostics.py +8 -2
- pymobiledevice3/service_connection.py +2 -2
- pymobiledevice3/services/mobile_image_mounter.py +7 -0
- {pymobiledevice3-4.21.10.dist-info → pymobiledevice3-4.22.1.dist-info}/METADATA +1 -1
- {pymobiledevice3-4.21.10.dist-info → pymobiledevice3-4.22.1.dist-info}/RECORD +10 -10
- {pymobiledevice3-4.21.10.dist-info → pymobiledevice3-4.22.1.dist-info}/WHEEL +0 -0
- {pymobiledevice3-4.21.10.dist-info → pymobiledevice3-4.22.1.dist-info}/entry_points.txt +0 -0
- {pymobiledevice3-4.21.10.dist-info → pymobiledevice3-4.22.1.dist-info}/licenses/LICENSE +0 -0
- {pymobiledevice3-4.21.10.dist-info → pymobiledevice3-4.22.1.dist-info}/top_level.txt +0 -0
pymobiledevice3/_version.py
CHANGED
|
@@ -4,7 +4,7 @@ import time
|
|
|
4
4
|
import click
|
|
5
5
|
|
|
6
6
|
from pymobiledevice3.cli.cli_common import Command, print_json
|
|
7
|
-
from pymobiledevice3.lockdown import LockdownClient
|
|
7
|
+
from pymobiledevice3.lockdown import LockdownClient, retry_create_using_usbmux
|
|
8
8
|
from pymobiledevice3.lockdown_service_provider import LockdownServiceProvider
|
|
9
9
|
from pymobiledevice3.services.diagnostics import DiagnosticsService
|
|
10
10
|
|
|
@@ -23,9 +23,15 @@ def diagnostics() -> None:
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
@diagnostics.command('restart', cls=Command)
|
|
26
|
-
|
|
26
|
+
@click.option('-r', '--reconnect', is_flag=True, default=False,
|
|
27
|
+
help='Wait until the device reconnects before finishing the operation.')
|
|
28
|
+
def diagnostics_restart(service_provider: LockdownClient, reconnect):
|
|
27
29
|
""" Restart device """
|
|
28
30
|
DiagnosticsService(lockdown=service_provider).restart()
|
|
31
|
+
if reconnect:
|
|
32
|
+
# Wait for the device to be available again
|
|
33
|
+
with retry_create_using_usbmux(None, serial=service_provider.udid):
|
|
34
|
+
print(f'Device Reconnected ({service_provider.udid}).')
|
|
29
35
|
|
|
30
36
|
|
|
31
37
|
@diagnostics.command('shutdown', cls=Command)
|
|
@@ -60,12 +60,12 @@ def parse_plist(payload: bytes) -> dict:
|
|
|
60
60
|
:param payload: The plist-formatted byte string to parse.
|
|
61
61
|
:return: The parsed dictionary.
|
|
62
62
|
:raises PyMobileDevice3Exception: If the payload is invalid.
|
|
63
|
-
:retries with a filtered payload if plistlib compains about "not well-formed (invalid token)"
|
|
63
|
+
:retries with a filtered payload of only valid XML characters if plistlib compains about "not well-formed (invalid token)"
|
|
64
64
|
"""
|
|
65
65
|
try:
|
|
66
66
|
return plistlib.loads(payload)
|
|
67
67
|
except xml.parsers.expat.ExpatError:
|
|
68
|
-
payload = bytes([b for b in payload if b
|
|
68
|
+
payload = bytes([b for b in payload if b >= 0x20 or b in (0x09, 0x0a, 0x0d)])
|
|
69
69
|
try:
|
|
70
70
|
return plistlib.loads(payload)
|
|
71
71
|
except plistlib.InvalidFileException:
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import hashlib
|
|
2
|
+
import logging
|
|
2
3
|
import plistlib
|
|
3
4
|
from pathlib import Path
|
|
4
5
|
from typing import Optional
|
|
@@ -15,6 +16,8 @@ from pymobiledevice3.lockdown_service_provider import LockdownServiceProvider
|
|
|
15
16
|
from pymobiledevice3.restore.tss import TSSRequest
|
|
16
17
|
from pymobiledevice3.services.lockdown_service import LockdownService
|
|
17
18
|
|
|
19
|
+
logger = logging.getLogger(__name__)
|
|
20
|
+
|
|
18
21
|
LATEST_DDI_BUILD_ID = '16E5121h'
|
|
19
22
|
|
|
20
23
|
|
|
@@ -355,6 +358,10 @@ async def auto_mount_personalized(lockdown: LockdownServiceProvider) -> None:
|
|
|
355
358
|
image.write_bytes(personalized_image.image)
|
|
356
359
|
build_manifest.write_bytes(personalized_image.build_manifest)
|
|
357
360
|
trustcache.write_bytes(personalized_image.trustcache)
|
|
361
|
+
downloaded_ddi_build_id = plistlib.loads(personalized_image.build_manifest).get('ProductBuildVersion')
|
|
362
|
+
if downloaded_ddi_build_id != LATEST_DDI_BUILD_ID:
|
|
363
|
+
logger.warning('Downloaded personalized image has unexpected ProductBuildVersion '
|
|
364
|
+
f'{downloaded_ddi_build_id}. Please update pymobiledevice3!')
|
|
358
365
|
|
|
359
366
|
await PersonalizedImageMounter(lockdown=lockdown).mount(image, build_manifest, trustcache)
|
|
360
367
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pymobiledevice3
|
|
3
|
-
Version: 4.
|
|
3
|
+
Version: 4.22.1
|
|
4
4
|
Summary: Pure python3 implementation for working with iDevices (iPhone, etc...)
|
|
5
5
|
Author-email: doronz88 <doron88@gmail.com>, matan <matan1008@gmail.com>
|
|
6
6
|
Maintainer-email: doronz88 <doron88@gmail.com>, matan <matan1008@gmail.com>
|
|
@@ -8,7 +8,7 @@ misc/understanding_idevice_protocol_layers.md,sha256=8tEqRXWOUPoxOJLZVh7C7H9JGCh
|
|
|
8
8
|
misc/usbmux_sniff.sh,sha256=iWtbucOEQ9_UEFXk9x-2VNt48Jg5zrPsnUbZ_LfZxwA,212
|
|
9
9
|
pymobiledevice3/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
10
|
pymobiledevice3/__main__.py,sha256=nwUgfXBMii2MSXLUls2uMTG88uC13s4haPBM4LuGcaU,11530
|
|
11
|
-
pymobiledevice3/_version.py,sha256=
|
|
11
|
+
pymobiledevice3/_version.py,sha256=SCBlFkpjZ96tcrOzsJReCr254lYbCqBh0gCXEu_s_eo,513
|
|
12
12
|
pymobiledevice3/bonjour.py,sha256=FXa_x0Zdo6ims7N7F61hnnZEyn1tc2it3mQpHRMY0Kk,5560
|
|
13
13
|
pymobiledevice3/ca.py,sha256=Ho0NaOtATe5hdruUSlVDRpfR9ltEYXjL3MoKwEvEJjw,2296
|
|
14
14
|
pymobiledevice3/common.py,sha256=-PG6oaUkNFlB3jb7E0finMrX8wqhkS-cuTAfmLvZUmc,329
|
|
@@ -18,7 +18,7 @@ pymobiledevice3/irecv_devices.py,sha256=lTImsqVhFg1UdTdW2jn6bJLh15Nzh-z8E0WJk55D
|
|
|
18
18
|
pymobiledevice3/lockdown.py,sha256=Skl3S8pCgEIWfU8XrYWxG0-uKN37-eWHg4tFTnYpGUg,38231
|
|
19
19
|
pymobiledevice3/lockdown_service_provider.py,sha256=l5N72tiuI-2uowk8wu6B7qkjY2UmqQsnhdJqvJy3I8A,1744
|
|
20
20
|
pymobiledevice3/pair_records.py,sha256=Tr28mlBWPXvOF7vdKBDOuw1rCRwm6RViDTGbikfP77I,6034
|
|
21
|
-
pymobiledevice3/service_connection.py,sha256=
|
|
21
|
+
pymobiledevice3/service_connection.py,sha256=yG_DOphuBvOxOfUOBdpsQwYJUmZh_L5Kiuodk-nGSmk,14449
|
|
22
22
|
pymobiledevice3/tcp_forwarder.py,sha256=I1arSMXuIcMpeP6POk4CDDT5BlrIFBtQ4NfljO4Fqy0,8765
|
|
23
23
|
pymobiledevice3/usbmux.py,sha256=CvJ_NgH77wcfF7ZAQuLGHTIYkuWvhXPYZNQNR7-Jf8A,16820
|
|
24
24
|
pymobiledevice3/utils.py,sha256=ybli_l8JIG2usFiToAsVYe0Ymg3q0bcpKqmYUF_wpi8,2179
|
|
@@ -34,7 +34,7 @@ pymobiledevice3/cli/companion_proxy.py,sha256=ey0X3moJ49zVJoNCpRMMHmf9fBZfdqimhz
|
|
|
34
34
|
pymobiledevice3/cli/completions.py,sha256=t8oryezQTcWDno_E2Cch7o1f-qURVL9M1Z4o6uLA_kM,1722
|
|
35
35
|
pymobiledevice3/cli/crash.py,sha256=m1vs0_KUy4cxu8vHYjn7olay8oPQGTFZqMCHspnGpVs,3181
|
|
36
36
|
pymobiledevice3/cli/developer.py,sha256=9ZAvy7nqX4vPjx-2peqjuhaeEK5iYHTmWgevcvglbXM,55075
|
|
37
|
-
pymobiledevice3/cli/diagnostics.py,sha256=
|
|
37
|
+
pymobiledevice3/cli/diagnostics.py,sha256=VDWr41ryIZcpuQp47nQSzCiSuIILExqGSrwFizXCIkI,3641
|
|
38
38
|
pymobiledevice3/cli/lockdown.py,sha256=498SgKdIC_YaoEjVtQQvo8bvv8GDeUTY8yWh4isy_qc,6941
|
|
39
39
|
pymobiledevice3/cli/mounter.py,sha256=AnNneNF_kW7XnBMe4V5cvlbLYd_mAP4tuB3PXLQpeiA,7724
|
|
40
40
|
pymobiledevice3/cli/notification.py,sha256=vqn8uPslr7A9HiZ4yrs7YKF2VLS7Nk4G7ab5ELljpVQ,1962
|
|
@@ -115,7 +115,7 @@ pymobiledevice3/services/lockdown_service.py,sha256=WP2l3qIdU7XtWDQMfNEPwSJZfS7D
|
|
|
115
115
|
pymobiledevice3/services/misagent.py,sha256=YGLo2LhzyYWyICxKDhy3Ph7SewYk5I1VN3-LjKv_plo,2088
|
|
116
116
|
pymobiledevice3/services/mobile_activation.py,sha256=NTxdiA39-XpN77OJAErVkGsxUZf_b1AOSd08URKu0MA,6139
|
|
117
117
|
pymobiledevice3/services/mobile_config.py,sha256=Ev1AmJ6pzeZKnwMaSKIwWAOWVMqH2QgDbjD49Jc_l20,17419
|
|
118
|
-
pymobiledevice3/services/mobile_image_mounter.py,sha256=
|
|
118
|
+
pymobiledevice3/services/mobile_image_mounter.py,sha256=_XjVGfhv7g9Ils5Q9AGi6i-lgakmDdN4e79UPdCZ4xA,15046
|
|
119
119
|
pymobiledevice3/services/mobilebackup2.py,sha256=1Wo4IpLG5HUfkGJustsv2SoTBBax30PZyKOtEOz5Eac,18217
|
|
120
120
|
pymobiledevice3/services/notification_proxy.py,sha256=VCOG8G0HNn8_tFKUdLs5BFkshQCtI_LNH-w4MuNF2MM,2109
|
|
121
121
|
pymobiledevice3/services/os_trace.py,sha256=Vi_KGWK8hsvk6eMNuv-ae-iEn3UlUk3SF_niC8yBEmU,6465
|
|
@@ -164,9 +164,9 @@ pymobiledevice3/services/web_protocol/switch_to.py,sha256=hDddJUEePbRN-8xlllOeGh
|
|
|
164
164
|
pymobiledevice3/tunneld/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
165
165
|
pymobiledevice3/tunneld/api.py,sha256=EfGKXEWhsMSB__menPmRmL9R6dpazVJDUy7B3pn05MM,2357
|
|
166
166
|
pymobiledevice3/tunneld/server.py,sha256=SvC57AV_R8YQhA0fCwGNUdhfy8TKMFWwL_fp_FmXrBI,22715
|
|
167
|
-
pymobiledevice3-4.
|
|
168
|
-
pymobiledevice3-4.
|
|
169
|
-
pymobiledevice3-4.
|
|
170
|
-
pymobiledevice3-4.
|
|
171
|
-
pymobiledevice3-4.
|
|
172
|
-
pymobiledevice3-4.
|
|
167
|
+
pymobiledevice3-4.22.1.dist-info/licenses/LICENSE,sha256=jOtLnuWt7d5Hsx6XXB2QxzrSe2sWWh3NgMfFRetluQM,35147
|
|
168
|
+
pymobiledevice3-4.22.1.dist-info/METADATA,sha256=FMEGO0bUfwpHasHiapCr-w0hYkME09vlL6TBeOnl3qE,17366
|
|
169
|
+
pymobiledevice3-4.22.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
170
|
+
pymobiledevice3-4.22.1.dist-info/entry_points.txt,sha256=jJMlOanHlVwUxcY__JwvKeWPrvBJr_wJyEq4oHIZNKE,66
|
|
171
|
+
pymobiledevice3-4.22.1.dist-info/top_level.txt,sha256=MjZoRqcWPOh5banG-BbDOnKEfsS3kCxqV9cv-nzyg2Q,21
|
|
172
|
+
pymobiledevice3-4.22.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|