pymobiledevice3 5.0.0__py3-none-any.whl → 5.0.2__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.
- misc/plist_sniffer.py +15 -15
- misc/remotexpc_sniffer.py +29 -28
- pymobiledevice3/__main__.py +128 -102
- pymobiledevice3/_version.py +2 -2
- pymobiledevice3/bonjour.py +26 -49
- pymobiledevice3/ca.py +32 -24
- pymobiledevice3/cli/activation.py +7 -7
- pymobiledevice3/cli/afc.py +19 -19
- pymobiledevice3/cli/amfi.py +4 -4
- pymobiledevice3/cli/apps.py +51 -39
- pymobiledevice3/cli/backup.py +58 -32
- pymobiledevice3/cli/bonjour.py +25 -18
- pymobiledevice3/cli/cli_common.py +112 -81
- pymobiledevice3/cli/companion_proxy.py +4 -4
- pymobiledevice3/cli/completions.py +10 -10
- pymobiledevice3/cli/crash.py +37 -31
- pymobiledevice3/cli/developer.py +602 -520
- pymobiledevice3/cli/diagnostics.py +38 -33
- pymobiledevice3/cli/lockdown.py +79 -74
- pymobiledevice3/cli/mounter.py +85 -68
- pymobiledevice3/cli/notification.py +10 -10
- pymobiledevice3/cli/pcap.py +19 -14
- pymobiledevice3/cli/power_assertion.py +12 -10
- pymobiledevice3/cli/processes.py +10 -10
- pymobiledevice3/cli/profile.py +88 -77
- pymobiledevice3/cli/provision.py +17 -17
- pymobiledevice3/cli/remote.py +186 -110
- pymobiledevice3/cli/restore.py +43 -40
- pymobiledevice3/cli/springboard.py +30 -28
- pymobiledevice3/cli/syslog.py +85 -58
- pymobiledevice3/cli/usbmux.py +21 -20
- pymobiledevice3/cli/version.py +3 -2
- pymobiledevice3/cli/webinspector.py +157 -79
- pymobiledevice3/common.py +1 -1
- pymobiledevice3/exceptions.py +154 -60
- pymobiledevice3/irecv.py +49 -53
- pymobiledevice3/irecv_devices.py +1489 -492
- pymobiledevice3/lockdown.py +394 -241
- pymobiledevice3/lockdown_service_provider.py +5 -7
- pymobiledevice3/osu/os_utils.py +18 -9
- pymobiledevice3/osu/posix_util.py +28 -15
- pymobiledevice3/osu/win_util.py +14 -8
- pymobiledevice3/pair_records.py +19 -19
- pymobiledevice3/remote/common.py +4 -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 +10 -8
- pymobiledevice3/remote/core_device/file_service.py +47 -33
- pymobiledevice3/remote/remote_service_discovery.py +53 -35
- pymobiledevice3/remote/remotexpc.py +62 -41
- pymobiledevice3/remote/tunnel_service.py +371 -293
- pymobiledevice3/remote/utils.py +12 -11
- pymobiledevice3/remote/xpc_message.py +145 -125
- pymobiledevice3/resources/dsc_uuid_map.py +19 -19
- pymobiledevice3/resources/firmware_notifications.py +16 -16
- pymobiledevice3/restore/asr.py +27 -27
- pymobiledevice3/restore/base_restore.py +90 -47
- pymobiledevice3/restore/consts.py +87 -66
- pymobiledevice3/restore/device.py +11 -11
- pymobiledevice3/restore/fdr.py +46 -46
- pymobiledevice3/restore/ftab.py +19 -19
- pymobiledevice3/restore/img4.py +130 -133
- pymobiledevice3/restore/mbn.py +35 -54
- pymobiledevice3/restore/recovery.py +125 -135
- pymobiledevice3/restore/restore.py +524 -523
- pymobiledevice3/restore/restore_options.py +122 -115
- pymobiledevice3/restore/restored_client.py +25 -22
- pymobiledevice3/restore/tss.py +378 -270
- pymobiledevice3/service_connection.py +50 -46
- pymobiledevice3/services/accessibilityaudit.py +136 -126
- pymobiledevice3/services/afc.py +350 -291
- pymobiledevice3/services/amfi.py +21 -18
- pymobiledevice3/services/companion.py +23 -19
- pymobiledevice3/services/crash_reports.py +60 -46
- pymobiledevice3/services/debugserver_applist.py +3 -3
- pymobiledevice3/services/device_arbitration.py +8 -8
- pymobiledevice3/services/device_link.py +55 -47
- pymobiledevice3/services/diagnostics.py +971 -968
- 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 +11 -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 +25 -10
- pymobiledevice3/services/dvt/instruments/screenshot.py +2 -2
- pymobiledevice3/services/dvt/instruments/sysmontap.py +15 -15
- pymobiledevice3/services/dvt/testmanaged/xcuitest.py +40 -50
- pymobiledevice3/services/file_relay.py +10 -10
- pymobiledevice3/services/heartbeat.py +8 -7
- pymobiledevice3/services/house_arrest.py +12 -15
- pymobiledevice3/services/installation_proxy.py +119 -100
- pymobiledevice3/services/lockdown_service.py +12 -5
- pymobiledevice3/services/misagent.py +22 -19
- pymobiledevice3/services/mobile_activation.py +84 -72
- pymobiledevice3/services/mobile_config.py +330 -301
- pymobiledevice3/services/mobile_image_mounter.py +137 -116
- pymobiledevice3/services/mobilebackup2.py +188 -150
- pymobiledevice3/services/notification_proxy.py +11 -11
- pymobiledevice3/services/os_trace.py +69 -51
- pymobiledevice3/services/pcapd.py +306 -306
- pymobiledevice3/services/power_assertion.py +10 -9
- pymobiledevice3/services/preboard.py +4 -4
- pymobiledevice3/services/remote_fetch_symbols.py +16 -14
- pymobiledevice3/services/remote_server.py +176 -146
- pymobiledevice3/services/restore_service.py +16 -16
- pymobiledevice3/services/screenshot.py +13 -10
- 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 +3 -3
- pymobiledevice3/services/web_protocol/automation_session.py +180 -176
- pymobiledevice3/services/web_protocol/cdp_screencast.py +44 -36
- pymobiledevice3/services/web_protocol/cdp_server.py +19 -19
- pymobiledevice3/services/web_protocol/cdp_target.py +411 -373
- pymobiledevice3/services/web_protocol/driver.py +47 -45
- pymobiledevice3/services/web_protocol/element.py +74 -63
- pymobiledevice3/services/web_protocol/inspector_session.py +106 -102
- pymobiledevice3/services/web_protocol/selenium_api.py +2 -2
- pymobiledevice3/services/web_protocol/session_protocol.py +15 -10
- pymobiledevice3/services/web_protocol/switch_to.py +11 -12
- pymobiledevice3/services/webinspector.py +127 -116
- pymobiledevice3/tcp_forwarder.py +35 -22
- pymobiledevice3/tunneld/api.py +20 -15
- pymobiledevice3/tunneld/server.py +212 -133
- pymobiledevice3/usbmux.py +183 -138
- pymobiledevice3/utils.py +14 -11
- {pymobiledevice3-5.0.0.dist-info → pymobiledevice3-5.0.2.dist-info}/METADATA +1 -1
- pymobiledevice3-5.0.2.dist-info/RECORD +173 -0
- pymobiledevice3-5.0.0.dist-info/RECORD +0 -173
- {pymobiledevice3-5.0.0.dist-info → pymobiledevice3-5.0.2.dist-info}/WHEEL +0 -0
- {pymobiledevice3-5.0.0.dist-info → pymobiledevice3-5.0.2.dist-info}/entry_points.txt +0 -0
- {pymobiledevice3-5.0.0.dist-info → pymobiledevice3-5.0.2.dist-info}/licenses/LICENSE +0 -0
- {pymobiledevice3-5.0.0.dist-info → pymobiledevice3-5.0.2.dist-info}/top_level.txt +0 -0
|
@@ -7,12 +7,12 @@ from plumbum import CommandNotFound, local
|
|
|
7
7
|
|
|
8
8
|
logger = logging.getLogger(__name__)
|
|
9
9
|
|
|
10
|
-
ShellCompletion = namedtuple(
|
|
10
|
+
ShellCompletion = namedtuple("ShellCompletion", ["source", "rc", "path"])
|
|
11
11
|
|
|
12
12
|
COMPLETIONS = [
|
|
13
|
-
ShellCompletion(
|
|
14
|
-
ShellCompletion(
|
|
15
|
-
ShellCompletion(
|
|
13
|
+
ShellCompletion("zsh_source", Path("~/.zshrc").expanduser(), Path("~/.pymobiledevice3.zsh").expanduser()),
|
|
14
|
+
ShellCompletion("bash_source", Path("~/.bashrc").expanduser(), Path("~/.pymobiledevice3.bash").expanduser()),
|
|
15
|
+
ShellCompletion("fish_source", None, Path("~/.config/fish/completions/pymobiledevice3.fish").expanduser()),
|
|
16
16
|
]
|
|
17
17
|
|
|
18
18
|
|
|
@@ -29,9 +29,9 @@ def install_completions() -> None:
|
|
|
29
29
|
If supplying an explicit shell script to write, install it there, otherwise install globally.
|
|
30
30
|
"""
|
|
31
31
|
try:
|
|
32
|
-
pymobiledevice3 = local[
|
|
32
|
+
pymobiledevice3 = local["pymobiledevice3"]
|
|
33
33
|
except CommandNotFound:
|
|
34
|
-
logger.
|
|
34
|
+
logger.exception("pymobiledevice3 main binary could not be found in your path.")
|
|
35
35
|
return
|
|
36
36
|
|
|
37
37
|
for completion in COMPLETIONS:
|
|
@@ -39,12 +39,12 @@ def install_completions() -> None:
|
|
|
39
39
|
if not completion.path.parent.exists():
|
|
40
40
|
# fish is not installed, skip
|
|
41
41
|
continue
|
|
42
|
-
logger.info(f
|
|
42
|
+
logger.info(f"Writing shell completions to: {completion.path}")
|
|
43
43
|
completion.path.write_text(pymobiledevice3())
|
|
44
|
-
line = f
|
|
44
|
+
line = f"source {completion.path}"
|
|
45
45
|
|
|
46
46
|
if not completion.rc.exists() or line in completion.rc.read_text():
|
|
47
47
|
continue
|
|
48
48
|
|
|
49
|
-
logger.info(f
|
|
50
|
-
completion.rc.write_text(f
|
|
49
|
+
logger.info(f"Adding source line to {completion.rc}")
|
|
50
|
+
completion.rc.write_text(f"{completion.rc.read_text()}\n{line}")
|
pymobiledevice3/cli/crash.py
CHANGED
|
@@ -13,70 +13,76 @@ def cli() -> None:
|
|
|
13
13
|
|
|
14
14
|
@cli.group()
|
|
15
15
|
def crash() -> None:
|
|
16
|
-
"""
|
|
16
|
+
"""Manage crash reports"""
|
|
17
17
|
pass
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
@crash.command(
|
|
21
|
-
@click.option(
|
|
20
|
+
@crash.command("clear", cls=Command)
|
|
21
|
+
@click.option("-f", "--flush", is_flag=True, default=False, help="flush before clear")
|
|
22
22
|
def crash_clear(service_provider: LockdownClient, flush):
|
|
23
|
-
"""
|
|
23
|
+
"""clear(/remove) all crash reports"""
|
|
24
24
|
crash_manager = CrashReportsManager(service_provider)
|
|
25
25
|
if flush:
|
|
26
26
|
crash_manager.flush()
|
|
27
27
|
crash_manager.clear()
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
@crash.command(
|
|
31
|
-
@click.argument(
|
|
32
|
-
@click.argument(
|
|
33
|
-
@click.option(
|
|
34
|
-
@click.option(
|
|
30
|
+
@crash.command("pull", cls=Command)
|
|
31
|
+
@click.argument("out", type=click.Path(file_okay=False))
|
|
32
|
+
@click.argument("remote_file", type=click.Path(), required=False)
|
|
33
|
+
@click.option("-e", "--erase", is_flag=True)
|
|
34
|
+
@click.option("-m", "--match", help="Match given regex over enumerated basenames")
|
|
35
35
|
def crash_pull(service_provider: LockdownServiceProvider, out, remote_file, erase, match) -> None:
|
|
36
|
-
"""
|
|
36
|
+
"""pull all crash reports"""
|
|
37
37
|
if remote_file is None:
|
|
38
|
-
remote_file =
|
|
38
|
+
remote_file = "/"
|
|
39
39
|
CrashReportsManager(service_provider).pull(out, remote_file, erase, match)
|
|
40
40
|
|
|
41
41
|
|
|
42
|
-
@crash.command(
|
|
42
|
+
@crash.command("shell", cls=Command)
|
|
43
43
|
def crash_shell(service_provider: LockdownClient):
|
|
44
|
-
"""
|
|
44
|
+
"""start an afc shell"""
|
|
45
45
|
CrashReportsShell.create(service_provider)
|
|
46
46
|
|
|
47
47
|
|
|
48
|
-
@crash.command(
|
|
49
|
-
@click.argument(
|
|
50
|
-
@click.option(
|
|
48
|
+
@crash.command("ls", cls=Command)
|
|
49
|
+
@click.argument("remote_file", type=click.Path(), required=False)
|
|
50
|
+
@click.option("-d", "--depth", type=click.INT, default=1)
|
|
51
51
|
def crash_ls(service_provider: LockdownClient, remote_file, depth):
|
|
52
|
-
"""
|
|
52
|
+
"""List"""
|
|
53
53
|
if remote_file is None:
|
|
54
|
-
remote_file =
|
|
54
|
+
remote_file = "/"
|
|
55
55
|
for path in CrashReportsManager(service_provider).ls(remote_file, depth):
|
|
56
56
|
print(path)
|
|
57
57
|
|
|
58
58
|
|
|
59
|
-
@crash.command(
|
|
59
|
+
@crash.command("flush", cls=Command)
|
|
60
60
|
def crash_mover_flush(service_provider: LockdownClient):
|
|
61
|
-
"""
|
|
61
|
+
"""trigger com.apple.crashreportmover to flush all products into CrashReports directory"""
|
|
62
62
|
CrashReportsManager(service_provider).flush()
|
|
63
63
|
|
|
64
64
|
|
|
65
|
-
@crash.command(
|
|
66
|
-
@click.argument(
|
|
67
|
-
@click.option(
|
|
65
|
+
@crash.command("watch", cls=Command)
|
|
66
|
+
@click.argument("name", required=False)
|
|
67
|
+
@click.option("-r", "--raw", is_flag=True)
|
|
68
68
|
def crash_mover_watch(service_provider: LockdownClient, name, raw):
|
|
69
|
-
"""
|
|
69
|
+
"""watch for crash report generation"""
|
|
70
70
|
for crash_report in CrashReportsManager(service_provider).watch(name=name, raw=raw):
|
|
71
71
|
print(crash_report)
|
|
72
72
|
|
|
73
73
|
|
|
74
|
-
@crash.command(
|
|
75
|
-
@click.argument(
|
|
76
|
-
@click.option(
|
|
77
|
-
@click.option(
|
|
78
|
-
|
|
74
|
+
@crash.command("sysdiagnose", cls=Command)
|
|
75
|
+
@click.argument("out", type=click.Path(exists=False, dir_okay=True, file_okay=True))
|
|
76
|
+
@click.option("-e", "--erase", is_flag=True, help="erase file after pulling")
|
|
77
|
+
@click.option(
|
|
78
|
+
"-t",
|
|
79
|
+
"--timeout",
|
|
80
|
+
default=None,
|
|
81
|
+
show_default=True,
|
|
82
|
+
type=click.FLOAT,
|
|
83
|
+
help="Maximum time in seconds to wait for the completion of sysdiagnose archive",
|
|
84
|
+
)
|
|
79
85
|
def crash_sysdiagnose(service_provider: LockdownClient, out, erase, timeout):
|
|
80
|
-
"""
|
|
81
|
-
print(
|
|
86
|
+
"""get a sysdiagnose archive from device (requires user interaction)"""
|
|
87
|
+
print("Press Power+VolUp+VolDown for 0.215 seconds")
|
|
82
88
|
CrashReportsManager(service_provider).get_new_sysdiagnose(out, erase=erase, timeout=timeout)
|