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.

Files changed (143) hide show
  1. misc/plist_sniffer.py +15 -15
  2. misc/remotexpc_sniffer.py +29 -28
  3. pymobiledevice3/__main__.py +128 -102
  4. pymobiledevice3/_version.py +2 -2
  5. pymobiledevice3/bonjour.py +26 -49
  6. pymobiledevice3/ca.py +32 -24
  7. pymobiledevice3/cli/activation.py +7 -7
  8. pymobiledevice3/cli/afc.py +19 -19
  9. pymobiledevice3/cli/amfi.py +4 -4
  10. pymobiledevice3/cli/apps.py +51 -39
  11. pymobiledevice3/cli/backup.py +58 -32
  12. pymobiledevice3/cli/bonjour.py +25 -18
  13. pymobiledevice3/cli/cli_common.py +112 -81
  14. pymobiledevice3/cli/companion_proxy.py +4 -4
  15. pymobiledevice3/cli/completions.py +10 -10
  16. pymobiledevice3/cli/crash.py +37 -31
  17. pymobiledevice3/cli/developer.py +602 -520
  18. pymobiledevice3/cli/diagnostics.py +38 -33
  19. pymobiledevice3/cli/lockdown.py +79 -74
  20. pymobiledevice3/cli/mounter.py +85 -68
  21. pymobiledevice3/cli/notification.py +10 -10
  22. pymobiledevice3/cli/pcap.py +19 -14
  23. pymobiledevice3/cli/power_assertion.py +12 -10
  24. pymobiledevice3/cli/processes.py +10 -10
  25. pymobiledevice3/cli/profile.py +88 -77
  26. pymobiledevice3/cli/provision.py +17 -17
  27. pymobiledevice3/cli/remote.py +186 -110
  28. pymobiledevice3/cli/restore.py +43 -40
  29. pymobiledevice3/cli/springboard.py +30 -28
  30. pymobiledevice3/cli/syslog.py +85 -58
  31. pymobiledevice3/cli/usbmux.py +21 -20
  32. pymobiledevice3/cli/version.py +3 -2
  33. pymobiledevice3/cli/webinspector.py +157 -79
  34. pymobiledevice3/common.py +1 -1
  35. pymobiledevice3/exceptions.py +154 -60
  36. pymobiledevice3/irecv.py +49 -53
  37. pymobiledevice3/irecv_devices.py +1489 -492
  38. pymobiledevice3/lockdown.py +394 -241
  39. pymobiledevice3/lockdown_service_provider.py +5 -7
  40. pymobiledevice3/osu/os_utils.py +18 -9
  41. pymobiledevice3/osu/posix_util.py +28 -15
  42. pymobiledevice3/osu/win_util.py +14 -8
  43. pymobiledevice3/pair_records.py +19 -19
  44. pymobiledevice3/remote/common.py +4 -4
  45. pymobiledevice3/remote/core_device/app_service.py +94 -67
  46. pymobiledevice3/remote/core_device/core_device_service.py +17 -14
  47. pymobiledevice3/remote/core_device/device_info.py +5 -5
  48. pymobiledevice3/remote/core_device/diagnostics_service.py +10 -8
  49. pymobiledevice3/remote/core_device/file_service.py +47 -33
  50. pymobiledevice3/remote/remote_service_discovery.py +53 -35
  51. pymobiledevice3/remote/remotexpc.py +62 -41
  52. pymobiledevice3/remote/tunnel_service.py +371 -293
  53. pymobiledevice3/remote/utils.py +12 -11
  54. pymobiledevice3/remote/xpc_message.py +145 -125
  55. pymobiledevice3/resources/dsc_uuid_map.py +19 -19
  56. pymobiledevice3/resources/firmware_notifications.py +16 -16
  57. pymobiledevice3/restore/asr.py +27 -27
  58. pymobiledevice3/restore/base_restore.py +90 -47
  59. pymobiledevice3/restore/consts.py +87 -66
  60. pymobiledevice3/restore/device.py +11 -11
  61. pymobiledevice3/restore/fdr.py +46 -46
  62. pymobiledevice3/restore/ftab.py +19 -19
  63. pymobiledevice3/restore/img4.py +130 -133
  64. pymobiledevice3/restore/mbn.py +35 -54
  65. pymobiledevice3/restore/recovery.py +125 -135
  66. pymobiledevice3/restore/restore.py +524 -523
  67. pymobiledevice3/restore/restore_options.py +122 -115
  68. pymobiledevice3/restore/restored_client.py +25 -22
  69. pymobiledevice3/restore/tss.py +378 -270
  70. pymobiledevice3/service_connection.py +50 -46
  71. pymobiledevice3/services/accessibilityaudit.py +136 -126
  72. pymobiledevice3/services/afc.py +350 -291
  73. pymobiledevice3/services/amfi.py +21 -18
  74. pymobiledevice3/services/companion.py +23 -19
  75. pymobiledevice3/services/crash_reports.py +60 -46
  76. pymobiledevice3/services/debugserver_applist.py +3 -3
  77. pymobiledevice3/services/device_arbitration.py +8 -8
  78. pymobiledevice3/services/device_link.py +55 -47
  79. pymobiledevice3/services/diagnostics.py +971 -968
  80. pymobiledevice3/services/dtfetchsymbols.py +8 -8
  81. pymobiledevice3/services/dvt/dvt_secure_socket_proxy.py +4 -4
  82. pymobiledevice3/services/dvt/dvt_testmanaged_proxy.py +4 -4
  83. pymobiledevice3/services/dvt/instruments/activity_trace_tap.py +85 -74
  84. pymobiledevice3/services/dvt/instruments/application_listing.py +2 -3
  85. pymobiledevice3/services/dvt/instruments/condition_inducer.py +7 -6
  86. pymobiledevice3/services/dvt/instruments/core_profile_session_tap.py +466 -384
  87. pymobiledevice3/services/dvt/instruments/device_info.py +11 -11
  88. pymobiledevice3/services/dvt/instruments/energy_monitor.py +1 -1
  89. pymobiledevice3/services/dvt/instruments/graphics.py +1 -1
  90. pymobiledevice3/services/dvt/instruments/location_simulation.py +1 -1
  91. pymobiledevice3/services/dvt/instruments/location_simulation_base.py +10 -10
  92. pymobiledevice3/services/dvt/instruments/network_monitor.py +17 -17
  93. pymobiledevice3/services/dvt/instruments/notifications.py +1 -1
  94. pymobiledevice3/services/dvt/instruments/process_control.py +25 -10
  95. pymobiledevice3/services/dvt/instruments/screenshot.py +2 -2
  96. pymobiledevice3/services/dvt/instruments/sysmontap.py +15 -15
  97. pymobiledevice3/services/dvt/testmanaged/xcuitest.py +40 -50
  98. pymobiledevice3/services/file_relay.py +10 -10
  99. pymobiledevice3/services/heartbeat.py +8 -7
  100. pymobiledevice3/services/house_arrest.py +12 -15
  101. pymobiledevice3/services/installation_proxy.py +119 -100
  102. pymobiledevice3/services/lockdown_service.py +12 -5
  103. pymobiledevice3/services/misagent.py +22 -19
  104. pymobiledevice3/services/mobile_activation.py +84 -72
  105. pymobiledevice3/services/mobile_config.py +330 -301
  106. pymobiledevice3/services/mobile_image_mounter.py +137 -116
  107. pymobiledevice3/services/mobilebackup2.py +188 -150
  108. pymobiledevice3/services/notification_proxy.py +11 -11
  109. pymobiledevice3/services/os_trace.py +69 -51
  110. pymobiledevice3/services/pcapd.py +306 -306
  111. pymobiledevice3/services/power_assertion.py +10 -9
  112. pymobiledevice3/services/preboard.py +4 -4
  113. pymobiledevice3/services/remote_fetch_symbols.py +16 -14
  114. pymobiledevice3/services/remote_server.py +176 -146
  115. pymobiledevice3/services/restore_service.py +16 -16
  116. pymobiledevice3/services/screenshot.py +13 -10
  117. pymobiledevice3/services/simulate_location.py +7 -7
  118. pymobiledevice3/services/springboard.py +15 -15
  119. pymobiledevice3/services/syslog.py +5 -5
  120. pymobiledevice3/services/web_protocol/alert.py +3 -3
  121. pymobiledevice3/services/web_protocol/automation_session.py +180 -176
  122. pymobiledevice3/services/web_protocol/cdp_screencast.py +44 -36
  123. pymobiledevice3/services/web_protocol/cdp_server.py +19 -19
  124. pymobiledevice3/services/web_protocol/cdp_target.py +411 -373
  125. pymobiledevice3/services/web_protocol/driver.py +47 -45
  126. pymobiledevice3/services/web_protocol/element.py +74 -63
  127. pymobiledevice3/services/web_protocol/inspector_session.py +106 -102
  128. pymobiledevice3/services/web_protocol/selenium_api.py +2 -2
  129. pymobiledevice3/services/web_protocol/session_protocol.py +15 -10
  130. pymobiledevice3/services/web_protocol/switch_to.py +11 -12
  131. pymobiledevice3/services/webinspector.py +127 -116
  132. pymobiledevice3/tcp_forwarder.py +35 -22
  133. pymobiledevice3/tunneld/api.py +20 -15
  134. pymobiledevice3/tunneld/server.py +212 -133
  135. pymobiledevice3/usbmux.py +183 -138
  136. pymobiledevice3/utils.py +14 -11
  137. {pymobiledevice3-5.0.0.dist-info → pymobiledevice3-5.0.2.dist-info}/METADATA +1 -1
  138. pymobiledevice3-5.0.2.dist-info/RECORD +173 -0
  139. pymobiledevice3-5.0.0.dist-info/RECORD +0 -173
  140. {pymobiledevice3-5.0.0.dist-info → pymobiledevice3-5.0.2.dist-info}/WHEEL +0 -0
  141. {pymobiledevice3-5.0.0.dist-info → pymobiledevice3-5.0.2.dist-info}/entry_points.txt +0 -0
  142. {pymobiledevice3-5.0.0.dist-info → pymobiledevice3-5.0.2.dist-info}/licenses/LICENSE +0 -0
  143. {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('ShellCompletion', ['source', 'rc', 'path'])
10
+ ShellCompletion = namedtuple("ShellCompletion", ["source", "rc", "path"])
11
11
 
12
12
  COMPLETIONS = [
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()),
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['pymobiledevice3']
32
+ pymobiledevice3 = local["pymobiledevice3"]
33
33
  except CommandNotFound:
34
- logger.error('pymobiledevice3 main binary could not be found in your path.')
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'Writing shell completions to: {completion.path}')
42
+ logger.info(f"Writing shell completions to: {completion.path}")
43
43
  completion.path.write_text(pymobiledevice3())
44
- line = f'source {completion.path}'
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'Adding source line to {completion.rc}')
50
- completion.rc.write_text(f'{completion.rc.read_text()}\n{line}')
49
+ logger.info(f"Adding source line to {completion.rc}")
50
+ completion.rc.write_text(f"{completion.rc.read_text()}\n{line}")
@@ -13,70 +13,76 @@ def cli() -> None:
13
13
 
14
14
  @cli.group()
15
15
  def crash() -> None:
16
- """ Manage crash reports """
16
+ """Manage crash reports"""
17
17
  pass
18
18
 
19
19
 
20
- @crash.command('clear', cls=Command)
21
- @click.option('-f', '--flush', is_flag=True, default=False, help='flush before clear')
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
- """ clear(/remove) all crash reports """
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('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')
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
- """ pull all crash reports """
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('shell', cls=Command)
42
+ @crash.command("shell", cls=Command)
43
43
  def crash_shell(service_provider: LockdownClient):
44
- """ start an afc shell """
44
+ """start an afc shell"""
45
45
  CrashReportsShell.create(service_provider)
46
46
 
47
47
 
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)
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
- """ List """
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('flush', cls=Command)
59
+ @crash.command("flush", cls=Command)
60
60
  def crash_mover_flush(service_provider: LockdownClient):
61
- """ trigger com.apple.crashreportmover to flush all products into CrashReports directory """
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('watch', cls=Command)
66
- @click.argument('name', required=False)
67
- @click.option('-r', '--raw', is_flag=True)
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
- """ watch for crash report generation """
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('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('-t', '--timeout', default=None, show_default=True, type=click.FLOAT,
78
- help='Maximum time in seconds to wait for the completion of sysdiagnose archive')
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
- """ get a sysdiagnose archive from device (requires user interaction) """
81
- print('Press Power+VolUp+VolDown for 0.215 seconds')
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)