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

[BUG] Unable to install/mount DeveloperDiskImage.dmg #97

Closed muggins808 closed 2 years ago

muggins808 commented 2 years ago

Describe the bug Freezes on open, with the To Reproduce Steps to reproduce the behavior:

  1. Go to '...' LocationSimulator.app
  2. Click on '....' iPhone
  3. See error

Expected behavior It should work :) It simply freezes, then gives the "could not mount DeveloperDiskImage.dmg" error: "The DeveloperDiskImage for this device could not be mounted. Location spoofing will not work. Is your device locked?"

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context

Schlaubischlump commented 2 years ago

Thanks for the detailed report ! This is strange. I need to investigate this. It could be an error in 'libimobiledevice'. Sadly I don't have any device on iOS 15.2.

Could you open 'LocationSimulator' with 'Terminal' and post the output (You should remove the UUID with some placeholder, before posting). To do this do the following:

You should see some output in the Terminal such as:

LocationSimulator 
[INFO]: Connect device: My iPhone with UDID: XXX
...

Just post the complete output here in a github comment. Also try to connect the device via USB. The Wi-Fi connection is sometimes a little bit unreliable.

muggins808 commented 2 years ago

@Schlaubischlump Thanks for your incredibly quick response.

Here's the output from running the app in Terminal:

[INFO]: Connect device: iPhone with UDID: XXX
[ERROR]: lookup_image returned -256
[INFO]: Uploading /Users/mgm/Library/Application Support/LocationSimulator/iPhone OS/15.2/DeveloperDiskImage.dmg
[ERROR]: mount_image returned -256
Schlaubischlump commented 2 years ago

Sadly this is not really helpfull... As you can see below error code -256 is an unknown error:

/** Error Codes */
typedef enum {
    MOBILE_IMAGE_MOUNTER_E_SUCCESS        =  0,
    MOBILE_IMAGE_MOUNTER_E_INVALID_ARG    = -1,
    MOBILE_IMAGE_MOUNTER_E_PLIST_ERROR    = -2,
    MOBILE_IMAGE_MOUNTER_E_CONN_FAILED    = -3,
    MOBILE_IMAGE_MOUNTER_E_COMMAND_FAILED = -4,
    MOBILE_IMAGE_MOUNTER_E_DEVICE_LOCKED  = -5,
    MOBILE_IMAGE_MOUNTER_E_UNKNOWN_ERROR  = -256
} mobile_image_mounter_error_t;

Could you try the following:

  1. Delete the folder: /Users/mgm/Library/Application Support/LocationSimulator/iPhone OS/15.2/
  2. Reboot your iPhone and your Mac
  3. Connect your iPhone via USB
  4. Launch LocationSimulator via the Terminal
  5. Select the device
  6. Post the new output, to see if a different error occurs
muggins808 commented 2 years ago

Same error, 256. :(

Also to clarify I also erased/reset the iPhone, and tried making a new username on the Mac too and tried that way. It downloaded the DiskImage fine; it just won't mount.

Schlaubischlump commented 2 years ago

Do you have a beta version of iOS 15.2 installed ?

I just tried it with an iPad on iOS 15.2, which is working fine. This makes debugging very hard, since I can't reproduce the error.

muggins808 commented 2 years ago

No, GM 15.2. I tried it on another Mac too with this iPhone - does not work. It does, however, work on other iPhones

Schlaubischlump commented 2 years ago

This is really strange... I'm a little bit out of ideas. Are the other iPhones running 15.2 as well ?

muggins808 commented 2 years ago

This is really strange... I'm a little bit out of ideas. Are the other iPhones running 15.2 as well ?

Yes, all running 15.2. It seems to be this 7+ that is giving the issue. I tried a full reset (from DFU mode) too. No luck.

Schlaubischlump commented 2 years ago

Okay could you try one last thing. That way I can figure out if it is a problem with libimobiledevice or LocationSimulator.

Reboot your iPhone (this makes sure the DeveloperDiskImage is not mounted yet):

  1. Open terminal
  2. Make sure you have libimobiledevice installed (brew install libimobiledevice)
  3. Connect your iPhone via USB
  4. Run: idevice_id -l. If only one device is connected you got your UUID. It should look something like this: f9abdd2044cbd856874bfd43829ed3cdef870e26
  5. Run: cd /Users/mgm/Library/Application Support/LocationSimulator/iPhone OS/15.2/
  6. Run: ideviceimagemounter -u XXX DeveloperDiskImage.dmg DeveloperDiskImage.dmg.signature where you replace XXX with the UUID.

If you could post the output of this command, it would help a lot. If you need help with step number 2 let me know !

muggins808 commented 2 years ago

No problem - here's the output of the above: Uploading DeveloperDiskImage.dmg ERROR: Unknown error occurred, can't mount

To give context I previously used Mock2Go (another app) and it worked.. but I think it messed something up. Now that doesn't work either. I've restored my phone - including from DFU mode, in case this was a bootloader issue. Also tried another Mac... same issue.. it may be an issue with the phone?

Schlaubischlump commented 2 years ago

It really looks like a problem with your phone. Did you always restore a backup ? Maybe a clean restore without a backup fixes the issue.

muggins808 commented 2 years ago

Nope.. I never restore a backup (well, not since I'm testing this). Very strange.