pymobiledevice3 7.0.3__py3-none-any.whl → 7.0.5__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.
- pymobiledevice3/_version.py +2 -2
- pymobiledevice3/cli/developer/dvt/__init__.py +59 -8
- pymobiledevice3/services/lockdown_service.py +12 -9
- {pymobiledevice3-7.0.3.dist-info → pymobiledevice3-7.0.5.dist-info}/METADATA +1 -1
- {pymobiledevice3-7.0.3.dist-info → pymobiledevice3-7.0.5.dist-info}/RECORD +9 -9
- {pymobiledevice3-7.0.3.dist-info → pymobiledevice3-7.0.5.dist-info}/WHEEL +0 -0
- {pymobiledevice3-7.0.3.dist-info → pymobiledevice3-7.0.5.dist-info}/entry_points.txt +0 -0
- {pymobiledevice3-7.0.3.dist-info → pymobiledevice3-7.0.5.dist-info}/licenses/LICENSE +0 -0
- {pymobiledevice3-7.0.3.dist-info → pymobiledevice3-7.0.5.dist-info}/top_level.txt +0 -0
pymobiledevice3/_version.py
CHANGED
|
@@ -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.0.
|
|
32
|
-
__version_tuple__ = version_tuple = (7, 0,
|
|
31
|
+
__version__ = version = '7.0.5'
|
|
32
|
+
__version_tuple__ = version_tuple = (7, 0, 5)
|
|
33
33
|
|
|
34
34
|
__commit_id__ = commit_id = None
|
|
@@ -3,13 +3,13 @@ import logging
|
|
|
3
3
|
import os
|
|
4
4
|
import posixpath
|
|
5
5
|
import shlex
|
|
6
|
-
import signal
|
|
7
6
|
from datetime import datetime
|
|
7
|
+
from enum import IntEnum
|
|
8
8
|
from pathlib import Path
|
|
9
9
|
from typing import Annotated, NamedTuple, Optional
|
|
10
10
|
|
|
11
11
|
import typer
|
|
12
|
-
from click.exceptions import MissingParameter, UsageError
|
|
12
|
+
from click.exceptions import BadParameter, MissingParameter, UsageError
|
|
13
13
|
from typer_injector import InjectingTyper
|
|
14
14
|
|
|
15
15
|
from pymobiledevice3.cli.cli_common import ServiceProviderDep, print_json, user_requested_colored_output
|
|
@@ -80,22 +80,73 @@ def applist(service_provider: ServiceProviderDep) -> None:
|
|
|
80
80
|
print_json(apps)
|
|
81
81
|
|
|
82
82
|
|
|
83
|
+
class Signals(IntEnum):
|
|
84
|
+
"""Platform-independent version of `signal.Signals`, allowing names to be used on Windows."""
|
|
85
|
+
|
|
86
|
+
HUP = 1
|
|
87
|
+
INT = 2
|
|
88
|
+
QUIT = 3
|
|
89
|
+
ILL = 4
|
|
90
|
+
TRAP = 5
|
|
91
|
+
ABRT = 6
|
|
92
|
+
EMT = 7
|
|
93
|
+
FPE = 8
|
|
94
|
+
KILL = 9
|
|
95
|
+
BUS = 10
|
|
96
|
+
SEGV = 11
|
|
97
|
+
SYS = 12
|
|
98
|
+
PIPE = 13
|
|
99
|
+
ALRM = 14
|
|
100
|
+
TERM = 15
|
|
101
|
+
URG = 16
|
|
102
|
+
STOP = 17
|
|
103
|
+
TSTP = 18
|
|
104
|
+
CONT = 19
|
|
105
|
+
CHLD = 20
|
|
106
|
+
TTIN = 21
|
|
107
|
+
TTOU = 22
|
|
108
|
+
IO = 23
|
|
109
|
+
XCPU = 24
|
|
110
|
+
XFSZ = 25
|
|
111
|
+
VTALRM = 26
|
|
112
|
+
PROF = 27
|
|
113
|
+
WINCH = 28
|
|
114
|
+
INFO = 29
|
|
115
|
+
USR1 = 30
|
|
116
|
+
USR2 = 31
|
|
117
|
+
|
|
118
|
+
|
|
83
119
|
@cli.command("signal")
|
|
84
120
|
def send_signal(
|
|
85
121
|
service_provider: ServiceProviderDep,
|
|
86
122
|
pid: int,
|
|
87
|
-
sig:
|
|
123
|
+
sig: Annotated[
|
|
124
|
+
Optional[int],
|
|
125
|
+
typer.Argument(),
|
|
126
|
+
] = None,
|
|
88
127
|
signal_name: Annotated[
|
|
89
|
-
Optional[
|
|
128
|
+
Optional[str],
|
|
90
129
|
typer.Option("--signal-name", "-s"),
|
|
91
130
|
] = None,
|
|
92
131
|
) -> None:
|
|
93
132
|
"""Send a signal to a PID (choose numeric SIG or --signal-name)."""
|
|
94
|
-
if not
|
|
95
|
-
raise MissingParameter(param_type="argument|option", param_hint="'SIG|SIGNAL-NAME'")
|
|
96
|
-
if sig and signal_name:
|
|
133
|
+
if sig is not None and signal_name is not None:
|
|
97
134
|
raise UsageError(message="Cannot give SIG and SIGNAL-NAME together")
|
|
98
|
-
|
|
135
|
+
|
|
136
|
+
if signal_name is not None:
|
|
137
|
+
normalized_signal_name = signal_name.upper().removeprefix("SIG")
|
|
138
|
+
try:
|
|
139
|
+
sig = Signals[normalized_signal_name]
|
|
140
|
+
except KeyError:
|
|
141
|
+
raise BadParameter(f"{signal_name!r} is not a valid signal") from None
|
|
142
|
+
elif sig is not None:
|
|
143
|
+
try:
|
|
144
|
+
sig = Signals(sig)
|
|
145
|
+
except ValueError:
|
|
146
|
+
raise BadParameter(f"{sig} is not a valid signal") from None
|
|
147
|
+
else:
|
|
148
|
+
raise MissingParameter(param_type="argument|option", param_hint="'SIG|SIGNAL-NAME'")
|
|
149
|
+
|
|
99
150
|
with DvtSecureSocketProxyService(lockdown=service_provider) as dvt:
|
|
100
151
|
ProcessControl(dvt).signal(pid, sig)
|
|
101
152
|
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import logging
|
|
2
|
+
from typing import Optional
|
|
3
|
+
|
|
4
|
+
from typing_extensions import Self
|
|
2
5
|
|
|
3
6
|
from pymobiledevice3.lockdown_service_provider import LockdownServiceProvider
|
|
4
7
|
from pymobiledevice3.service_connection import ServiceConnection
|
|
@@ -9,10 +12,10 @@ class LockdownService:
|
|
|
9
12
|
self,
|
|
10
13
|
lockdown: LockdownServiceProvider,
|
|
11
14
|
service_name: str,
|
|
12
|
-
is_developer_service=False,
|
|
13
|
-
service: ServiceConnection = None,
|
|
15
|
+
is_developer_service: bool = False,
|
|
16
|
+
service: Optional[ServiceConnection] = None,
|
|
14
17
|
include_escrow_bag: bool = False,
|
|
15
|
-
):
|
|
18
|
+
) -> None:
|
|
16
19
|
"""
|
|
17
20
|
:param lockdown: server provider
|
|
18
21
|
:param service_name: wrapped service name - will attempt
|
|
@@ -26,15 +29,15 @@ class LockdownService:
|
|
|
26
29
|
)
|
|
27
30
|
service = start_service(service_name, include_escrow_bag=include_escrow_bag)
|
|
28
31
|
|
|
29
|
-
self.service_name = service_name
|
|
30
|
-
self.lockdown = lockdown
|
|
31
|
-
self.service = service
|
|
32
|
-
self.logger = logging.getLogger(self.__module__)
|
|
32
|
+
self.service_name: str = service_name
|
|
33
|
+
self.lockdown: LockdownServiceProvider = lockdown
|
|
34
|
+
self.service: ServiceConnection = service
|
|
35
|
+
self.logger: logging.Logger = logging.getLogger(self.__module__)
|
|
33
36
|
|
|
34
|
-
def __enter__(self):
|
|
37
|
+
def __enter__(self) -> Self:
|
|
35
38
|
return self
|
|
36
39
|
|
|
37
|
-
async def __aenter__(self) ->
|
|
40
|
+
async def __aenter__(self) -> Self:
|
|
38
41
|
return self
|
|
39
42
|
|
|
40
43
|
def __exit__(self, exc_type, exc_val, exc_tb):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pymobiledevice3
|
|
3
|
-
Version: 7.0.
|
|
3
|
+
Version: 7.0.5
|
|
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=
|
|
11
|
+
pymobiledevice3/_version.py,sha256=WJuixg_NS-oLpH_J7_z3c_78bx6U354iFdeP7AZgxwM,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=
|
|
60
|
+
pymobiledevice3/cli/developer/dvt/__init__.py,sha256=DrmpUNrx0xGLJcs6npYoWpbymmvNHo7aaT7ml2HBdXk,15730
|
|
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
|
|
@@ -127,7 +127,7 @@ pymobiledevice3/services/heartbeat.py,sha256=X2jGCaJV1b_T1TyqZh09-DaK6zw00M9hmXp
|
|
|
127
127
|
pymobiledevice3/services/house_arrest.py,sha256=mjpojdZ0tiGpKV00BogjM9L85lMHiFonNU7J639m8VA,1655
|
|
128
128
|
pymobiledevice3/services/idam.py,sha256=knkP6EEYh8J0QI36M4ik86t2PFM6_JxabjJagLHV8iI,834
|
|
129
129
|
pymobiledevice3/services/installation_proxy.py,sha256=MIWdB6CYEEeG5eGcciHu2wvtn_vPJ2e5s47biMbkaYA,11619
|
|
130
|
-
pymobiledevice3/services/lockdown_service.py,sha256=
|
|
130
|
+
pymobiledevice3/services/lockdown_service.py,sha256=YRendifSVgXnODHwKhKZRpBKSi7ChSlFZuTJaMzEzP0,1684
|
|
131
131
|
pymobiledevice3/services/misagent.py,sha256=CGh1EhN_f1rV9RhZfP53OBirXdY0elX_nZS-fhMbiPk,1937
|
|
132
132
|
pymobiledevice3/services/mobile_activation.py,sha256=0zvQn2CMmf47--OtDqv3eOK5Ofu-eBw-ab1TxZSrOlY,9230
|
|
133
133
|
pymobiledevice3/services/mobile_config.py,sha256=2UmdqYNikznxI6bA2lkyIWS3NcHg3pTb5i6yLl8yZAY,18170
|
|
@@ -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.0.
|
|
184
|
-
pymobiledevice3-7.0.
|
|
185
|
-
pymobiledevice3-7.0.
|
|
186
|
-
pymobiledevice3-7.0.
|
|
187
|
-
pymobiledevice3-7.0.
|
|
188
|
-
pymobiledevice3-7.0.
|
|
183
|
+
pymobiledevice3-7.0.5.dist-info/licenses/LICENSE,sha256=jOtLnuWt7d5Hsx6XXB2QxzrSe2sWWh3NgMfFRetluQM,35147
|
|
184
|
+
pymobiledevice3-7.0.5.dist-info/METADATA,sha256=tmnh776GsP0XdyMtPAll2ZYee8yeXII7-Ur_tXtRgG4,17500
|
|
185
|
+
pymobiledevice3-7.0.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
186
|
+
pymobiledevice3-7.0.5.dist-info/entry_points.txt,sha256=jJMlOanHlVwUxcY__JwvKeWPrvBJr_wJyEq4oHIZNKE,66
|
|
187
|
+
pymobiledevice3-7.0.5.dist-info/top_level.txt,sha256=MjZoRqcWPOh5banG-BbDOnKEfsS3kCxqV9cv-nzyg2Q,21
|
|
188
|
+
pymobiledevice3-7.0.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|