doronz88 / pymobiledevice3

Pure python3 implementation for working with iDevices (iPhone, etc...).
https://discord.gg/52mZGC3JXJ
GNU General Public License v3.0
1.49k stars 206 forks source link

iOS17.3: developer core-device list-apps - No such service: com.apple.coredevice.appservice #862

Closed jpstotz closed 8 months ago

jpstotz commented 8 months ago

Test environment

Describe the bug Trying to use the rsd connection ends in an error Failed to start service. ... For example the command pymobiledevice3 developer core-device list-apps --rsd fdaf:4582:6af9::1 60027

To Reproduce Steps to reproduce the behavior:

  1. Execute with admin permissions: pymobiledevice3 remote start-tunnel
  2. extract --rsd ... option from output
  3. Execute pymobiledevice3 developer core-device list-apps --rsd fdaf:4582:6af9::1 60027

Logs Using the latest sources from Git I ran the command with debugging and found out that the reason is an InvalidServiceError. Unfortunately pymobiledevice3 completely ignores the content of this error (in my opinion a verbose/debugging mode would make sense here that prints the exception and the stack trace). Printing the error message I get pymobiledevice3.exceptions.InvalidServiceError: No such service: com.apple.coredevice.appservice

Looking at the services list in RemoteServiceDiscoveryService I see these services:

com.apple.GPUTools.MobileService.shim.remote 
com.apple.PurpleReverseProxy.Conn.shim.remote 
com.apple.PurpleReverseProxy.Ctrl.shim.remote 
com.apple.RestoreRemoteServices.restoreserviced 
com.apple.accessibility.axAuditDaemon.remoteserver.shim.remote 
com.apple.afc.shim.remote 
com.apple.amfi.lockdown.shim.remote 
com.apple.atc.shim.remote 
com.apple.atc2.shim.remote 
com.apple.backgroundassets.lockdownservice.shim.remote 
com.apple.bluetooth.BTPacketLogger.shim.remote 
com.apple.carkit.remote-iap.service 
com.apple.carkit.service.shim.remote 
com.apple.commcenter.mobile-helper-cbupdateservice.shim.remote 
com.apple.companion_proxy.shim.remote 
com.apple.corecaptured.remoteservice 
com.apple.crashreportcopymobile.shim.remote 
com.apple.crashreportmover.shim.remote 
com.apple.dt.remoteFetchSymbols 
com.apple.dt.remotepairingdeviced.lockdown.shim.remote 
com.apple.fusion.remote.service 
com.apple.idamd.shim.remote 
com.apple.internal.devicecompute.CoreDeviceProxy 
com.apple.internal.dt.coredevice.untrusted.tunnelservice 
com.apple.iosdiagnostics.relay.shim.remote 
com.apple.misagent.shim.remote 
com.apple.mobile.MCInstall.shim.remote 
com.apple.mobile.assertion_agent.shim.remote 
com.apple.mobile.diagnostics_relay.shim.remote 
com.apple.mobile.file_relay.shim.remote 
com.apple.mobile.heartbeat.shim.remote 
com.apple.mobile.house_arrest.shim.remote 
com.apple.mobile.insecure_notification_proxy.remote 
com.apple.mobile.insecure_notification_proxy.shim.remote 
com.apple.mobile.installation_proxy.shim.remote 
com.apple.mobile.lockdown.remote.trusted 
com.apple.mobile.lockdown.remote.untrusted 
com.apple.mobile.mobile_image_mounter.shim.remote 
com.apple.mobile.notification_proxy.remote 
com.apple.mobile.notification_proxy.shim.remote 
com.apple.mobile.storage_mounter_proxy.bridge 
com.apple.mobileactivationd.shim.remote 
com.apple.mobilebackup2.shim.remote 
com.apple.mobilesync.shim.remote 
com.apple.os_trace_relay.shim.remote 
com.apple.osanalytics.logTransfer 
com.apple.pcapd.shim.remote 
com.apple.preboardservice.shim.remote 
com.apple.preboardservice_v2.shim.remote 
com.apple.remote.installcoordination_proxy 
com.apple.springboardservices.shim.remote 
com.apple.streaming_zip_conduit.shim.remote 
com.apple.sysdiagnose.remote 
com.apple.syslog_relay.shim.remote 
com.apple.webinspector.shim.remote 

For community

⬇️ Please click the 👍 reaction instead of leaving a +1 or 👍 comment

doronz88 commented 8 months ago

The error is a VERY descriptive one and describes the exact problem. You are even given a very detailed guide in how to approach this in the exception catching:

ERROR Failed to start service. Possible reasons are:
- If you were trying to access a developer service (developer subcommand):
    - Make sure the DeveloperDiskImage/PersonalizedImage is mounted via:
      > python3 -m pymobiledevice3 mounter auto-mount

    - If your device iOS version >= 17.0:
        - Make sure you passed the --rsd option to the subcommand
          https://github.com/doronz88/pymobiledevice3#working-with-developer-tools-ios--170

- Apple removed this service

- A bug. Please file a bug report:
  https://github.com/doronz88/pymobiledevice3/issues/new?assignees=&labels=&projects=&template=bug_report.md&title=

Unfortunately you completely ignored the error that was raised