Features

Native Protocols

The library implements the native protocols needed to communicate with services running on iOS devices. Due to the reimplemention it does not depend on using or bundling any existing libraries from Apple.

Cross-Platform

The C programming language enables cross-platform use of the library. It has already been built and run on  Linux,  Mac,  Windows,  Android and embedded  ARM SoCs.

Architecture

The architecture of the library and dependencies has been designed with an OOP approach in mind. Thus bindings for other programming languages are easier to create and allow an OOP based API.

Motivation

Linux enthusiasts were not amused about great but incompatible hardware like the iPhone 2G. As iTunes was not available for Linux libiphone was born. This became libimobiledevice with the goal to bring freedom and "allow penguins to talk to fruits".

Command-Line

Many command-line utilities come bundled with the library that allow interacting with iOS device services already. This covers retrieving basic device information up to restoring official firmware images.

Network Support

Devices that have "Wifi Sync" enabled can be accessed wirelessly and do not require a wired USB connection anymore with iOS 11 and later.

Years of Research

Due to being in development since 2007 the library supports the range from the first to the latest iOS device. This is an achievement of many years of research and development.

Scalability

Being integrated by popular community projects as well as large implementations which interact with more than 10.000+ of devices provide a good reference point for high scalability and efficiency of this solution.

Native Protocols

Control devices running latest iOS firmware

The library has been architected for easy access to native device features using an object-oriented higher-level API.

This allows interacting with various native device service APIs to manage Apps, Backup, Filesystem, Debugging, Activation, Provisioning, SpringBoard, Syslog, Firmware Updates and much more.

You can also use the bundled command-line utilities for these if you do not actually develop an application.

 Get Started
...
#include <libimobiledevice/libimobiledevice.h>

/* Unique Device Identifier */
static char *udid = NULL;

/* Device Handle */
idevice_t device = NULL;

/* Try to connect to first USB device */
if (idevice_new_with_options(&device, NULL, IDEVICE_LOOKUP_USBMUX) != IDEVICE_E_SUCCESS) {
  printf("ERROR: No device found!\n");
  return -1;
}

/* Retrieve the udid of the connected device */
if (idevice_get_udid(device, &udid) != IDEVICE_E_SUCCESS) {
  printf("ERROR: Unable to get the device UDID.\n");
  idevice_free(device);
  return -1;
}

/* Outputs device identifier */
printf("Connected with UDID: %s\n", udid);

/* Cleanup */
idevice_free(device);
free(udid);
...
...
#include <libimobiledevice/lockdown.h>
#include <plist/plist.h>

/* Lockdown Service Handle */
lockdownd_client_t lockdown = NULL;

/* Handshake with lockdownd */
lockdownd_client_new_with_handshake(device, &lockdown, "myapp");

/* Use the plist format */
plist_t node = NULL;

/* Our result */
char *value = NULL;

/* Retrieve "DeviceColor" setting value from device */
if(lockdownd_get_value(lockdown, NULL, "DeviceColor", &node) != LOCKDOWN_E_SUCCESS) {
  lockdownd_client_free(lockdown);
  idevice_free(device);
  printf("ERROR: Unable to retrieve setting key DeviceColor from device.\n");
  return -1;
}

/* Get string value from node */
plist_get_string_val(node, &value);

/* Output device color value */
printf("%s value is: %s\n", "DeviceColor", value);

/* Cleanup */
plist_free(node);
free(value);
lockdownd_client_free(lockdown);
...
$ ideviceinfo -k ProductVersion
12.4
$ ideviceinfo -s
BasebandCertId: xxxxxxxxxx
BasebandKeyHashInformation:
 AKeyStatus: 2
 SKeyHash: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
 SKeyStatus: 0
BasebandSerialNumber: xxxxxxxx
BasebandVersion: 7.80.04
BoardId: 4
BuildVersion: 16G77
ChipID: 28672
DeviceClass: iPhone
DeviceColor: #e1e4e3
DeviceName: iPhone 6 Plus
DieID: xxxxxxxxxxxxxxx
HardwareModel: N56AP
HasSiDP: true
PartitionType: GUID_partition_scheme
ProductName: iPhone OS
ProductType: iPhone7,1
ProductVersion: 12.4
ProductionSOC: true
ProtocolVersion: 2
TelephonyCapability: true
UniqueChipID: xxxxxxxxxxxxxxx
UniqueDeviceID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
WiFiAddress: xx:xx:xx:xx:xx:xx
$ ideviceactivation state
ActivationState: Activated
$ idevicediagnostics restart
Restarting device.

Download

Please select a component to view download, release, and dependency information of the latest release.

A cross-platform protocol library to communicate with iOS devices

Download (tar.bz2) LGPL-2.1 License
Depends on:

1.4.0 (2025-10-10)

Development release. From now on, releases will be made more frequently.

Changes
  • Add support for MbedTLS
  • Add Reverse Proxy implementation
  • Add support for wireless pairing (AppleTV)
  • Embed 3rd party libraries for ed25519 and SRP6a
  • Fixes in idevicedebug
  • idevicecrashreport: Allow filtering crash reports by filename
  • Add idevicedevmodectl tool
  • Fixes for idevicebackup2
  • Add property_list_client_get_service_client() and service_get_connection() functions
  • Add idevicebtlogger tool
  • Add new idevice_events_subscribe/unsubscribe API
  • Move LIBIMOBILEDEVICE_API to public headers
  • Add afc_strerror function
  • Add libimobiledevice_version() function
  • Use libimobiledevice-glue's SHA1 implementation
  • Add support for iOS 17+ Personalized Developer Disk image mounting
  • Fix compilation on MSVC
  • Add idevice_strerror() to interface
  • Add new idevice_get_device_version() to interface
  • Add os_trace_relay service implementation
  • Fixes for idevicesyslog
  • afc: Add afc_get_file_info_plist and afc_get_device_info_plist functions ... and several other internal changes
Bug fixes
  • definitely some, it has been to long to go through everything

A socket daemon to multiplex connections from and to iOS devices

Download (tar.bz2) GPL-2.0 License
Depends on:

1.1.1 (2020-06-15)

Maintenance release.

Features
  • Make use of libusb hotplug events for device discovery
  • Get correct USB device speed instead of hardcoded value
  • Bump libusb dependency to 1.0.9
  • Use non-blocking sockets for client communication to avoid hanging
  • Use correct manual section (8) for manpage
  • Log pid of connecting clients if supported
  • Implement device discovery using libusb hotplug events
  • Log error message if writing a config file fails
  • Tag all udev events with systemd tag
  • Set socket options for client connections to improve performance
  • Implement ListListeners usbmux command handling
  • Bump libimobiledevice dependency to 1.3.0
  • Bump libplist dependency to 2.2.0
  • Add support for iPhone XS/XR UDID format
  • Add option to allow logging to dedicated logfile
  • Convert README file to markdown format
  • Add support for connecting with T2 chip
  • Show actual libusb version in debug message on startup
  • Enable libusb debugging output
  • Log client process name alongside pid if possible on Linux
  • Unify and improve log message output
  • Improve README.md with project description, installation, contributing and usage sections
Bug Fixes
  • Use clock_gettime() instead of gettimeofday() to avoid timing issues when calculating packet timeouts
  • Fix wrong timeout value in debug messages
  • Fix blocking by using libusb asynchronous I/O for getting initial device information
  • Fix occasional USB reconfiguration due to udev rules being run again
  • Fix wrong timestamps when running in foreground
  • Fix USB reconnection issues on virtual machines with iOS 11+ devices
  • Various memory leak, deadlock and invalid free fixes

Restore/upgrade firmware of iOS devices

Download (tar.bz2) LGPL-3.0 License
Depends on:

1.0.0 (2020-06-15)

First official public release!

Features
  • Restore firmware files to iOS devices
  • Use official IPSW firmware archive file or directory
  • Updates the device by default or allows full restore erasing all data
  • Download latest available firmware for device on demand
  • Cache downloaded firmware files
  • Restore using custom firmware files (requires bootrom exploit)
  • Skip NOR/Baseband upgrade
  • Fetch TSS records as .shsh files
  • Put devices in pwned DFU mode (limera1n devices only)
  • Use custom AP ticket from file
  • Developed since 2010

Manage apps of iOS devices

Download (tar.bz2) GPL-2.0 License
Depends on:

1.1.1 (2020-06-15)

Maintenance release.

Features
  • Bump autoconf requirement to 2.64
  • Bump libzip dependency to 0.10
  • Ignore .DS_Store and hidden files when parsing ZIP files
  • Improve excessive progress output
  • Return non-zero exit status on errors
  • Remove length check on UDID argument to support newer devices
  • Add -n option to make waiting on install/uninstall notification optional
  • Add --network and --version options to ideviceactivation tool
  • Bump libimobiledevice dependency to 1.3.0
  • Bump libplist dependency to 2.2.0
  • Improve README.md with project description, installation, contributing and usage sections
Bug Fixes
  • Fix device removal detection triggering on any device unplug
  • Fix win32 build
  • Ignore SIGPIPE signal

A fuse filesystem to access the contents of iOS devices

Download (tar.bz2) LGPL-2.1 License
Depends on:

1.2.0 (2025-10-14)

Changes
  • Switch to libfuse 3
  • Require libimobiledevice 1.4.0

A client library to multiplex connections from and to iOS devices

Download (tar.bz2) LGPL-2.1 License
Depends on:

2.1.1 (2025-06-04)

Changes
  • tools: Fix potential issue with select() in case the network fd is higher than the usbmux fd
  • Switch to better initializer strategy
  • Fix compilation on MSVC
  • iproxy: Make sure to print correct socket error messages
  • inetcat: Make sure to report correct error messages

Library and utility to talk to iBoot/iBSS via USB on Mac OS X, Windows, and Linux

Download (tar.bz2) LGPL-2.1 License
Depends on:
  • libusb
  • limd_glue

1.3.0 (2025-09-12)

Changes
  • Switch to better initializer strategy
  • Allow building without readline support for the irecovery tool
  • Added support for iOS 1 and iOS 2 recovery mode (Linux, macOS)
Device database changes
  • Support iPhone 17 family devices
  • Support Watch 11 / SE3 / Ultra3 models
  • Support March 2025 iPad and Mac models
  • Support iPhone 16e
  • Support November 2024 Mac models
  • Support iPad mini (A17 Pro)
Bug Fixes
  • IOKit: Fix race condition when trying to delete runloop before it even started

A library to handle Apple Property List format in binary or XML

Download (tar.bz2) LGPL-2.1 License

2.7.0 (2025-05-14)

Changes
  • Add plist_new_unix_date, plist_get_unix_date_val, plist_set_unix_date_val functions that work with int64_t values representing a UNIX timestamp instead of using the 'MAC epoch'. These new functions should be used instead of plist_new_date, plist_get_date_val, and plist_set_date_val, which are now marked deprecated and might be removed in a future version of libplist.
  • Allow building the library without tool(s)
  • Switch to more generic global initializer method
  • json: Allow e+/E+ in exponent as per RFC 8259
  • C++: Add more convenience functions to the interface
  • C++: Add more type variants to different constructors and operators
Bugfixes:
  • Fix segmentation fault when calling plist_sort() on an empty dictionary
  • Fix compilation on MSVC
  • C++: Fix bug in internal helper function of Array class
  • C++: Fix String::GetValue memory leaking and support assignment of const char*

A library to handle the activation process of iOS devices

Download (tar.bz2) LGPL-2.1 License
Depends on:

1.1.1 (2020-06-15)

Maintenance release.

Breaking
  • Rename library and all related files by adding an API version resulting in libideviceactivation-1.0
Features
  • Add --network and --version options to ideviceactivation tool
  • Bump libimobiledevice dependency to 1.3.0
  • Bump libplist dependency to 2.2.0
  • Improve README.md with project description, installation, contributing and usage sections
Bug Fixes
  • Ignore SIGPIPE signal

A library with common code used by libraries and tools around the libimobiledevice project

Download (tar.bz2) LGPL-2.1 License
Depends on:

1.3.2 (2025-06-04)

Changes
  • socket: [macOS] Fix build on older macOS
  • socket: [Windows] Prevent crash by properly initializing memory buffers
  • Switch to better initializer strategy
  • Fix compilation on MSVC
  • Add extern "C" guards to public headers
  • socket: Improve error message output/verbose logging
  • socket: [Windows] Make sure errno is set in error conditions
  • socket: Allow setting debug level via environment variable
  • socket: [Windows] Use WSAAddressToStringA (ANSI version)
  • socket: [Windows] Use inet_ntop instead of WSAAddressToStringA for >= Vista

Library handling the communication with Apple's Tatsu Signing Server (TSS)

Download (tar.bz2) LGPL-2.1 License
Depends on:

1.0.5 (2025-06-04)

Changes:
  • Fix compilation on MSVC
  • Add extern "C" guards to public headers
  • Update auth client version

Get Started

Please choose your platform of choice below to see instructions on how to get started.

Open Terminal

Open a command-line terminal on your machine.

Install Dependencies

Enter the commands provided below.

$ sudo apt-get install \
    build-essential \
    checkinstall \
    git \
    autoconf \
    automake \
    libtool-bin \
    libplist-dev \
    libimobiledevice-glue-dev \
    libusbmuxd-dev \
    libssl-dev \
    usbmuxd

Build

Enter the commands provided below.

$ ./autogen.sh \
    --prefix=/opt/local \
    --enable-debug
$ make

Install

Enter the commands provided below.

$ sudo make install

Open Terminal

Open a command-line terminal on your machine.

Installation

Enter the commands provided below.

$ sudo apt-get install usbmuxd libimobiledevice6 libimobiledevice-utils

Open Terminal

Open a command-line terminal on your machine.

Installation

Enter the commands provided below.

$ sudo zypper install libimobiledevice6 usbmuxd

Building from source

The provided build script will build the entire libimobiledevice stack with the least amount of external dependencies for macOS. Make sure to have Xcode Command Line Tools installed. It will build the latest code of every single libimobiledevice sub-project.

Installation

Open a terminal and type the following commands. During the process you will be asked for your user password which has the purpose of allowing the installation of the built libraries and tools to /usr/local/lib and /usr/local/bin via sudo.

$ mkdir -p limd-build
$ cd limd-build
$ curl -Ls -o limd-build-macos.sh https://is.gd/limdmacos
$ bash ./limd-build-macos.sh

The script can be reviewed here.

Open Terminal

Open a command-line terminal on your machine.

Installation

Enter the commands provided below.

$ sudo port install libimobiledevice

Open Terminal

Open a command-line terminal on your machine.

Installation

Enter the commands provided below.

$ brew install libimobiledevice

Building from source

Using MSYS2 is the official way of compiling this project on Windows. Download the MSYS2 installer and follow the installation steps.

The provided build script will build the entire libimobiledevice stack with the least amount of external dependencies for Windows.

Prerequesites

It is recommended to use the MSYS2 MinGW 64-bit shell. Run it and make sure the required dependencies are installed:

pacman -S base-devel \
    git \
    mingw-w64-x86_64-gcc \
    make \
    libtool \
    autoconf \
    automake-wrapper

Note that usbmuxd is currently not fully supported on Windows. To use this library you need to have Apple Mobile Device Support package installed (part of iTunes).

Installation

In the MSYS2 MinGW shell, type the following commands:

$ mkdir -p limd-build
$ cd limd-build
$ curl -Ls -o limd-build-msys2.sh https://is.gd/limdmsys2
$ bash ./limd-build-msys2.sh

The script can be reviewed here.

Open Terminal

Open a command-line terminal on your machine.

Install Dependencies

Enter the commands provided below.

$ sudo apt-get install \
    build-essential \
    checkinstall \
    git \
    autoconf \
    automake \
    libtool-bin \
    libplist-dev \
    libusbmuxd-dev \
    libssl-dev \
    usbmuxd

Build

Enter the commands provided below.

$ ./autogen.sh \
    --prefix=/opt/local \
    --enable-debug
$ make

Install

Enter the commands provided below.

$ sudo make install

Open Terminal

Open a command-line terminal on your machine.

Installation

Enter the commands provided below.

$ sudo apt-get install usbmuxd libimobiledevice6 libimobiledevice-utils

Latest News


ifuse 1.2.0

ifuse 1.2.0 has been released.

libimobiledevice 1.4.0

libimobiledevice 1.4.0 has been released. Finally a new official release!

FAQ

To test if you installed everything correctly plug in your device and run "ideviceinfo" within a terminal. Congratulations if it prints a lot of details about your device. Feel free to checkout the documentation or dive into the source code.
Sorry, music synchronization with newer devices is currently not supported but if you are a keen developer why not contribute a new service implementation for the ATC Service?
iFuse is only useful if you want to mount the device manually and if you do not have GNOME and GVFS installed. Otherwise it is useless since GNOME's GVFS supports accessing the device directly and creates a fuse mount in "$XDG_RUNTIME_DIR/.gvfs", too.
The library has shown to be compatible with firmware releases going back to the 1.x series up to todays without issues. At rare times, bugs introduced by the firmware had to be worked around with simple fixes but nothing major prevented it from working. Thus in effect, the implementation proves very stable and compatible among firmware releases.

Team


nikias
Nikias Bassen
@nikias
FunkyM
Martin Szulecki
@FunkyM

Join the Community

We are thrilled that you would like to contribute to this project. Your help is essential for keeping it great.


Contribute on GitHub

Warm welcome for pull requests and technical stuff.


Discuss on Mailing List

The classic way by E-Mail.


Ask on Stackoverflow

Best for general questions and support.


Follow on Twitter

For latest updates in a birdly manner.


Chat on Telegram

Get hands on with developers.


Chat on IRC

Get hands on in ASCII style.

We'll miss you, Steve.