My question in a nutshell: Is there a way to create an iOS app running on an iOS device that can connect to and communicate with its own device's lockdownd
?
(For the curious who want to know "the why": I would like to use the connection to lockdownd
to trigger the installation of apps in .ipa
files on the iOS device that have a "local provisioning profile", i.e. a provisioning profile with the flag LocalProvision
set to true which means that over-the-air/OTA installations via a web-based installation are prevented by the operating system.)
A little background: You can connect to an iOS device's lockdownd
from a second device either
- by letting the second device serve as a USB host for the iOS device or
- by establishing a wifi-based TCP connection to the iOS device on port 62078.
By using libraries like libimobiledevice
, you can then interact with the iOS device - for example to trigger the installation of an app contained in an .ipa
file.
What I have already researched & tried:
- According to Jon Gabilondo's very good article Understanding usbmux and the iOS lockdown service,
lockdownd
creates a UNIX domain socket at/var/run/lockdown.sock
- unfortunatley however with "privileges 511, which means only root will be able to write to it." (Quote from the article) --> I have therefore not tried accessing/writing to this socket. lockdownd
also opens a TCP endpoint listening on port 62078 in the device's wifi network. --> I have created a small test app that tries to establish a TCP connection to 127.0.0.1:62078. Unfortunatley, the connection attempt fails with the error #1 "Operation not permitted". Same when trying to connect to the IPv4 assigned by the wifi's DHCP server to the iOS device.
What other option could be used to establish a connection to an iOS device's lockdownd
from within an app running on that device?