Schlaubischlump / LocationSimulator

MacOS application to spoof / fake / mock your iOS / iPadOS or iPhoneSimulator device location. WatchOS and TvOS are partially supported.
https://schlaubischlump.github.io/LocationSimulator/
GNU General Public License v3.0
2.39k stars 184 forks source link

[Feature] iOS 17 support #171

Open Schlaubischlump opened 1 year ago

Schlaubischlump commented 1 year ago

iOS 17 is currently not supported. I can give no ETA when it will be supported.

Problem: Automatic download and mounting of Developer Disk Images will not work with iOS 17. LocationSimulator should still work, if you mount the Personalized Developer Disk Image with Xcode first.

According to this issue and that iOS 17 changes how Developer Disk Images are handled. It is not clear if libimobiledevice will support these changes. It is also not clear if I will be able to support these changes and implement this new mechanism in LocationSimulator.

Please do not open multiple issues or ask for an eta in regards to iOS 17 support. I can only start working on this if libimobiledevice is updated to support iOS 17, which (if it happens at all) will be the case in September, when iOS 17 is out of beta and released to the public.

What can you do in the meantime ?

At the moment there is no workaround..

~~1. Install Xcode (Beta).

  1. Setup your device as development device.
  2. Let Xcode handle the new Personalized Developer Disk Image stuff automatically.
  3. Start using LocationSimulator. LocationSimulator should hopefully detect that a Developer Disk Image was already mounted by Xcode. That way, LocationSimulator does not need to handle the mounting of the Developer Disk Image itself.~~

Edit: I might consider migrating to MobileDevice.framework. That way I could support iOS 17 before libimobiledevice is updated. Although I might need to drop Catalina support in this case ? --- Does not work, because MobileDevice.framework does not support iOS 17 and CoreDevice is written in Swift and hard to reverse engineer.

Edit: Pymobiledevice3 works for iOS 17, but only over USB. Also using python in Swift is cumbersome and really slow, because python is slow by nature.

Edit 13.02.2024: There seems to be some progress going on over at go-ios. I think if they manage to finish adding iOS 17 support I can probably migrate my backend to use it with Gomobile. I keep an eye on that and still actively search for solutions to support iOS 17.

Edit 19.04.2024: There is an open pull request at https://github.com/danielpaulus/go-ios/pull/332. Once this is merged I should be able to work on iOS 17 support.

Dkla commented 8 months ago

Just one final note about kineses above: don't use python 3.12, it won't work. Use 3.11 or less.

It's a good temp fix until iFakeLocation gets back. Enjoy! :)

james-w-c commented 8 months ago

I got everything to work, but after step 6 The website doesn't load, and on terminal it says connetionerror even though i have wiifi. anyone know a solution?

james-w-c commented 8 months ago

I got everything to work, but after step 6 The website doesn't load, and on terminal it says connetionerror even though i have wiifi. anyone know a solution?

look here: https://github.com/doronz88/pymobiledevice3 and use the command to check if it is work sudo python3 -m pymobiledevice3 remote start-quic-tunnel

the output should be like this, Interface: utun6 RSD Address: fd7b:e5b:6f53::1 RSD Port: 64337 Use the follow connection option: --rsd fd7b:e5b:6f53::1 64337

Yeah this still doesn't work for me, none of that shows up. This is what i get instead:

Traceback (most recent call last): File "/Users/james/kinesis/main.py", line 84, in create_tunnel() File "/Users/james/kinesis/main.py", line 79, in create_tunnel asyncio.run(start_quic_tunnel(rsd)) File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/runners.py", line 190, in run return runner.run(main) ^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/runners.py", line 118, in run return self._loop.run_until_complete(task) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 650, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "/Users/james/kinesis/main.py", line 53, in start_quic_tunnel async with service.start_quic_tunnel(private_key) as tunnel_result: File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/contextlib.py", line 204, in aenter return await anext(self.gen) ^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pymobiledevice3/remote/core_device_tunnel_service.py", line 242, in start_quic_tunnel async with aioquic_connect( File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/contextlib.py", line 204, in aenter return await anext(self.gen) ^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/qh3/asyncio/client.py", line 97, in connect await protocol.wait_connected() File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/qh3/asyncio/protocol.py", line 127, in wait_connected await asyncio.shield(self._connected_waiter) ConnectionError

marvinjoa commented 8 months ago

I'd appriciate if you guys (@james-w-c, @relaxhuang, @Dkla, and the others) would discuss issues/guidance in the appropriate repository. This repository is just for @Schlaubischlump's app. This is not a helpdesk for pymobiledevice3...

nabilhayek commented 8 months ago

I've experimented with various location simulators like AnyGo and Kinesis, among others.

pymobiledevice3, the underlying tool that powers Kinesis (available at https://github.com/Siyuanw/kinesis), has proven to be the most effective so far. It provides instantaneous location change, unlike AnyGo, which occasionally experiences delays when trying to set a location.

However, I've noticed that with Kinesis, the simulated location tends to reset to the live position after approximately 3 hours, whereas AnyGo resets after around 30 minutes when the device is disconnected from the computer.

Seems like this is either software related issue of version related issue to iOS 17. When updating LocationSimulator please investigate if this problem occurs. LocationSimulator for versions earlier that iOS 17 seems to be working until device is restarted. Would be nice to continue to have this in updates for iOS 17 unlike other tools available to date.

Schlaubischlump commented 8 months ago

Various users have reported that the location is reset after a couple of hours even on iOS 16 and lower. I assume this is a hard limitation from apples side introduces around ~iOS 15.

idzuanidris commented 8 months ago

Edit: I might consider migrating to MobileDevice.framework. That way I could support iOS 17 before libimobiledevice is updated. Although I might need to drop Catalina support in this case ?

I think this is the best course for LocationSimulator. Eventually, people will have to update to Sonoma.

Other than that, your app is in my opinion more convenient than using html based connecting using localhost. I think pymobiledevice3 doesn't support Wi-Fi connection, correct me if I am wrong. This means my phone will charge when it's connecting through the cable and it gets very warm while playing at the same time. However, I appreciate all of the work that they have done.

marvinjoa commented 8 months ago

Various users have reported that the location is reset after a couple of hours even on iOS 16 and lower. I assume this is a hard limitation from apples side introduces around ~iOS 15.

To add to this: my 6s is on iOS 15.7.9 and the last time I opened LocationSimulator was around 30h ago and the location is still set. So this must've changed with iOS 16, cause my main iPhone on iOS 16 would reset after just a short period of time.

FreezaSama commented 8 months ago

Edit: I might consider migrating to MobileDevice.framework. That way I could support iOS 17 before libimobiledevice is updated. Although I might need to drop Catalina support in this case ?

I think this is the best course for LocationSimulator. Eventually, people will have to update to Sonoma.

Other than that, your app is in my opinion more convenient than using html based connecting using localhost. I think pymobiledevice3 doesn't support Wi-Fi connection, correct me if I am wrong. This means my phone will charge when it's connecting through the cable and it gets very warm while playing at the same time. However, I appreciate all of the work that they have done.

@Schlaubischlump 's app is superior in every way. I'm currently using an old iPad so I can continue using it.

Schlaubischlump commented 8 months ago

Thank you all for all the kind words :)

I hope that I have some time to work on LocationSimulator in November or December.

I keep an eye on facebook idb library, which is based on MobileDevice.framework. The actually have a sub-library to interact with the simulator and one to interact with iOS devices. It should also be backwards compatible to Catalina. The only problem is, that it is not yet updated for iOS 17, but I think facebook is interested in supporting iOS 17 for their on benefit. This would help me to avoid reverse engineering MobileDevice.framework myself.

shadowh4ck3r commented 8 months ago

The Kinesis works but the tool is not as powerful and unlimited as @Schlaubischlump locationSimulator tools... Been limitless is the goal and patience is the key @Schlaubischlump

shadowh4ck3r commented 8 months ago

Various users have reported that the location is reset after a couple of hours even on iOS 16 and lower. I assume this is a hard limitation from apples side introduces around ~iOS 15.

You just need to open the map application on your iPhone or iPad using iOS 15 to iOS 16, it should do the tricks for staying longer and the next day you can close the map app and the location simulation will still powered. Works for me thou

james-w-c commented 8 months ago

Does locationsimulator only work on ios 16 or later? I try using my ipad mini 4 with ios 15.7.9 and it gives me the enable developer mode error

Schlaubischlump commented 8 months ago

It should work for iOS 1 to iOS 16. This is strange, since iOS 15 has no DeveloperMode...

But please open a separate issue for this.

james-w-c commented 8 months ago

just opened an issue for it

guozidi commented 8 months ago

Look forward to your good news

Schlaubischlump commented 8 months ago

I looked more into this and sadly I got bad news. Apple hasn't integrated iOS 17 support in MobileDevice. It migrated everything to CoreDevice. CoreDevice is by far not as good documented as MobileDevice.

I'll probably wait until somebody provides sample code in any form that I can use, because I simply don't have the time to reverse engineer CoreDevice myself.

Probably the best chance is to wait until facebook updates idb. I can not estimate how long this will take. Probably not much will happen in the coming months...

I opened an issue on idb to see if facebook plans to support iOS 17

FreezaSama commented 8 months ago

thanks legend. it was a good run :')

daturadev commented 7 months ago

"It was a good run." APT's, for example: where there is a will, there is a way. This isn't a one-man mission at this point - use your skills. Contribute. Donate to @Schlaubischlump for consistently providing an open-source, free, extremely useful utility and pick up some slack. It's a pretty big set-back, nothing we haven't seen or dealt with before.

Stay positive, continue to contribute. I will be looking into this in the coming days, myself.

niroo96 commented 7 months ago

Same @thecodingcrow. I looked into it, but there appears to be a lack of instructions on how to execute it. Would be eager to give it a shot!

I can try and guide you guys through it.

  1. You will need to clone the github repository to your own machine. You can do this by either:

    • Having git installed, and running git clone https://github.com/Siyuanw/kinesis.git in your terminal.
    • Downloading the codebase as a zip file, by clicking the green <> Code button in the top right of the repository, and selecting Download ZIP.
  2. Make sure you have python and pip installed, if you don't, download the latest versions here and here.
  3. Open your terminal, and navigate to the codebase's directory. If you're not sure how to do that, you can find some information here.
  4. Once you have your terminal open at the correct directory, enter the following command: pip3 install -r requirements.txt. Let it install, this might take some time.
  5. Connect your device using USB.
  6. Run following command in the terminal:sudo python3 main.py. It will ask for your password of your computer, type it and hit enter. The program should now be running.
  7. Open a browser (chrome, firefox, safari, ...) and go to http://localhost:3000. If everything works correctly you should be seeing an interactive map.

How to get pass these errors? ERROR: Could not build wheels for pytun-pmd3, gnureadline, which is required to install pyproject.toml-based projects

Schlaubischlump commented 7 months ago

Please discuss pymobiledevice3 questions at the pymobiledevice3 peoject

niroo96 commented 7 months ago

Please discuss pymobiledevice3 questions at the pymobiledevice3 peoject

Apologies was able to resolve this myself but will keep this in mind going forward

Nathan-Molby commented 7 months ago

Are there any alternative libraries for iOS 17 that work?

Schlaubischlump commented 7 months ago

To my knowledge only pymobiledevice3 and that only works over USB and on macOS.

AGHiya23 commented 7 months ago

Same @thecodingcrow. I looked into it, but there appears to be a lack of instructions on how to execute it. Would be eager to give it a shot!

I can try and guide you guys through it.

  1. You will need to clone the github repository to your own machine. You can do this by either:

    • Having git installed, and running git clone https://github.com/Siyuanw/kinesis.git in your terminal.
    • Downloading the codebase as a zip file, by clicking the green <> Code button in the top right of the repository, and selecting Download ZIP.
  2. Make sure you have python and pip installed, if you don't, download the latest versions here and here.
  3. Open your terminal, and navigate to the codebase's directory. If you're not sure how to do that, you can find some information here.
  4. Once you have your terminal open at the correct directory, enter the following command: pip3 install -r requirements.txt. Let it install, this might take some time.
  5. Connect your device using USB.
  6. Run following command in the terminal:sudo python3 main.py. It will ask for your password of your computer, type it and hit enter. The program should now be running.
  7. Open a browser (chrome, firefox, safari, ...) and go to http://localhost:3000. If everything works correctly you should be seeing an interactive map.

Hello, I am stuck on the opening terminal to correct directory part, can you explain how to do this or what this is (I have little to no coding experience).

marvinjoa commented 7 months ago

@AGHiya23

Hello, I am stuck on the opening terminal to correct directory part, can you explain how to do this or what this is (I have little to no coding experience).

No support here, please ask in the Github of the project you're trying to set up. https://github.com/Siyuanw/kinesis

ani006 commented 7 months ago

Hi, Any solution for iOS 17 yet ?

relaxhuang commented 7 months ago

Hi @Schlaubischlump Can you help to look at this, it's a Personalised Image support fix way, does it can be used on your project? https://github.com/master131/iFakeLocation/commit/8b0944e891b54b55a9cceebc96c6f9182c4abbe0#diff-e7b0fdb022afee9685ff618e372aaa93555af02f4cd18ce4d32acf4a6dcd244d

Schlaubischlump commented 7 months ago

Thats only part of the solution. iFakeLocation does not support iOS 17 as well. You can upload the DeveloperDiskImage, but you can not fake the location.

Padma-Dev-E commented 7 months ago

@Schlaubischlump

image

https://fonesgo.com/location-changer/

this app works fine with ios 17 via USB shows error via wifi

Schlaubischlump commented 7 months ago

It probably uses pymobiledevice3, but hard to tell, since it's closed source

I would rather not integrate Python into the codebase. It makes things way more complicated and I'm not sure wether it's possible at all

n0vemB commented 6 months ago

@Schlaubischlump image https://fonesgo.com/location-changer/

this app works fine with ios 17 via USB shows error via wifi

not work on ios 17.2

chronolai commented 6 months ago

https://github.com/nexron171/SimVirtualLocation

work on iOS 17.2.1

RSD address & port

sudo python3 -m pymobiledevice3 remote start-tunnel
ieaksu commented 6 months ago

https://github.com/nexron171/SimVirtualLocation

work on iOS 17.2.1

RSD address & port

sudo python3 -m pymobiledevice3 remote start-tunnel

This works well on my iOS 17.2 but it only works for short distances. If the distance is longer than let's say 6-7 blocks, then it stops mocking the virtual location.

edit: It's not working well anymore. It's giving me an extremely long error

thecodingcrow commented 5 months ago

Damn this thread has blown up 😄

Just for the sake of adding to this clutter: https://github.com/Siyuanw/kinesis <- still works fine

The project got a nice polish recently and I managed to use it again today. Only thing I had to fix was a requirement

image

In the requirements.txt file make sure that it says eventlet==0.34.2 in line 3

For any further questions on this project I suggest you post in the kinesis repo or shoot me a dm on twitter: https://twitter.com/mental_luci

Einstein2150 commented 5 months ago

Damn this thread has blown up 😄

Just for the sake of adding to this clutter: https://github.com/Siyuanw/kinesis <- still works fine

The project got a nice polish recently and I managed to use it again today. Only thing I had to fix was a requirement image

In the requirements.txt file make sure that it says eventlet==0.34.2 in line 3

For any further questions on this project I suggest you post in the kinesis repo or shoot me a dm on twitter: https://twitter.com/mental_luci

Works still with 17.3

han-qiu commented 5 months ago

Damn this thread has blown up 😄

Just for the sake of adding to this clutter: https://github.com/Siyuanw/kinesis <- still works fine

The project got a nice polish recently and I managed to use it again today. Only thing I had to fix was a requirement image

In the requirements.txt file make sure that it says eventlet==0.34.2 in line 3

For any further questions on this project I suggest you post in the kinesis repo or shoot me a dm on twitter: https://twitter.com/mental_luci

Works with 17.5, amazing!

FreezaSama commented 4 months ago

It's true this works but not AT ALL as elegant as what @Schlaubischlump work of art

Damn this thread has blown up 😄 Just for the sake of adding to this clutter: https://github.com/Siyuanw/kinesis <- still works fine The project got a nice polish recently and I managed to use it again today. Only thing I had to fix was a requirement image In the requirements.txt file make sure that it says eventlet==0.34.2 in line 3 For any further questions on this project I suggest you post in the kinesis repo or shoot me a dm on twitter: https://twitter.com/mental_luci

Works with 17.5, amazing!

kartikthapar commented 3 months ago

I am slightly confused. How is Kinesis related to this?

R2-t commented 2 months ago

I am slightly confused. How is Kinesis related to this?

I'd say it's because people are looking for an alternative since this app may be deprecated.

Schlaubischlump commented 2 months ago

I'd say it's because people are looking for an alternative since this app may be deprecated.

Just to be clear, I haven't given up on this project. I still want to update it. My life has just become way busier the last couple of month...

Currently I'm waiting for a new release of go-ios, since that seems to be more realistic than libimobiledevice being updated. Last weekend I played around with the current version on the master branch that has partial iOS 17 support, but I couldn't get it to work for my iPhone. Whenever a new release is out, I start working on integrating it into LocationSimulator.

htlou commented 2 months ago

It seems that go-ios is currently supporting location simulation for ios17, as is shown in their recent pr?

stevehoek commented 2 months ago

I could not get kinesis to run on my Mac with Python 3.1.2, so I tried FonesGo Location Changer as mentioned above and it works very well, has a nice UX, etc. WiFi connection is not working "yet" on iOS 17, however.

Of course it is a paid app, so I'd love it if this app came back to life.

Schlaubischlump commented 2 months ago

It seems that go-ios is currently supporting location simulation for ios17, as is shown in their recent pr?

If you have time to play around and get it to work @htlou let me know! I downloaded it, compiled it and tried to run it without success on macOS. I just can't start a tunnel. The PR for supporting iOS 17 on macOS is still open and not merged in (linked in the issue description). I left two comments on two separate issues, but haven't heard back yet.

pujux commented 2 months ago

hey guys! I really don't want to invalidate David's awesome work here but since I read people are using paid solutions I can't not post here...

I've forked the kinesis repository and made several updates including fixes for a number of previously reported issues and new features that have been requested. you can find it here: https://github.com/pujux/magic-carpet

looking forward to feedback or suggestions!

pamochi commented 2 weeks ago

I know @Schlaubischlump you do not want to use Pymobiledevice3. However, for the others looking I found this repo (https://github.com/davesc63/GeoPort/?tab=readme-ov-file) that in my light testing worked without issue on my arch linux machine. There is a macOS and Windows version as well that I haven't been able to test yet. Apparently also can be done over wifi instead of tethered but I have yet to try that.