MobileDevice Library

MobileDevice Library is used by iTunes to transfer data between iPhone and computer over both USB and WiFi connections.

macOS: MobileDevice.framework

 * Location: /System/Library/PrivateFrameworks/MobileDevice.framework
 * Export command:

Windows: MobileDevice.dll
For iTunes 7.0 - 8.2, load the dll directly from  (  on 64-bit Windows). Supporting CoreFoundation.dll (used for CFStringRef, CFPropertyListRef management) is located at the same path.

Starting with iTunes 9.0, the location of MobileDevice.dll (no longer prefixed with "iTunes") is stored in InstallDir registry value under HKLM\SOFTWARE\Apple Inc.\Apple Mobile Device Support registry key, and CoreFoundation.dll is stored in InstallDir registry value under HKLM\SOFTWARE\Apple Inc.\Apple Application Support registry key.

Starting with iTunes 12.1, the 64-bit variant of iTunes (identified by an installer filename of iTunes6464Setup.exe) includes only 64-bit binaries. This breaks compatibility with third-party 32-bit tools, as the 32-bit dlls they require simply no longer exist. Between iTunes 12.1 and 12.4, due to a bug where 64-bit iTunes would fail to play video on certain graphics cards, a "64-bit - for older video cards" variant (iTunes64Setup.exe) was separately made available on the Apple Support website, which restored the full set of 32-bit binaries. No "older video cards" release was made for iTunes 12.5. This change was rolled back with iTunes 12.6.

Starting with iTunes 12.10.9.3, Apple Application Support was merged into Apple Mobile Device Support. Hence, paths and registry keys relating to Apple Application support no longer exist. Should your program find these paths not exist, you can assume CoreFoundation.dll can be found at the same path as Apple Mobile Device Support.

Library Interfaces

 * libimobiledevice (provides the same functionality on GNU/Linux)
 * mobiledevice (command line utility for interacting with MobileDevice Framework)
 * SDMMobileDevice (OS X framework written in C that can be used interchangeably with Apple's private framework MobileDevice.framework)
 * MobileDeviceAccess (similar to above, but written in Objective-C)
 * MobileDevice.h (old reverse engineered header for interfacing with MobileDevice library)

Obtaining address
In order to obtain the address of a usable private function in MobileDevice, you will have to be able to understand x86-64 assembly to reverse engineer it. These methods differ slightly based on platform due to how dynamically linked libraries handle position independent code.

Mac OS X (MobileDevice.framework)
A private function is not marked as exported in the mach-o symbol table. This means it cannot be called by simply linking against the library. To call unexported functions, the mach-o symbol table must be stepped through manually to find the offset of a particular function call. Calls can be verified by checking against the offset of the name inside the name table.

Windows (MobileDevice.dll)
Unlike OS X's dynamically linkable libraries, Windows dynamic libraries do not support position independent code in the same manner. A private function will not have its name in the exported symbol table, so in a debugger, like GDB, it will show up as part of another function. However, you will know that it is a separate function as a new stack frame is set up.

Known Error Codes
For the latest error codes you can look at the pseudo-code of AMDErrorString.

MobileDeviceUpdater


Since at least macOS High Sierra (possibly as early as the introduction of System Integrity Protection in OS X El Capitan), MobileDevice handles its own updates. When a device unknown to the currently installed build of MobileDevice is connected, MobileDeviceUpdater.app prompts the user to install a software update. Previously, MobileDevice would only be updated by installing a full iTunes or Xcode update.

Due to System Integrity Protection, AMDS is installed to, which is symbolically linked to from. Apps that use MobileDevice will use the new build upon next launch.

Additionally, extra bundles may be installed to  and , registering icons for new devices unknown to the current base operating system. This includes Mac devices.