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
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
2
|
import contextlib
|
|
3
|
+
from typing import Optional
|
|
3
4
|
|
|
4
5
|
from pymobiledevice3.lockdown import LockdownClient
|
|
5
6
|
from pymobiledevice3.lockdown_service_provider import LockdownServiceProvider
|
|
@@ -7,8 +8,8 @@ from pymobiledevice3.services.lockdown_service import LockdownService
|
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
class PowerAssertionService(LockdownService):
|
|
10
|
-
RSD_SERVICE_NAME =
|
|
11
|
-
SERVICE_NAME =
|
|
11
|
+
RSD_SERVICE_NAME = "com.apple.mobile.assertion_agent.shim.remote"
|
|
12
|
+
SERVICE_NAME = "com.apple.mobile.assertion_agent"
|
|
12
13
|
|
|
13
14
|
def __init__(self, lockdown: LockdownServiceProvider):
|
|
14
15
|
if isinstance(lockdown, LockdownClient):
|
|
@@ -17,17 +18,17 @@ class PowerAssertionService(LockdownService):
|
|
|
17
18
|
super().__init__(lockdown, self.RSD_SERVICE_NAME)
|
|
18
19
|
|
|
19
20
|
@contextlib.contextmanager
|
|
20
|
-
def create_power_assertion(self, type_: str, name: str, timeout: float, details: str = None):
|
|
21
|
-
"""
|
|
21
|
+
def create_power_assertion(self, type_: str, name: str, timeout: float, details: Optional[str] = None):
|
|
22
|
+
"""Trigger IOPMAssertionCreateWithName"""
|
|
22
23
|
msg = {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
"CommandKey": "CommandCreateAssertion",
|
|
25
|
+
"AssertionTypeKey": type_,
|
|
26
|
+
"AssertionNameKey": name,
|
|
27
|
+
"AssertionTimeoutKey": timeout,
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
if details is not None:
|
|
30
|
-
msg[
|
|
31
|
+
msg["AssertionDetailKey"] = details
|
|
31
32
|
|
|
32
33
|
self.service.send_recv_plist(msg)
|
|
33
34
|
yield
|
|
@@ -6,8 +6,8 @@ from pymobiledevice3.services.lockdown_service import LockdownService
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
class PreboardService(LockdownService):
|
|
9
|
-
RSD_SERVICE_NAME =
|
|
10
|
-
SERVICE_NAME =
|
|
9
|
+
RSD_SERVICE_NAME = "com.apple.preboardservice_v2.shim.remote"
|
|
10
|
+
SERVICE_NAME = "com.apple.preboardservice_v2"
|
|
11
11
|
|
|
12
12
|
def __init__(self, lockdown: LockdownServiceProvider):
|
|
13
13
|
if isinstance(lockdown, LockdownClient):
|
|
@@ -16,7 +16,7 @@ class PreboardService(LockdownService):
|
|
|
16
16
|
super().__init__(lockdown, self.RSD_SERVICE_NAME)
|
|
17
17
|
|
|
18
18
|
def create_stashbag(self, manifest):
|
|
19
|
-
return self.service.send_recv_plist({
|
|
19
|
+
return self.service.send_recv_plist({"Command": "CreateStashbag", "Manifest": manifest})
|
|
20
20
|
|
|
21
21
|
def commit(self, manifest):
|
|
22
|
-
return self.service.send_recv_plist({
|
|
22
|
+
return self.service.send_recv_plist({"Command": "CommitStashbag", "Manifest": manifest})
|
|
@@ -15,32 +15,39 @@ class DSCFile:
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
class RemoteFetchSymbolsService(RemoteService):
|
|
18
|
-
SERVICE_NAME =
|
|
18
|
+
SERVICE_NAME = "com.apple.dt.remoteFetchSymbols"
|
|
19
19
|
|
|
20
20
|
def __init__(self, rsd: RemoteServiceDiscoveryService):
|
|
21
21
|
super().__init__(rsd, self.SERVICE_NAME)
|
|
22
22
|
|
|
23
23
|
async def get_dsc_file_list(self) -> list[DSCFile]:
|
|
24
24
|
files: list[DSCFile] = []
|
|
25
|
-
response = await self.service.send_receive_request({
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
response = await self.service.send_receive_request({
|
|
26
|
+
"XPCDictionary_sideChannel": uuid.uuid4(),
|
|
27
|
+
"DSCFilePaths": [],
|
|
28
|
+
})
|
|
29
|
+
file_count = response["DSCFilePaths"]
|
|
30
|
+
for _i in range(file_count):
|
|
28
31
|
response = await self.service.receive_response()
|
|
29
|
-
response = response[
|
|
30
|
-
file_transfer = response[
|
|
31
|
-
expected_length = file_transfer[
|
|
32
|
-
file_path = response[
|
|
32
|
+
response = response["DSCFilePaths"]
|
|
33
|
+
file_transfer = response["fileTransfer"]
|
|
34
|
+
expected_length = file_transfer["expectedLength"]
|
|
35
|
+
file_path = response["filePath"]
|
|
33
36
|
files.append(DSCFile(file_path=file_path, file_size=expected_length))
|
|
34
37
|
return files
|
|
35
38
|
|
|
36
39
|
async def download(self, out: Path) -> None:
|
|
37
40
|
files = await self.get_dsc_file_list()
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
with
|
|
41
|
+
with tqdm(total=len(files), dynamic_ncols=True, desc="Downloading DSC") as total_pb:
|
|
42
|
+
for i, file in enumerate(files):
|
|
43
|
+
total_pb.set_description("Downloading DSC")
|
|
44
|
+
out_file = out / file.file_path[1:] # trim the "/" prefix
|
|
45
|
+
out_file.parent.mkdir(parents=True, exist_ok=True)
|
|
46
|
+
with (
|
|
47
|
+
open(out_file, "wb") as f,
|
|
48
|
+
tqdm(total=files[i].file_size, dynamic_ncols=True, desc=file.file_path.rsplit("/", 1)[-1]) as pb,
|
|
49
|
+
):
|
|
44
50
|
async for chunk in self.service.iter_file_chunks(files[i].file_size, file_idx=i):
|
|
45
51
|
f.write(chunk)
|
|
46
52
|
pb.update(len(chunk))
|
|
53
|
+
total_pb.update(1)
|