dryark / stf_ios_support

Central repo to connect and document components/repos needed for IOS stf support
Other
154 stars 65 forks source link

Remote XCode connectivity ( like remoteURL for ADB ) #58

Open chaooe opened 4 years ago

chaooe commented 4 years ago

Does it support the remoteUrl function which like android device?
In android devices, i can connect the devices anywhere in the corp network by the remoteUrl. So if the iOS device have proxy the port, so we can use it to connect it anywhere

nanoscopic commented 4 years ago

By "remote url" do you mean "remote debug" to adb connect to a device already connected to STF?

chaooe commented 4 years ago

Yes. Something like the adb connect function. So we can use stf server to manage the devices operation.

nanoscopic commented 4 years ago

This can be done in the following way:

---- Mac Provider ---- Listen on 0.0.0.0:12345 and proxy to /var/run/usbmuxd sudo socat TCP-LISTEN:12345,reuseaddr,fork UNIX-CLIENT:/var/run/usbmuxd

---- Mac Client ---- Move the existing usbmuxd unix domain socket away, and replace it with a TCP proxy.

Move the existing usbmuxd socket away: sudo mv /var/run/usbmuxd /var/run/usbmuxx

Listen on /var/run/usbmuxd, and proxy requests to :12345 sudo socat -t100 -x -v UNIX-LISTEN:/var/run/usbmuxd,mode=777,reuseaddr,fork TCP:<mac provider ip>:12345

The 'mac provider' portion will be automatically done by coordinator in the near future, and the information passed through to display in the same location it is shown for android devices.

chaooe commented 4 years ago

Thanks for your advanced support. I will try it by using your solution.

nanoscopic commented 4 years ago

The latest updates to stf-ios-provider automatically start socat providing usbmuxd on a port. The IP:PORT combination is displayed in the UI in the field where ADB connect information was shown.

The field still shows 'adb connect IP:PORT', which is misleading, but the IP:PORT combination shown can be used to connect using socat as described above.