Communication
The iPhone can communicate across several different mediums, including the serial port, 802.11 Wi-Fi, and Bluetooth. Due to the limitations of Bluetooth on the iPhone, the two preferred methods are via the serial port and Wi-Fi.
AFC (Apple File Connection) is the serial port protocol used by iTunes to copy files to and from the device and to send firmware-level commands, such as how to boot up and when to enter recovery mode. It is used for everything from copying music to installing a software upgrade. This takes place over the device’s USB dock connector, using a framework named MobileDevice, which gets installed with iTunes. Third-party jailbreak tools sometimes load this framework to perform ad-hoc operations on the iPhone.
Note
A framework is a shared resource used in Mac OS X, similar to a DLL (dynamic linked library) and SO (shared object) in other operating systems. The Windows version of iTunes uses a DLL rather than a framework. For all purposes here, the terms are interchangeable.
By default, iTunes isn’t allowed to access the entire iPhone, but is placed in a jailed environment. A jailed environment is an environment subordinate to the administrative environment of a system, generally imposing additional restrictions on what resources are accessible. In other words, iTunes is permitted to access only certain files on the iPhone—namely those within its jail rooted in the /private/var/mobile/Media folder on the device (or /private/var/root/Media for older versions ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access