FButros / pyioslocationsimulator

A Python script and executable for simulating the GPS location of an iOS 17 device connected to your computer using pymobiledevice3. Provides a user-friendly GUI to set longitude and latitude coordinates.
MIT License
8 stars 3 forks source link

ios 17.2.1 doesn't work for either using proxy or non-proxy #1

Open lyzsk opened 5 months ago

lyzsk commented 5 months ago

Hi, I tried running the main.py in Windows10 enviornment with iTunes && .NET 8.0 installed, and my mobile enviornment is IOS 17.2.1

if I running with no proxy on both laptop and iPthone with your original code:

    try:
        global host, port
        host = get_host_ip()
        logging.info(f"Detected host IP: {host}")

        port = find_free_port()
        logging.info(f"Using free port: {port}")

I have this error:

ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it
ERROR:root:Error running command: Command '['pymobiledevice3', 'developer', 'dvt', 'simulate-location', 'set', '--rsd', 'xxx.xxx.x.x', 'xxxx', '--', 'logitude i set', 'latitude i set']' returned non-zero exit status 1.

so I tried to set the host and port to fixed value with my proxy, and I changed the code:

    try:
        global host, port
        host = '127.0.0.1'
        logging.info(f"Detected host IP: {host}")

        port = my_proxy_port
        logging.info(f"Using free port: {port}")

and I can have successfully set the location in GUI,

Snipaste_2024-01-20_18-26-27

However in terminal log I got Device was disconnected error, and in fact I can't locate the location to where I desired in my iPhone:

2024-01-20 18:25:11 LAPTOP-XXX pymobiledevice3.__main__[11132] ERROR Device was disconnected

I tried to solve the issue in pymobiledevice3 code, I found only the error about it is raise ConnectionAbortedError(), if chunk is None or len(chunk) == 0:, but I don't know how to fix it, can you help me? thank u.

lyzsk commented 5 months ago

by the way, here is my conda list:

aiofiles                  23.2.1                   pypi_0    pypi
annotated-types           0.6.0                    pypi_0    pypi
ansicon                   1.89.0                   pypi_0    pypi
anyio                     4.2.0                    pypi_0    pypi
arrow                     1.3.0                    pypi_0    pypi
asn1                      2.7.0                    pypi_0    pypi
asttokens                 2.4.1                    pypi_0    pypi
async-timeout             4.0.3                    pypi_0    pypi
blessed                   1.20.0                   pypi_0    pypi
bpylist2                  4.1.1                    pypi_0    pypi
bzip2                     1.0.8                he774522_0
ca-certificates           2023.12.12           haa95532_0
cached-property           1.5.2                    pypi_0    pypi
certifi                   2023.11.17               pypi_0    pypi
cffi                      1.16.0                   pypi_0    pypi
charset-normalizer        3.3.2                    pypi_0    pypi
click                     8.1.7                    pypi_0    pypi
colorama                  0.4.6                    pypi_0    pypi
coloredlogs               15.0.1                   pypi_0    pypi
construct                 2.10.70                  pypi_0    pypi
cryptography              41.0.7                   pypi_0    pypi
daemonize                 2.5.0                    pypi_0    pypi
decorator                 5.1.1                    pypi_0    pypi
developer-disk-image      0.0.2                    pypi_0    pypi
dnspython                 2.4.2                    pypi_0    pypi
email-validator           2.1.0.post1              pypi_0    pypi
enum-compat               0.0.3                    pypi_0    pypi
exceptiongroup            1.2.0                    pypi_0    pypi
executing                 2.0.1                    pypi_0    pypi
fastapi                   0.109.0                  pypi_0    pypi
gpxpy                     1.5.0                    pypi_0    pypi
h11                       0.14.0                   pypi_0    pypi
hexdump                   3.3                      pypi_0    pypi
httpcore                  1.0.2                    pypi_0    pypi
httptools                 0.6.1                    pypi_0    pypi
httpx                     0.26.0                   pypi_0    pypi
humanfriendly             10.0                     pypi_0    pypi
hyperframe                6.0.1                    pypi_0    pypi
idna                      3.6                      pypi_0    pypi
ifaddr                    0.2.0                    pypi_0    pypi
inquirer3                 0.4.0                    pypi_0    pypi
ipsw-parser               1.2.1                    pypi_0    pypi
ipython                   8.20.0                   pypi_0    pypi
itsdangerous              2.1.2                    pypi_0    pypi
jedi                      0.19.1                   pypi_0    pypi
jinja2                    3.1.3                    pypi_0    pypi
jinxed                    1.2.1                    pypi_0    pypi
la-panic                  0.4.9                    pypi_0    pypi
libffi                    3.4.4                hd77b12b_0
markupsafe                2.1.4                    pypi_0    pypi
matplotlib-inline         0.1.6                    pypi_0    pypi
nest-asyncio              1.5.9                    pypi_0    pypi
opack                     0.1.0                    pypi_0    pypi
openssl                   1.1.1w               h2bbff1b_0
orjson                    3.9.12                   pypi_0    pypi
packaging                 23.2                     pypi_0    pypi
parameter-decorators      0.0.2                    pypi_0    pypi
parso                     0.8.3                    pypi_0    pypi
pillow                    10.2.0                   pypi_0    pypi
pip                       23.3.1          py310haa95532_0
plumbum                   1.8.2                    pypi_0    pypi
prompt-toolkit            3.0.43                   pypi_0    pypi
psutil                    5.9.8                    pypi_0    pypi
pure-eval                 0.2.2                    pypi_0    pypi
pycparser                 2.21                     pypi_0    pypi
pycrashreport             1.2.2                    pypi_0    pypi
pycryptodome              3.20.0                   pypi_0    pypi
pydantic                  2.5.3                    pypi_0    pypi
pydantic-core             2.14.6                   pypi_0    pypi
pydantic-extra-types      2.4.1                    pypi_0    pypi
pydantic-settings         2.1.0                    pypi_0    pypi
pygments                  2.17.2                   pypi_0    pypi
pygnuutils                0.1.1                    pypi_0    pypi
pyimg4                    0.8                      pypi_0    pypi
pykdebugparser            1.2.4                    pypi_0    pypi
pymobiledevice3           2.38.1                   pypi_0    pypi
pyreadline3               3.4.1                    pypi_0    pypi
python                    3.10.6               hbb2ffb3_1
python-dateutil           2.8.2                    pypi_0    pypi
python-dotenv             1.0.0                    pypi_0    pypi
python-editor             1.0.4                    pypi_0    pypi
python-multipart          0.0.6                    pypi_0    pypi
pyusb                     1.2.1                    pypi_0    pypi
pywin32                   306                      pypi_0    pypi
pyyaml                    6.0.1                    pypi_0    pypi
qh3                       0.14.0                   pypi_0    pypi
readchar                  4.0.5                    pypi_0    pypi
remotezip                 0.12.2                   pypi_0    pypi
requests                  2.31.0                   pypi_0    pypi
setuptools                68.2.2          py310haa95532_0
six                       1.16.0                   pypi_0    pypi
sniffio                   1.3.0                    pypi_0    pypi
sqlite                    3.41.2               h2bbff1b_0
srptools                  1.0.1                    pypi_0    pypi
sslpsk-pmd3               1.0.2                    pypi_0    pypi
stack-data                0.6.3                    pypi_0    pypi
starlette                 0.35.1                   pypi_0    pypi
tabulate                  0.9.0                    pypi_0    pypi
termcolor                 2.4.0                    pypi_0    pypi
tk                        8.6.12               h2bbff1b_0
tqdm                      4.66.1                   pypi_0    pypi
traitlets                 5.14.1                   pypi_0    pypi
types-python-dateutil     2.8.19.20240106          pypi_0    pypi
typing-extensions         4.9.0                    pypi_0    pypi
tzdata                    2023d                h04d1e81_0
ujson                     5.9.0                    pypi_0    pypi
urllib3                   2.1.0                    pypi_0    pypi
uvicorn                   0.26.0                   pypi_0    pypi
vc                        14.2                 h21ff451_1
vs2015_runtime            14.27.29016          h5e58377_2
watchfiles                0.21.0                   pypi_0    pypi
wcwidth                   0.2.13                   pypi_0    pypi
websockets                12.0                     pypi_0    pypi
wheel                     0.41.2          py310haa95532_0
wsproto                   1.2.0                    pypi_0    pypi
xonsh                     0.14.4                   pypi_0    pypi
xz                        5.4.5                h8cc25b3_0
zeroconf                  0.131.0                  pypi_0    pypi
zlib                      1.2.13               h8cc25b3_0