pymobiledevice3 7.1.0__py3-none-any.whl → 7.2.0__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.
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
28
28
  commit_id: COMMIT_ID
29
29
  __commit_id__: COMMIT_ID
30
30
 
31
- __version__ = version = '7.1.0'
32
- __version_tuple__ = version_tuple = (7, 1, 0)
31
+ __version__ = version = '7.2.0'
32
+ __version_tuple__ = version_tuple = (7, 2, 0)
33
33
 
34
34
  __commit_id__ = commit_id = None
@@ -166,46 +166,49 @@ def process_id_for_bundle_id(service_provider: ServiceProviderDep, app_bundle_id
166
166
 
167
167
 
168
168
  def get_matching_processes(
169
- service_provider: ServiceProviderDep,
169
+ device_info: DeviceInfo,
170
170
  name: Optional[str] = None,
171
171
  bundle_identifier: Optional[str] = None,
172
172
  ) -> list[MatchedProcessByPid]:
173
173
  result: list[MatchedProcessByPid] = []
174
- with DvtSecureSocketProxyService(lockdown=service_provider) as dvt:
175
- device_info = DeviceInfo(dvt)
176
- for process in device_info.proclist():
177
- current_name = process["name"]
178
- current_bundle_identifier = process.get("bundleIdentifier", "")
179
- pid = process["pid"]
180
- if (bundle_identifier is not None and bundle_identifier in current_bundle_identifier) or (
181
- name is not None and name in current_name
182
- ):
183
- result.append(MatchedProcessByPid(name=current_name, pid=pid))
174
+ for process in device_info.proclist():
175
+ current_name = process["name"]
176
+ current_bundle_identifier = process.get("bundleIdentifier", "")
177
+ pid = process["pid"]
178
+ if (bundle_identifier is not None and bundle_identifier in current_bundle_identifier) or (
179
+ name is not None and name in current_name
180
+ ):
181
+ result.append(MatchedProcessByPid(name=current_name, pid=pid))
184
182
  return result
185
183
 
186
184
 
187
185
  @cli.command("pkill")
188
186
  def pkill(
189
187
  service_provider: ServiceProviderDep,
190
- expression: str,
188
+ expressions: Annotated[
189
+ list[str],
190
+ typer.Argument(help="One or more process-name (or bundle id) expressions to match."),
191
+ ],
191
192
  bundle: Annotated[
192
193
  bool,
193
- typer.Option(help="Treat given expression as a bundle-identifier instead of a process name"),
194
+ typer.Option(help="Treat given expressions as bundle-identifiers instead of process names"),
194
195
  ] = False,
195
196
  ) -> None:
196
- """Kill all processes containing `expression` in their name."""
197
- matching_name = expression if not bundle else None
198
- matching_bundle_identifier = expression if bundle else None
199
- matching_processes = get_matching_processes(
200
- service_provider, name=matching_name, bundle_identifier=matching_bundle_identifier
201
- )
202
-
197
+ """Kill all processes containing each expression in their name."""
203
198
  with DvtSecureSocketProxyService(lockdown=service_provider) as dvt:
199
+ device_info = DeviceInfo(dvt)
204
200
  process_control = ProcessControl(dvt)
205
201
 
206
- for process in matching_processes:
207
- logger.info(f"killing {process.name}({process.pid})")
208
- process_control.kill(process.pid)
202
+ for expression in expressions:
203
+ matching_name = expression if not bundle else None
204
+ matching_bundle_identifier = expression if bundle else None
205
+ matching_processes = get_matching_processes(
206
+ device_info, name=matching_name, bundle_identifier=matching_bundle_identifier
207
+ )
208
+
209
+ for process in matching_processes:
210
+ logger.info(f"Killing {process.name}({process.pid})")
211
+ process_control.kill(process.pid)
209
212
 
210
213
 
211
214
  @cli.command("launch")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pymobiledevice3
3
- Version: 7.1.0
3
+ Version: 7.2.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>
@@ -8,7 +8,7 @@ misc/understanding_idevice_protocol_layers.md,sha256=FMJQ-ik2j9kFLPS15JzDZg62uk1
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=Ogsyro4MUVVSciEtg8kZufL81AHcjuphItnaL0BT10Q,16386
11
- pymobiledevice3/_version.py,sha256=hoQMYVAGxOg65i7V5PoVLpY46qxSMJVk6GEsfI-0lRI,704
11
+ pymobiledevice3/_version.py,sha256=6mGK2LZkwfh2g3gBQlsvmTFN5vd5BUVAxvH1FvJwE4I,704
12
12
  pymobiledevice3/bonjour.py,sha256=lmx3uCaiolF59AieftmTKqktNod5ZDyJ06oRZdYKHSE,13681
13
13
  pymobiledevice3/ca.py,sha256=5_Y4F-zDFX_KeDL-M_TRCKKyrRRb9h1lBE8MGTWv91o,10606
14
14
  pymobiledevice3/common.py,sha256=FZzF0BQYV5fCEUPbLo6jbt2Ig9s5YwR8AvX_iR124Ew,329
@@ -57,7 +57,7 @@ pymobiledevice3/cli/developer/fetch_symbols.py,sha256=57HzVyUJPXL_I8EiqWArJ2Fczb
57
57
  pymobiledevice3/cli/developer/simulate_location.py,sha256=IVJQPYKUrQcsdpCxf2D2sgy6Nb3mUOFvK-Og_y5lfDM,1555
58
58
  pymobiledevice3/cli/developer/accessibility/__init__.py,sha256=VpJSdnkEZhUuJXWy08wqgqObXv1PgZ2Ht4qy-560QRk,2271
59
59
  pymobiledevice3/cli/developer/accessibility/settings.py,sha256=QKgQ7XK6LNrlE-1nnWVGL2Mix385Huf-diptgY91apA,1170
60
- pymobiledevice3/cli/developer/dvt/__init__.py,sha256=DrmpUNrx0xGLJcs6npYoWpbymmvNHo7aaT7ml2HBdXk,15730
60
+ pymobiledevice3/cli/developer/dvt/__init__.py,sha256=N2IZJR6pYerLtzCsNQL8TTSy6X1ktduLuYDT0Ld5tIo,15828
61
61
  pymobiledevice3/cli/developer/dvt/core_profile_session.py,sha256=Ni6znP0mg-XKLu0aXm8ZZDEKziKokQYMjwbTu2TzFxk,9968
62
62
  pymobiledevice3/cli/developer/dvt/simulate_location.py,sha256=QLjjllbjuM205joFlRXdo7cIjvkFdXJ2f5pKzT9sHOY,1816
63
63
  pymobiledevice3/cli/developer/dvt/sysmon/__init__.py,sha256=PSTruXzQQLGvVuc1j7aKEafXFYgFMOCuNiMjbtDqKrM,2283
@@ -180,9 +180,9 @@ pymobiledevice3/services/web_protocol/switch_to.py,sha256=TCdVrMfsvd18o-vZ0owVrE
180
180
  pymobiledevice3/tunneld/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
181
181
  pymobiledevice3/tunneld/api.py,sha256=Lwl1OdhPTgX6Zqezy8T4dEcXRfaEPwyGNClioTx3fUc,2338
182
182
  pymobiledevice3/tunneld/server.py,sha256=dMEZAv_X-76l0vSalpq4x0IVkbE-MNGR77T-u1TiHuE,25752
183
- pymobiledevice3-7.1.0.dist-info/licenses/LICENSE,sha256=jOtLnuWt7d5Hsx6XXB2QxzrSe2sWWh3NgMfFRetluQM,35147
184
- pymobiledevice3-7.1.0.dist-info/METADATA,sha256=p_l-eHzSpqafrRTx3bUX1_OZEK_Af0-Mtfm34H6RFcw,17500
185
- pymobiledevice3-7.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
186
- pymobiledevice3-7.1.0.dist-info/entry_points.txt,sha256=jJMlOanHlVwUxcY__JwvKeWPrvBJr_wJyEq4oHIZNKE,66
187
- pymobiledevice3-7.1.0.dist-info/top_level.txt,sha256=MjZoRqcWPOh5banG-BbDOnKEfsS3kCxqV9cv-nzyg2Q,21
188
- pymobiledevice3-7.1.0.dist-info/RECORD,,
183
+ pymobiledevice3-7.2.0.dist-info/licenses/LICENSE,sha256=jOtLnuWt7d5Hsx6XXB2QxzrSe2sWWh3NgMfFRetluQM,35147
184
+ pymobiledevice3-7.2.0.dist-info/METADATA,sha256=YusNp-ay7Vex8lHFZBXuHoN8PQQzQnIO-kXyl16qq6s,17500
185
+ pymobiledevice3-7.2.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
186
+ pymobiledevice3-7.2.0.dist-info/entry_points.txt,sha256=jJMlOanHlVwUxcY__JwvKeWPrvBJr_wJyEq4oHIZNKE,66
187
+ pymobiledevice3-7.2.0.dist-info/top_level.txt,sha256=MjZoRqcWPOh5banG-BbDOnKEfsS3kCxqV9cv-nzyg2Q,21
188
+ pymobiledevice3-7.2.0.dist-info/RECORD,,