LocationSimulator icon indicating copy to clipboard operation
LocationSimulator copied to clipboard

[Feature] iOS 17 support

Open Schlaubischlump opened this issue 1 year ago • 96 comments

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). 2. Setup your device as development device. 3. Let Xcode handle the new Personalized Developer Disk Image stuff automatically. 4. 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.

Schlaubischlump avatar Jun 13 '23 21:06 Schlaubischlump

ty for instructions, was just looking for why it wasn't working with any tool i tried

Geczy avatar Jun 14 '23 22:06 Geczy

confused though. i even got hello world running on xcode 15 beta to prove my device is setup as a development device. where's my personalized image?

i went to the path /Applications/Xcode-beta.app/Contents/Resources/CoreDeviceDDIs that the issue you linked provides and i do see my img there, but the app is still not recognizing it

i cant add it to the app cause it requires a signature which i dont have?

CleanShot 2023-06-14 at 18 22 07@2x CleanShot 2023-06-14 at 18 20 31@2x CleanShot 2023-06-14 at 18 16 41@2x CleanShot 2023-06-14 at 18 16 53@2x CleanShot 2023-06-14 at 18 17 10@2x CleanShot 2023-06-14 at 18 19 31@2x

Geczy avatar Jun 14 '23 23:06 Geczy

Then I'll probably need to update LocationSimulator to recognize the new mounted image properly. Sadly I can only do this when libimobiledevice is updated :/

I had hoped, that the mechanism to detect the mounted image did not change, but this seems to not be the case ...

I can probably hack LocationSimulator to just not check if the image is mounted. I can try to upload a build on the weekend, that disables automatic DeveloperDiskImage downloads. Then you can check, if it is working with this build

Edit: Try this build. It is unsigned so you probably have to open it with a right click and confirm some warnings. This build just assumes, that the developer disk image is always mounted.

LocationSimulator.app.zip

Schlaubischlump avatar Jun 15 '23 06:06 Schlaubischlump

I tried this and I get this error image

v-u-n avatar Jun 15 '23 07:06 v-u-n

Have you mounted the DeveloperDiskImage with Xcode by installing some app ?

If so, then apple changed the API. In this case, I can not address this error until September

Schlaubischlump avatar Jun 15 '23 10:06 Schlaubischlump

same issue here even after mounting via xcode btw

Geczy avatar Jun 15 '23 16:06 Geczy

even using the personalized dev signature + dev image exported from here doesn't make locationsimulator work https://github.com/libimobiledevice/libimobiledevice/issues/1452

CleanShot 2023-06-15 at 12 00 53

Geczy avatar Jun 15 '23 17:06 Geczy

Thanks for all the testing.

Unfortunately, that means Apple broke more than just the developer disk image mounting. They also changed the API for changing the location or the way to interact with it. In every case this sounds like a major rewrite is required and libimobiledevice needs to be update first, which in my experience takes quite some time.

So for everyone reading this: It will take a long time until iOS 17 is supported. If you can, stay on iOS 16 if you want to keep using this app.

Schlaubischlump avatar Jun 15 '23 18:06 Schlaubischlump

if you can use https://github.com/doronz88/pymobiledevice3 i think you'll receive location spoof support on ios 17 much sooner, because it already added some support for 17

Geczy avatar Jun 15 '23 18:06 Geczy

Theoretically swift does support python bindings, but this would require an even bigger rewrite of LocationSimulator. At this point it would be easier to throw the app away and write a new one.

If pymobiledevice has done all the necessary research it should be much easier to port the changes to libimobiledevice. I might even be able to do this myself if I find the time.

Note to myself: Keep an eye on the issue to see if the repo of pymobiledevice with the images comes online.

Schlaubischlump avatar Jun 15 '23 18:06 Schlaubischlump

@Geczy

Since you got the Xcode beta up and running, could you maybe test if the location simulation is still working for the iOS Simulator?

Schlaubischlump avatar Jun 15 '23 19:06 Schlaubischlump

@Geczy

Since you got the Xcode beta up and running, could you maybe test if the location simulation is still working for the iOS Simulator?

yeah it works

CleanShot 2023-06-15 at 14 40 17

Geczy avatar Jun 15 '23 19:06 Geczy

Perfect, thank you for verifying this ! One thing I don't have to fix. That means, I have more time to fix the iOS support.

Schlaubischlump avatar Jun 15 '23 19:06 Schlaubischlump

Hello ! thanks for all the clarification, I am also down to help if you need further tests while working on this, I'm on iOS 17 + Sonoma + xCode Beta

Dliix66 avatar Jul 16 '23 13:07 Dliix66

Perfect, thank you for verifying this ! One thing I don't have to fix. That means, I have more time to fix the iOS support.

We need your magik out there 😀🙏

shadowh4ck3r avatar Aug 08 '23 22:08 shadowh4ck3r

Still waiting for an updated version of libimobiledevice...

Sadly nothing happened over there yet. I don't have the time to update it myself at the moment :/ Lets hope that someone updates it soon.

It seems like pymobiledevice3 is already updated, so the heavy lifting in regards to reverse engineering apples changes is already done.

Schlaubischlump avatar Aug 08 '23 22:08 Schlaubischlump

Thanks. We stay Hopeful then!

shadowh4ck3r avatar Aug 08 '23 23:08 shadowh4ck3r

Looks like there is some progress. iFakeLocation implemented support to mount personalized DeveloperDiskImages using libimobiledevice. pymobiledevice3 already provides a repo with personalized developerDiskImages for iOS 17 (Note to myself: Update the old links for iOS Version < 17 to this repo as well). I might be able to add support to mount personalized DeveloperDiskImages images based on the implementation in iFakeLocation. This would be a first step. Even if I manage to mount the DeveloperDiskImages for iOS 17, location simulation would still not work, since all of this stuff was changed by Apple as well.

That being said, I can not start working on this yet, since I do not have a device to test anything on. Apple dropped support for my iPad in iOS 17. Therefore, I'm left with my primary iPhone as my main development device. Since I need my iPhone on a daily basis I can not risk updating it to a beta version. I'll probably start working on this when iOS 17 is out of beta.

Schlaubischlump avatar Aug 14 '23 21:08 Schlaubischlump

Quick update: I updated the LocationSimulator user interface and the download handling source code. It is now possible to add and download personalized DeveloperDiskImages.

It is still not possible to:

  1. Mount a personalized DeveloperDiskImage
  2. Spoof the location of an iOS 17 device

Schlaubischlump avatar Aug 22 '23 12:08 Schlaubischlump

That being said, I can not start working on this yet, since I do not have a device to test anything on. Apple dropped support for my iPad in iOS 17. Therefore, I'm left with my primary iPhone as my main development device. Since I need my iPhone on a daily basis I can not risk updating it to a beta version. I'll probably start working on this when iOS 17 is out of beta.

I had the beta since the beginning and it safe to install the beta now. Critical apps like Sparkasse and other banking apps have worked since beta 1.

marvinjoa avatar Aug 23 '23 23:08 marvinjoa

Thanks for your hard-work so far.

gabruconcepts avatar Aug 27 '23 23:08 gabruconcepts

Some information about the new way iOS devices communicate with macOS starting with iOS 17.

https://github.com/doronz88/pymobiledevice3/blob/master/misc/RemoteXPC.md

Schlaubischlump avatar Sep 10 '23 12:09 Schlaubischlump

Some information about the new way iOS devices communicate with macOS starting with iOS 17.

https://github.com/doronz88/pymobiledevice3/blob/master/misc/RemoteXPC.md

Apple did this refactoring thinking they could beat the curve of Tweaks and jailbreaks... No matter how they try, there will always be a vulnerability that serves as a loophole for us to keep using our tools, The iOS 17 is full of bugs and keeps contradicting some AppStore apps... thanks @Schlaubischlump for this educative explanation... ❤️🚀

shadowh4ck3r avatar Sep 11 '23 17:09 shadowh4ck3r

Thank you for the kind words, but I merely collect the information here. doronz88 has done the hard work of reverse engineering the new protocol.

Most likely apple rewrote the developer tools to get rid of the overhead incurred by usbmuxd. It makes sense, but it is shitty for all existing tools.

Schlaubischlump avatar Sep 11 '23 17:09 Schlaubischlump

Any update on this?

cdfornari avatar Sep 19 '23 17:09 cdfornari

Nope, currently doesn't look good...

I might be able to get the DeveloperDiskImage mounting to work. But I really don't have the time to add remote XPC support for libimobiledevice. And it doesn't look like anybody over at libimobiledevice has time to implement it either :/

See: https://github.com/libimobiledevice/libimobiledevice/issues/1490

Schlaubischlump avatar Sep 19 '23 17:09 Schlaubischlump

thanks 🙏 I think I'm just gonna get an iOS 16 phone somewhere lol

cdfornari avatar Sep 19 '23 18:09 cdfornari

I think you can still downgrade. iOS 16.6.1 should still be signed.

Schlaubischlump avatar Sep 19 '23 18:09 Schlaubischlump

It looks like Foneazy MockGo already supports iOS 17, and uses some other script to modify the location.

SkeletonDoctor avatar Sep 20 '23 13:09 SkeletonDoctor

Maybe its written in python. In this case they can just use pymobiledevice3

Schlaubischlump avatar Sep 20 '23 14:09 Schlaubischlump