Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not start com.apple.debugserver on iOS 14 device under Xcode 12.0 beta 4 #469

Closed
9 tasks
albertdai opened this issue Aug 14, 2020 · 9 comments · Fixed by #471
Closed
9 tasks

Can not start com.apple.debugserver on iOS 14 device under Xcode 12.0 beta 4 #469

albertdai opened this issue Aug 14, 2020 · 9 comments · Fixed by #471

Comments

@albertdai
Copy link

albertdai commented Aug 14, 2020

MUST READ BEFORE YOU FILE (DELETE THIS SECTION BEFORE FILING)

Include the command line arguments you used for ios-deploy.

Don't forget to check out the README before filing this issue

The same thread in the libimobiledevice side: libimobiledevice/libimobiledevice#1004

Expected behavior

Install the app successfully and launch the app on the device

Actual behavior.

The command failed with "Error 0xe8000022: The service is invalid. AMDeviceSecureStartService(device, CFSTR("com.apple.debugserver"), NULL, &con)"

Steps to reproduce the problem

  1. Connect to an iOS 14 device and use Xcode 12.0 beta4
  2. Run ios-deploy -d -b {Bundle.app}

System Specs

macOS 15.5
Xcode 12.0
Build version 12A8179i

Please run the commands below in your Terminal.app and include it in the issue. Check when done and include results below.

  • 1. system_profiler SPSoftwareDataType
  • 2. ios-deploy -V
  • 3. xcodebuild -version
  • 4. xcode-select --print-path
  • 5. gcc --version
  • 6. lldb --version
  • If using NodeJS/npm
    • 7. npm -v
    • 8. node -v
@gabebear
Copy link

I haven't tested beta4 yet, this may be related to #468

When Xcode12 hits GM I will look into this and #468 further.

@jmagman

This comment has been minimized.

@jmagman

This comment has been minimized.

@jmagman

This comment has been minimized.

@jmagman
Copy link

jmagman commented Aug 21, 2020

libimobiledevice/libimobiledevice#1004 (comment)

The problem is that the com.apple.debugserver service is no longer present as of Xcode 12 beta 4. The libimobiledevice code needs to use com.apple.debugserver.DVTSecureSocketProxy instead. (But it also needs to be smart enough to know which service to use, if you want to stay compatible with older iOS/Xcode versions. It seems that the "new" name also works with iOS 13, but I don't know how far back support for it goes.)

@albertdai
Copy link
Author

The workaround/fix in libimobiledevice side could be replacing the service name com.apple.debugserver.DVTSecureSocketProxy and removing one line about SSL disable. See details in libimobiledevice/libimobiledevice#1004.

But I could confirm that only replacing the service name in ios-deploy could not fix the issue. May need more change same as the line about SSL in libimobiledevice

@xster
Copy link

xster commented Aug 25, 2020

Seems like https://github.com/libimobiledevice/libimobiledevice/pull/1012/files was a working solution for libimobiledevice. @gabebear would you be able to map it to ios-deploy?

@ivanhernandez13
Copy link

I took an initial look into this and I don't think that fix will map over to ios-deploy because that fix looks like it is done at a layer below where ios-deploy operates i.e. configuring and enabling SSL is done at the MobileDevice framework level.

ios-deploy might be able to drop down to that level to create and configure the connection to the device with SSL by following what other third_party tools do but i think the MobileDevice framework might already do this. I spent some time this morning into looking MobileDevice to see if there's something we're missing that tells it to establish an SSL connection with the device. Will look further in the next couple of days.

Been referencing this reimplementation of the framework: https://github.com/samdmarshall/SDMMobileDevice/blob/c3e1e97b1310c7a7a10f68281752760038b75e16/Framework/src/SDMMD_Connection.c#L194

@Ukalnins
Copy link

I created an pull request that should work. It would be nice to get some feedback if it also works for others.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants