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

fix communication with debuggserver on ios-14 #471

Merged

Conversation

Ukalnins
Copy link

Should fix #469 .
If I did not mess anything up by merging changes this should work on older and newer ios devices.
Added also the version detection for tvOS, but I don't have a device to test this.

@gabebear
Copy link

II was trying to test this and it seems like the debugger never connects(it copies and starts services properly). I'm testing with:

  • iPhoneXs-Max running iOS14 beta6(18A5357e)
  • MacBook Pro running macOS 10.15.6(19G2021)
  • Xcode 12 beta6(12A8189n)

What is your setup?

@ivanhernandez13
Copy link

Thanks for the patch! I was working on a similar patch and I was having the same issue with the debugserver not connecting. I left a comment on the line that resolved my issue.

src/ios-deploy/ios-deploy.m Outdated Show resolved Hide resolved
src/ios-deploy/ios-deploy.m Outdated Show resolved Hide resolved
src/ios-deploy/ios-deploy.m Outdated Show resolved Hide resolved
@jmagman
Copy link

jmagman commented Aug 28, 2020

This seems to be working (with the kCFSocketReadCallBack change) on a wired tethered device, but I'm still seeing 0xe8000022 on a wirelessly paired device (Connect via network). The app installs correctly.

[ +501 ms] ------ Debug phase ------
[        ] Starting debug of device-id (N71mAP, iPhone 6s, iphoneos, arm64) a.k.a. 'iPhone 6s' connected through WIFI...
[+2287 ms] [  0%] Looking up developer disk image
[ +141 ms] [ 95%] Developer disk image mounted successfully
[  +67 ms] Failed to start debugserver: e8000022 The service is invalid.

The same app and device work when Xcode 12 launches.

ios-deploy 1.11.1 successfully launches the app on a wirelessly paired device with Xcode 11 selected.

@gabebear
Copy link

We should probably focus on getting wired debugging working first since it’s blocking many flows. We can always open another issue for iOS14 wireless debugging.

@Ukalnins
Copy link
Author

Hmm, cannot repeat the WIFI problem. Works fine for me on an 5th gen iPad mini. @jmagman , can you add some debug logging, which service is ios-deploy trying to start? Maybe version detection in some cases is not working properly.

@Ukalnins
Copy link
Author

It seems there was regression on iOS 13 and older devices, as it needed dropping SSL connection now and the AMDeviceIsAtLeastVersionOnPlatform was actually returning bool. 😅

@gabebear
Copy link

gabebear commented Aug 31, 2020

I tested the latest fixes on an Apple-Silicon DTK(Big Sur 20A5354i) and everything is working:

  • wired iOS14b6 iPhone XS
  • wireless iOS14b6 iPhone XS
  • wired iOS12.4.8 iPad mini2

This looks good, great work!

@ivanhernandez13
Copy link

Can confirm patch works fine for me as well on iOS 14b6 iPad Air 2 and iOS 13.6.1 iPhone XS Max. Both wired and wirelessly.

@ivanhernandez13 ivanhernandez13 merged commit 8092250 into ios-control:master Aug 31, 2020
@christopherfujino
Copy link

@ivanhernandez13 @Ukalnins thanks so much for this fix!

@ryanluoo
Copy link

@Ukalnins Hi I just found out you have changed the definition of service_conn_t in MobileDevice.h.

This will cause AFCConnectionOpen to fail. Can you help to fix this ?

@Ukalnins
Copy link
Author

Hi, I'm using AFCConnectionOpen and it works. Can you expand on what macOS, iOS and XCode version combination you are seeing this and why you think that the exact change is the cause? Maybe you can create a bug report for this, as this PL is already closed.

@Ukalnins Ukalnins deleted the fix_debugserver_comm_on_is_14 branch October 20, 2020 05:50
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 this pull request may close these issues.

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