pymobiledevice3 4.22.1__tar.gz → 4.24.0__tar.gz

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 (226) hide show
  1. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/PKG-INFO +2 -1
  2. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/README.md +1 -0
  3. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/__main__.py +1 -1
  4. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/_version.py +16 -3
  5. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/cli/activation.py +7 -1
  6. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/cli/apps.py +3 -2
  7. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/lockdown.py +7 -2
  8. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/service_connection.py +28 -22
  9. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/installation_proxy.py +4 -1
  10. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/mobile_activation.py +89 -23
  11. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3.egg-info/PKG-INFO +2 -1
  12. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/.gitattributes +0 -0
  13. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/.github/FUNDING.yml +0 -0
  14. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  15. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  16. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  17. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/.github/pull_request_template.md +0 -0
  18. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/.github/workflows/codeql.yml +0 -0
  19. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/.github/workflows/generate-executable.py +0 -0
  20. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/.github/workflows/markdown-lint.yml +0 -0
  21. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/.github/workflows/python-app.yml +0 -0
  22. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/.github/workflows/python-publish.yml +0 -0
  23. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/.gitignore +0 -0
  24. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/.pre-commit-config.yaml +0 -0
  25. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/CODE_OF_CONDUCT.md +0 -0
  26. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/CONTRIBUTING.md +0 -0
  27. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/LICENSE +0 -0
  28. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/example.gif +0 -0
  29. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/markdownlint-config.json +0 -0
  30. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/misc/DTServices-14.2.txt +0 -0
  31. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/misc/DTServices-14.5.txt +0 -0
  32. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/misc/RemoteXPC.md +0 -0
  33. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/misc/plist_sniffer.py +0 -0
  34. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/misc/pyinstaller.md +0 -0
  35. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/misc/remotexpc_sniffer.py +0 -0
  36. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/misc/understanding_idevice_protocol_layers.md +0 -0
  37. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/misc/usbmux_sniff.sh +0 -0
  38. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/__init__.py +0 -0
  39. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/bonjour.py +0 -0
  40. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/ca.py +0 -0
  41. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/cli/__init__.py +0 -0
  42. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/cli/afc.py +0 -0
  43. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/cli/amfi.py +0 -0
  44. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/cli/backup.py +0 -0
  45. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/cli/bonjour.py +0 -0
  46. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/cli/cli_common.py +0 -0
  47. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/cli/companion_proxy.py +0 -0
  48. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/cli/completions.py +0 -0
  49. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/cli/crash.py +0 -0
  50. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/cli/developer.py +0 -0
  51. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/cli/diagnostics.py +0 -0
  52. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/cli/lockdown.py +0 -0
  53. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/cli/mounter.py +0 -0
  54. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/cli/notification.py +0 -0
  55. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/cli/pcap.py +0 -0
  56. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/cli/power_assertion.py +0 -0
  57. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/cli/processes.py +0 -0
  58. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/cli/profile.py +0 -0
  59. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/cli/provision.py +0 -0
  60. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/cli/remote.py +0 -0
  61. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/cli/restore.py +0 -0
  62. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/cli/springboard.py +0 -0
  63. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/cli/syslog.py +0 -0
  64. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/cli/usbmux.py +0 -0
  65. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/cli/version.py +0 -0
  66. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/cli/webinspector.py +0 -0
  67. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/common.py +0 -0
  68. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/exceptions.py +0 -0
  69. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/irecv.py +0 -0
  70. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/irecv_devices.py +0 -0
  71. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/lockdown_service_provider.py +0 -0
  72. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/osu/__init__.py +0 -0
  73. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/osu/os_utils.py +0 -0
  74. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/osu/posix_util.py +0 -0
  75. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/osu/win_util.py +0 -0
  76. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/pair_records.py +0 -0
  77. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/remote/__init__.py +0 -0
  78. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/remote/common.py +0 -0
  79. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/remote/core_device/__init__.py +0 -0
  80. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/remote/core_device/app_service.py +0 -0
  81. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/remote/core_device/core_device_service.py +0 -0
  82. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/remote/core_device/device_info.py +0 -0
  83. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/remote/core_device/diagnostics_service.py +0 -0
  84. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/remote/core_device/file_service.py +0 -0
  85. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/remote/module_imports.py +0 -0
  86. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/remote/remote_service.py +0 -0
  87. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/remote/remote_service_discovery.py +0 -0
  88. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/remote/remotexpc.py +0 -0
  89. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/remote/tunnel_service.py +0 -0
  90. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/remote/utils.py +0 -0
  91. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/remote/xpc_message.py +0 -0
  92. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/resources/__init__.py +0 -0
  93. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/resources/dsc_uuid_map.json +0 -0
  94. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/resources/dsc_uuid_map.py +0 -0
  95. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/resources/firmware_notifications.py +0 -0
  96. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/resources/notifications.txt +0 -0
  97. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/resources/webinspector/element_attribute.js +0 -0
  98. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/resources/webinspector/element_clear.js +0 -0
  99. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/resources/webinspector/enter_fullscreen.js +0 -0
  100. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/resources/webinspector/find_nodes.js +0 -0
  101. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/resources/webinspector/focus.js +0 -0
  102. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/resources/webinspector/get_attribute.js +0 -0
  103. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/resources/webinspector/is_displayed.js +0 -0
  104. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/resources/webinspector/is_editable.js +0 -0
  105. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/resources/webinspector/is_enabled.js +0 -0
  106. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/restore/__init__.py +0 -0
  107. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/restore/asr.py +0 -0
  108. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/restore/base_restore.py +0 -0
  109. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/restore/consts.py +0 -0
  110. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/restore/device.py +0 -0
  111. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/restore/fdr.py +0 -0
  112. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/restore/ftab.py +0 -0
  113. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/restore/img4.py +0 -0
  114. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/restore/recovery.py +0 -0
  115. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/restore/restore.py +0 -0
  116. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/restore/restore_options.py +0 -0
  117. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/restore/restored_client.py +0 -0
  118. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/restore/tss.py +0 -0
  119. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/__init__.py +0 -0
  120. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/accessibilityaudit.py +0 -0
  121. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/afc.py +0 -0
  122. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/amfi.py +0 -0
  123. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/companion.py +0 -0
  124. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/crash_reports.py +0 -0
  125. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/debugserver_applist.py +0 -0
  126. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/device_arbitration.py +0 -0
  127. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/device_link.py +0 -0
  128. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/diagnostics.py +0 -0
  129. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/dtfetchsymbols.py +0 -0
  130. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/dvt/__init__.py +0 -0
  131. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/dvt/dvt_secure_socket_proxy.py +0 -0
  132. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/dvt/dvt_testmanaged_proxy.py +0 -0
  133. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/dvt/instruments/__init__.py +0 -0
  134. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/dvt/instruments/activity_trace_tap.py +0 -0
  135. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/dvt/instruments/application_listing.py +0 -0
  136. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/dvt/instruments/condition_inducer.py +0 -0
  137. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/dvt/instruments/core_profile_session_tap.py +0 -0
  138. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/dvt/instruments/device_info.py +0 -0
  139. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/dvt/instruments/energy_monitor.py +0 -0
  140. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/dvt/instruments/graphics.py +0 -0
  141. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/dvt/instruments/location_simulation.py +0 -0
  142. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/dvt/instruments/location_simulation_base.py +0 -0
  143. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/dvt/instruments/network_monitor.py +0 -0
  144. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/dvt/instruments/notifications.py +0 -0
  145. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/dvt/instruments/process_control.py +0 -0
  146. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/dvt/instruments/screenshot.py +0 -0
  147. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/dvt/instruments/sysmontap.py +0 -0
  148. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/dvt/testmanaged/xcuitest.py +0 -0
  149. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/file_relay.py +0 -0
  150. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/heartbeat.py +0 -0
  151. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/house_arrest.py +0 -0
  152. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/lockdown_service.py +0 -0
  153. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/misagent.py +0 -0
  154. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/mobile_config.py +0 -0
  155. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/mobile_image_mounter.py +0 -0
  156. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/mobilebackup2.py +0 -0
  157. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/notification_proxy.py +0 -0
  158. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/os_trace.py +0 -0
  159. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/pcapd.py +0 -0
  160. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/power_assertion.py +0 -0
  161. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/preboard.py +0 -0
  162. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/remote_fetch_symbols.py +0 -0
  163. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/remote_server.py +0 -0
  164. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/restore_service.py +0 -0
  165. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/screenshot.py +0 -0
  166. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/simulate_location.py +0 -0
  167. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/springboard.py +0 -0
  168. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/syslog.py +0 -0
  169. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/web_protocol/__init__.py +0 -0
  170. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/web_protocol/alert.py +0 -0
  171. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/web_protocol/automation_session.py +0 -0
  172. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/web_protocol/cdp_screencast.py +0 -0
  173. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/web_protocol/cdp_server.py +0 -0
  174. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/web_protocol/cdp_target.py +0 -0
  175. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/web_protocol/driver.py +0 -0
  176. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/web_protocol/element.py +0 -0
  177. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/web_protocol/inspector_session.py +0 -0
  178. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/web_protocol/selenium_api.py +0 -0
  179. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/web_protocol/session_protocol.py +0 -0
  180. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/web_protocol/switch_to.py +0 -0
  181. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/services/webinspector.py +0 -0
  182. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/tcp_forwarder.py +0 -0
  183. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/tunneld/__init__.py +0 -0
  184. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/tunneld/api.py +0 -0
  185. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/tunneld/server.py +0 -0
  186. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/usbmux.py +0 -0
  187. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3/utils.py +0 -0
  188. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3.egg-info/SOURCES.txt +0 -0
  189. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3.egg-info/dependency_links.txt +0 -0
  190. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3.egg-info/entry_points.txt +0 -0
  191. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3.egg-info/requires.txt +0 -0
  192. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pymobiledevice3.egg-info/top_level.txt +0 -0
  193. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pyproject.toml +0 -0
  194. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/pytest.ini +0 -0
  195. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/requirements.txt +0 -0
  196. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/setup.cfg +0 -0
  197. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/tests/__init__.py +0 -0
  198. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/tests/cli/__init__.py +0 -0
  199. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/tests/cli/test_cli.py +0 -0
  200. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/tests/conftest.py +0 -0
  201. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/tests/services/__init__.py +0 -0
  202. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/tests/services/instruments/__init__.py +0 -0
  203. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/tests/services/instruments/test_core_profile_session.py +0 -0
  204. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/tests/services/instruments/test_dvt_secure_socket_proxy.py +0 -0
  205. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/tests/services/instruments/test_fetch_symbols.py +0 -0
  206. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/tests/services/instruments/test_location.py +0 -0
  207. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/tests/services/instruments/test_screenshot.py +0 -0
  208. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/tests/services/test_accessibility.py +0 -0
  209. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/tests/services/test_afc.py +0 -0
  210. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/tests/services/test_apps.py +0 -0
  211. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/tests/services/test_backup2.py +0 -0
  212. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/tests/services/test_bonjour.py +0 -0
  213. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/tests/services/test_crash_reports.py +0 -0
  214. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/tests/services/test_list_devices.py +0 -0
  215. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/tests/services/test_lockdown.py +0 -0
  216. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/tests/services/test_pcapd.py +0 -0
  217. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/tests/services/test_springboard_services_relay.py +0 -0
  218. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/tests/services/test_start_tunnel.py +0 -0
  219. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/tests/services/test_syslog_relay.py +0 -0
  220. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/tests/services/test_tcp_forwarder.py +0 -0
  221. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/tests/services/test_web_protocol/__init__.py +0 -0
  222. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/tests/services/test_web_protocol/common.py +0 -0
  223. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/tests/services/test_web_protocol/conftest.py +0 -0
  224. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/tests/services/test_web_protocol/test_driver.py +0 -0
  225. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/tests/services/test_web_protocol/test_element.py +0 -0
  226. {pymobiledevice3-4.22.1 → pymobiledevice3-4.24.0}/tests/services/test_webinspector.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pymobiledevice3
3
- Version: 4.22.1
3
+ Version: 4.24.0
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>
@@ -75,6 +75,7 @@ Dynamic: license-file
75
75
  [![Pypi version](https://img.shields.io/pypi/v/pymobiledevice3.svg)](https://pypi.org/project/pymobiledevice3/ "PyPi package")
76
76
  [![Downloads](https://static.pepy.tech/personalized-badge/pymobiledevice3?period=total&units=none&left_color=grey&right_color=blue&left_text=Downloads)](https://pepy.tech/project/pymobiledevice3)
77
77
  [![Discord](https://img.shields.io/discord/1133265168051208214?logo=Discord&label=Discord)](https://discord.gg/52mZGC3JXJ)
78
+ [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/doronz88/pymobiledevice3)
78
79
  <!-- markdownlint-enable MD013 -->
79
80
 
80
81
  - [PyMobileDevice3](#pymobiledevice3)
@@ -5,6 +5,7 @@
5
5
  [![Pypi version](https://img.shields.io/pypi/v/pymobiledevice3.svg)](https://pypi.org/project/pymobiledevice3/ "PyPi package")
6
6
  [![Downloads](https://static.pepy.tech/personalized-badge/pymobiledevice3?period=total&units=none&left_color=grey&right_color=blue&left_text=Downloads)](https://pepy.tech/project/pymobiledevice3)
7
7
  [![Discord](https://img.shields.io/discord/1133265168051208214?logo=Discord&label=Discord)](https://discord.gg/52mZGC3JXJ)
8
+ [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/doronz88/pymobiledevice3)
8
9
  <!-- markdownlint-enable MD013 -->
9
10
 
10
11
  - [PyMobileDevice3](#pymobiledevice3)
@@ -53,7 +53,7 @@ INVALID_SERVICE_MESSAGE = """Failed to start service. Possible reasons are:
53
53
  - Make sure you passed the --rsd option to the subcommand
54
54
  https://github.com/doronz88/pymobiledevice3#working-with-developer-tools-ios--170
55
55
 
56
- - Apple removed this service
56
+ - Apple removed this service, or your iOS version does not support it.
57
57
 
58
58
  - A bug. Please file a bug report:
59
59
  https://github.com/doronz88/pymobiledevice3/issues/new?assignees=&labels=&projects=&template=bug_report.md&title=
@@ -1,7 +1,14 @@
1
1
  # file generated by setuptools-scm
2
2
  # don't change, don't track in version control
3
3
 
4
- __all__ = ["__version__", "__version_tuple__", "version", "version_tuple"]
4
+ __all__ = [
5
+ "__version__",
6
+ "__version_tuple__",
7
+ "version",
8
+ "version_tuple",
9
+ "__commit_id__",
10
+ "commit_id",
11
+ ]
5
12
 
6
13
  TYPE_CHECKING = False
7
14
  if TYPE_CHECKING:
@@ -9,13 +16,19 @@ if TYPE_CHECKING:
9
16
  from typing import Union
10
17
 
11
18
  VERSION_TUPLE = Tuple[Union[int, str], ...]
19
+ COMMIT_ID = Union[str, None]
12
20
  else:
13
21
  VERSION_TUPLE = object
22
+ COMMIT_ID = object
14
23
 
15
24
  version: str
16
25
  __version__: str
17
26
  __version_tuple__: VERSION_TUPLE
18
27
  version_tuple: VERSION_TUPLE
28
+ commit_id: COMMIT_ID
29
+ __commit_id__: COMMIT_ID
19
30
 
20
- __version__ = version = '4.22.1'
21
- __version_tuple__ = version_tuple = (4, 22, 1)
31
+ __version__ = version = '4.24.0'
32
+ __version_tuple__ = version_tuple = (4, 24, 0)
33
+
34
+ __commit_id__ = commit_id = 'gf0d3784e0'
@@ -23,7 +23,7 @@ def state(service_provider: LockdownClient):
23
23
 
24
24
 
25
25
  @activation.command(cls=Command)
26
- @click.option('--now', is_flag=True, help='when --offline is used, dont wait for next nonce cycle')
26
+ @click.option('--now', is_flag=True, help='do not wait for next nonce cycle')
27
27
  def activate(service_provider: LockdownClient, now):
28
28
  """ Activate device """
29
29
  activation_service = MobileActivationService(service_provider)
@@ -36,3 +36,9 @@ def activate(service_provider: LockdownClient, now):
36
36
  def deactivate(service_provider: LockdownClient):
37
37
  """ Deactivate device """
38
38
  MobileActivationService(service_provider).deactivate()
39
+
40
+
41
+ @activation.command(cls=Command)
42
+ def itunes(service_provider: LockdownClient):
43
+ """ Tell the device that it has been connected to iTunes (useful for < iOS 4) """
44
+ service_provider.set_value(True, key='iTunesHasConnected')
@@ -45,10 +45,11 @@ def uninstall(service_provider: LockdownClient, bundle_id):
45
45
 
46
46
 
47
47
  @apps.command('install', cls=Command)
48
+ @click.option('--developer', is_flag=True, help='Install developer package')
48
49
  @click.argument('package', type=click.Path(exists=True))
49
- def install(service_provider: LockdownServiceProvider, package: str) -> None:
50
+ def install(service_provider: LockdownServiceProvider, package: str, developer: bool) -> None:
50
51
  """ install given .ipa/.app/.ipcc """
51
- InstallationProxyService(lockdown=service_provider).install_from_local(package)
52
+ InstallationProxyService(lockdown=service_provider).install_from_local(package, developer=developer)
52
53
 
53
54
 
54
55
  @apps.command('afc', cls=Command)
@@ -11,7 +11,7 @@ from contextlib import contextmanager, suppress
11
11
  from enum import Enum
12
12
  from functools import wraps
13
13
  from pathlib import Path
14
- from ssl import SSLError, SSLZeroReturnError
14
+ from ssl import SSLError, SSLZeroReturnError, TLSVersion
15
15
  from typing import AsyncIterable, Optional
16
16
 
17
17
  import construct
@@ -169,7 +169,7 @@ class LockdownClient(ABC, LockdownServiceProvider):
169
169
 
170
170
  @property
171
171
  def product_version(self) -> str:
172
- return self.all_values.get('ProductVersion')
172
+ return self.all_values.get('ProductVersion') or '1.0'
173
173
 
174
174
  @property
175
175
  def device_class(self) -> DeviceClass:
@@ -333,6 +333,11 @@ class LockdownClient(ABC, LockdownServiceProvider):
333
333
 
334
334
  self.session_id = start_session.get('SessionID')
335
335
  if start_session.get('EnableSessionSSL'):
336
+ if (Version(self.product_version) < Version('5.0')) and (self.device_class != DeviceClass.WATCH):
337
+ # TLS v1 is the protocol required for versions prior to iOS 5
338
+ self.service.min_ssl_proto = TLSVersion.SSLv3
339
+ self.service.max_ssl_proto = TLSVersion.TLSv1
340
+
336
341
  with self.ssl_file() as f:
337
342
  try:
338
343
  self.service.ssl_start(f)
@@ -74,26 +74,6 @@ def parse_plist(payload: bytes) -> dict:
74
74
  raise PyMobileDevice3Exception(f'parse_plist invalid data: {payload[:100].hex()}')
75
75
 
76
76
 
77
- def create_context(certfile: str, keyfile: Optional[str] = None) -> ssl.SSLContext:
78
- """
79
- Create an SSL context for a secure connection.
80
-
81
- :param certfile: The path to the certificate file.
82
- :param keyfile: The path to the key file (optional).
83
- :return: An SSL context object.
84
- """
85
- context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
86
- if ssl.OPENSSL_VERSION.lower().startswith('openssl'):
87
- context.set_ciphers('ALL:!aNULL:!eNULL:@SECLEVEL=0')
88
- else:
89
- context.set_ciphers('ALL:!aNULL:!eNULL')
90
- context.options |= 0x4 # OPENSSL OP_LEGACY_SERVER_CONNECT (required for legacy iOS devices)
91
- context.check_hostname = False
92
- context.verify_mode = ssl.CERT_NONE
93
- context.load_cert_chain(certfile, keyfile)
94
- return context
95
-
96
-
97
77
  class ServiceConnection:
98
78
  """ wrapper for tcp-relay connections """
99
79
 
@@ -114,6 +94,11 @@ class ServiceConnection:
114
94
  self.reader = None # type: Optional[asyncio.StreamReader]
115
95
  self.writer = None # type: Optional[asyncio.StreamWriter]
116
96
 
97
+ # SSL/TLS version to be used for connecting to device
98
+ # TLS v1.2 is supported since iOS 5
99
+ self.min_ssl_proto = ssl.TLSVersion.TLSv1_2
100
+ self.max_ssl_proto = ssl.TLSVersion.TLSv1_3
101
+
117
102
  @staticmethod
118
103
  def create_using_tcp(hostname: str, port: int, keep_alive: bool = True,
119
104
  create_connection_timeout: int = DEFAULT_TIMEOUT) -> 'ServiceConnection':
@@ -339,6 +324,27 @@ class ServiceConnection:
339
324
  """
340
325
  await self.aio_sendall(build_plist(d, endianity, fmt))
341
326
 
327
+ def create_ssl_context(self, certfile: str, keyfile: Optional[str] = None) -> ssl.SSLContext:
328
+ """
329
+ Create an SSL context for a secure connection.
330
+
331
+ :param certfile: The path to the certificate file.
332
+ :param keyfile: The path to the key file (optional).
333
+ :return: An SSL context object.
334
+ """
335
+ context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
336
+ context.minimum_version = self.min_ssl_proto
337
+ context.maximum_version = self.max_ssl_proto
338
+ if ssl.OPENSSL_VERSION.lower().startswith('openssl'):
339
+ context.set_ciphers('ALL:!aNULL:!eNULL:@SECLEVEL=0')
340
+ else:
341
+ context.set_ciphers('ALL:!aNULL:!eNULL')
342
+ context.options |= 0x4 # OPENSSL OP_LEGACY_SERVER_CONNECT (required for legacy iOS devices)
343
+ context.check_hostname = False
344
+ context.verify_mode = ssl.CERT_NONE
345
+ context.load_cert_chain(certfile, keyfile)
346
+ return context
347
+
342
348
  def ssl_start(self, certfile: str, keyfile: Optional[str] = None) -> None:
343
349
  """
344
350
  Start an SSL connection.
@@ -346,7 +352,7 @@ class ServiceConnection:
346
352
  :param certfile: The path to the certificate file.
347
353
  :param keyfile: The path to the key file (optional).
348
354
  """
349
- self.socket = create_context(certfile, keyfile=keyfile).wrap_socket(self.socket)
355
+ self.socket = self.create_ssl_context(certfile, keyfile=keyfile).wrap_socket(self.socket)
350
356
 
351
357
  async def aio_ssl_start(self, certfile: str, keyfile: Optional[str] = None) -> None:
352
358
  """
@@ -357,7 +363,7 @@ class ServiceConnection:
357
363
  """
358
364
  self.reader, self.writer = await asyncio.open_connection(
359
365
  sock=self.socket,
360
- ssl=create_context(certfile, keyfile=keyfile),
366
+ ssl=self.create_ssl_context(certfile, keyfile=keyfile),
361
367
  server_hostname=''
362
368
  )
363
369
 
@@ -150,7 +150,7 @@ class InstallationProxyService(LockdownService):
150
150
 
151
151
  @str_to_path('package_path')
152
152
  def install_from_local(self, package_path: Path, cmd: str = 'Install', options: Optional[dict] = None,
153
- handler: Callable = None, *args) -> None:
153
+ handler: Callable = None, developer: bool = False, *args) -> None:
154
154
  """ upload given ipa/ipcc onto device and install it """
155
155
  ipcc_mode = package_path.suffix == '.ipcc'
156
156
 
@@ -167,6 +167,9 @@ class InstallationProxyService(LockdownService):
167
167
  # treat as ipa
168
168
  ipa_contents = package_path.read_bytes()
169
169
 
170
+ if developer:
171
+ options['PackageType'] = 'Developer'
172
+
170
173
  with AfcService(self.lockdown) as afc:
171
174
  if not ipcc_mode:
172
175
  afc.makedirs(TEMP_REMOTE_BASEDIR)
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env python3
2
2
  import dataclasses
3
+ import logging
3
4
  import plistlib
4
5
  import xml.etree.ElementTree as ET
5
6
  from contextlib import closing
@@ -54,13 +55,20 @@ class MobileActivationService:
54
55
 
55
56
  def __init__(self, lockdown: LockdownServiceProvider) -> None:
56
57
  self.lockdown = lockdown
58
+ self.logger = logging.getLogger(__name__)
57
59
 
58
60
  @property
59
61
  def state(self):
60
- return self.send_command('GetActivationStateRequest')['Value']
62
+ try:
63
+ return self.send_command('GetActivationStateRequest')['Value']
64
+ except:
65
+ return self.lockdown.get_value(key='ActivationState')
61
66
 
62
67
  def wait_for_activation_session(self):
63
- blob = self.create_activation_session_info()
68
+ try:
69
+ blob = self.create_activation_session_info()
70
+ except:
71
+ return
64
72
  handshake_request_message = blob['HandshakeRequestMessage']
65
73
  while handshake_request_message == blob['HandshakeRequestMessage']:
66
74
  blob = self.create_activation_session_info()
@@ -81,40 +89,88 @@ class MobileActivationService:
81
89
  return ActivationForm(title=title, description=description, fields=fields, server_info=server_info)
82
90
 
83
91
  def activate(self, skip_apple_id_query: bool = False) -> None:
84
- blob = self.create_activation_session_info()
92
+ if self.state != 'Unactivated':
93
+ self.logger.error(f'Device is already activated!')
94
+ return
95
+
96
+ try:
97
+ blob = self.create_activation_session_info()
98
+ session_mode = True
99
+ except:
100
+ session_mode = False
85
101
 
86
102
  # create drmHandshake request with blob from device
87
103
  headers = {'Content-Type': 'application/x-apple-plist'}
88
104
  headers.update(DEFAULT_HEADERS)
89
- content, headers = self.post(ACTIVATION_DRM_HANDSHAKE_DEFAULT_URL, data=plistlib.dumps(blob), headers=headers)
90
-
91
- activation_info = self.create_activation_info_with_session(content)
92
-
93
- content, headers = self.post(ACTIVATION_DEFAULT_URL, data={'activation-info': plistlib.dumps(activation_info)})
105
+ if session_mode:
106
+ content, headers = self.post(ACTIVATION_DRM_HANDSHAKE_DEFAULT_URL, data=plistlib.dumps(blob), headers=headers)
107
+
108
+ activation_request = {}
109
+ if session_mode:
110
+ activation_info = self.create_activation_info_with_session(content)
111
+ else:
112
+ activation_info = self.lockdown.get_value(key='ActivationInfo')
113
+ activation_request.update({'InStoreActivation': False, 'AppleSerialNumber': self.lockdown.get_value(key='SerialNumber')})
114
+ if self.lockdown.all_values.get('TelephonyCapability'):
115
+ req_pair = {'IMEI': 'InternationalMobileEquipmentIdentity',
116
+ 'MEID': 'MobileEquipmentIdentifier',
117
+ 'IMSI': 'InternationalMobileSubscriberIdentity',
118
+ 'ICCID': 'IntegratedCircuitCardIdentity'}
119
+
120
+ for k, v in req_pair.items():
121
+ lv = self.lockdown.all_values.get(v)
122
+ if lv is not None:
123
+ activation_request.update({k: lv})
124
+ continue
125
+ else:
126
+ self.logger.warn(f'Unable to get {k} from lockdownd')
127
+ if k == 'MEID' and has_meid:
128
+ # Something is wrong if both IMEI & MEID is missing
129
+ raise MobileActivationException('Unable to obtain both IMEI and MEID')
130
+
131
+ # Either IMEI or MEID, or both
132
+ if k == 'IMEI':
133
+ has_meid = lv is None
134
+ activation_request.update({'activation-info': plistlib.dumps(activation_info)})
135
+
136
+ content, headers = self.post(ACTIVATION_DEFAULT_URL, data=activation_request)
94
137
  content_type = headers['Content-Type']
95
138
 
96
139
  if content_type == 'application/x-buddyml':
97
140
  if skip_apple_id_query:
98
141
  raise MobileActivationException('Device is iCloud locked')
99
- activation_form = self._get_activation_form_from_response(content.decode())
100
- click.secho(activation_form.title, bold=True)
101
- click.secho(activation_form.description)
102
- fields = []
103
- for field in activation_form.fields:
104
- if field.secure:
105
- fields.append(inquirer3.Password(name=field.id, message=f'{field.label}'))
106
- else:
107
- fields.append(inquirer3.Text(name=field.id, message=f'{field.label}'))
108
- data = inquirer3.prompt(fields)
109
- data.update(activation_form.server_info)
110
- content, headers = self.post(ACTIVATION_DEFAULT_URL, data=data)
111
- content_type = headers['Content-Type']
142
+ try:
143
+ activation_form = self._get_activation_form_from_response(content.decode())
144
+ except:
145
+ raise MobileActivationException('Activation server response is invalid')
146
+ else:
147
+ click.secho(activation_form.title, bold=True)
148
+ click.secho(activation_form.description)
149
+ fields = []
150
+ for field in activation_form.fields:
151
+ if field.secure:
152
+ fields.append(inquirer3.Password(name=field.id, message=f'{field.label}'))
153
+ else:
154
+ fields.append(inquirer3.Text(name=field.id, message=f'{field.label}'))
155
+ data = inquirer3.prompt(fields)
156
+ data.update(activation_form.server_info)
157
+ content, headers = self.post(ACTIVATION_DEFAULT_URL, data=data)
158
+ content_type = headers['Content-Type']
112
159
 
113
160
  assert content_type == 'text/xml'
114
- self.activate_with_session(content, headers)
161
+ if session_mode:
162
+ self.activate_with_session(content, headers)
163
+ else:
164
+ self.activate_with_lockdown(content)
165
+
166
+ # set ActivationStateAcknowledged if we succeeded
167
+ self.lockdown.set_value(True, key='ActivationStateAcknowledged')
115
168
 
116
169
  def deactivate(self):
117
- return self.send_command('DeactivateRequest')
170
+ try:
171
+ return self.send_command('DeactivateRequest')
172
+ except:
173
+ return self.lockdown._request('Deactivate')
118
174
 
119
175
  def create_activation_session_info(self):
120
176
  response = self.send_command('CreateTunnel1SessionInfoRequest')
@@ -130,6 +186,16 @@ class MobileActivationService:
130
186
  raise MobileActivationException(f'Mobile activation can not be done due to: {response}')
131
187
  return response['Value']
132
188
 
189
+ def activate_with_lockdown(self, activation_record):
190
+ record = plistlib.loads(activation_record)
191
+ node = record.get('iphone-activation')
192
+ if node is None:
193
+ node = record.get('device-activation')
194
+ if node is None:
195
+ raise MobileActivationException('Activation record received is invalid')
196
+
197
+ self.lockdown._request('Activate', {'ActivationRecord': node.get('activation-record')})
198
+
133
199
  def activate_with_session(self, activation_record, headers):
134
200
  data = {
135
201
  'Command': 'HandleActivationInfoWithSessionRequest',
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pymobiledevice3
3
- Version: 4.22.1
3
+ Version: 4.24.0
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>
@@ -75,6 +75,7 @@ Dynamic: license-file
75
75
  [![Pypi version](https://img.shields.io/pypi/v/pymobiledevice3.svg)](https://pypi.org/project/pymobiledevice3/ "PyPi package")
76
76
  [![Downloads](https://static.pepy.tech/personalized-badge/pymobiledevice3?period=total&units=none&left_color=grey&right_color=blue&left_text=Downloads)](https://pepy.tech/project/pymobiledevice3)
77
77
  [![Discord](https://img.shields.io/discord/1133265168051208214?logo=Discord&label=Discord)](https://discord.gg/52mZGC3JXJ)
78
+ [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/doronz88/pymobiledevice3)
78
79
  <!-- markdownlint-enable MD013 -->
79
80
 
80
81
  - [PyMobileDevice3](#pymobiledevice3)