Test on 50,000+ Real Android and iOS Devices

Live and Automated Real Device Testing on 50,000+ iOS and Android Devices. No Need to Buy or Maintain Device Lab

libimobiledevice: How to Install It, Pair an iPhone and Read Logs Without Xcode

libimobiledevice guide: install it on Linux, macOS or Windows, pair an iPhone with idevicepair, read logs with idevicesyslog and fix iOS 17+ gaps.

Summarise with AI

libimobiledevice is a free, open-source C library and set of command-line tools that talk to your iPhone/iPad over USB via Apple's own protocols (no jailbreak, no Xcode required). You install it on Linux, Mac or Windows, pair the device up with idevicepair and then you can read the logs with idevicesyslog, pull crash reports, get device info and install apps from the terminal.

This one covers libimobiledevice 1.4.0 (the current release on libimobiledevice.org as of 10th October 2025) and the iOS 17+ cases where you need to use pymobiledevice3 or go-ios instead.

TL;DR

libimobiledevice is a free, open-source library and toolset that pairs a Linux, macOS or Windows machine with an iPhone over USB, without Xcode or a jailbreak. Install it with your package manager, run idevicepair pair and tap Trust, then read logs with idevicesyslog and copy crash reports with idevicecrashreport.

How Do the libimobiledevice Tools Fit Together?

  • usbmuxd: The usbmuxd daemon multiplexes USB connections to iOS devices, and the idevice* tools reach the iPhone through it. On Linux, udev or systemd starts usbmuxd when you plug the phone in.
  • idevicepair: idevicepair pair creates the trust record every other tool needs. Unlock the phone, tap Trust, then confirm with idevicepair validate. Needs a jailbreak: No.
  • idevicesyslog: idevicesyslog streams the iPhone system log to your terminal. Filter it to one app with -p, hide noisy processes with -q and redirect the output to a file for the bug report.
  • ideviceinstaller: ideviceinstaller installs, lists and uninstalls apps from the command line. The .ipa must be signed for that device with a development or ad hoc profile that includes its UDID.
  • ifuse: ifuse mounts an app's Documents folder as a local directory with ifuse --documents and the app's bundle ID. Use ifuse 1.2.1 or later, because 1.2.0 has a data-corruption bug.

What Changes on Windows, iOS 17 and Cloud iPhones?

  • libimobiledevice on Windows: libimobiledevice builds on Windows with MSYS2, needs Apple's Mobile Device Support and has only partial usbmuxd support. pymobiledevice3 and go-ios both list Windows as supported.
  • iOS 17 developer services: On iOS 17 and later, pairing over USB works without a tunnel, but screenshots, location simulation and debugging need one. pymobiledevice3 and go-ios provide that tunnel.
  • Cloud iPhones (TestMu AI): libimobiledevice cannot attach to cloud iPhones because there is no local USB path. TestMu AI's Real Device Cloud shows device, crash and network logs in the session instead. Attaches to cloud iPhones: No.

What Is libimobiledevice?

libimobiledevice describes itself as a cross-platform FOSS library written in C for communicating with iOS devices natively.

It has around 8.4k stars on GitHub (as of 1st December 2026), and the README makes it very clear that it doesn't require a jailbreak.

libimobiledevice is an open-source library and CLI toolset that allows a Linux, macOS or Windows machine to pair with an iPhone over USB and utilize its services (system log, crash reports, app installation, file access, etc.) without the need for Xcode or a jailbreak.

Three pieces work together:

ComponentWhat it does
usbmuxdA socket daemon that multiplexes connections to iOS devices over USB. On Linux, udev or systemd starts it when you plug a device in, and it exits when the last device is unplugged.
libimobiledeviceThe library plus the idevice* tools (pairing, info, syslog, crash reports, screenshots and more).
Add-on projectsideviceinstaller (apps), ifuse (file access), idevicerestore (firmware), each a separate package.

libimobiledevice is a device access tool. It's not a test framework in itself and doesn't run UI tests. It's used in conjunction with a test framework (e.g. XCTest or Appium) to get the logs, crash files and app installs from the phone under test.

If you're looking for a lot of iPhone models and iOS versions without having to buy the devices or a Mac, then cloud iOS app testing on real iPhones will cover that. The cloud section below maps each of the local commands to the equivalent.

For a quick visual walkthrough of this concept, watch the video below from TestMu AI.

Youtube thumbnail

Subscribe to the TestMu AI YouTube channel for more tutorials on testing and automation.

How Do You Install libimobiledevice?

Use your platform's package manager first. Only build from source if you need a fix that's newer than your distro ships.

Debian or Ubuntu (package names from libimobiledevice.org):

sudo apt-get update
sudo apt-get install -y usbmuxd libimobiledevice-utils

Fedora (libimobiledevice-utils 1.4.0 on Fedora 44 and 45) and Arch (libimobiledevice 1.4.0 in the Extra repository):

sudo dnf install libimobiledevice-utils
sudo pacman -S libimobiledevice usbmuxd

macOS with Homebrew or MacPorts:

brew install libimobiledevice
# or
sudo port install libimobiledevice

Windows: supported with limitations. libimobiledevice.org states MSYS2 is the official way to build the project on Windows (via the libimobiledevice.org instructions), that you'll need Apple's Mobile Device Support (part of iTunes) and that usbmuxd is not yet fully supported on Windows.

The RemoteXPC write-up from TestMu AI notes that on Windows the first trust step is done via the Apple Devices app from the Microsoft Store. If you just need logs and app installs on Windows, then pymobiledevice3 or go-ios (both of which are covered below) may actually be easier to get set up as both of those list Windows as supported.

Check the install:

idevice_id --list          # UDIDs of devices attached over USB
ideviceinfo -k ProductVersion

If idevice_id --list comes up blank when the phone is plugged in, go to the troubleshooting section. On Linux, run usbmuxd in the foreground with verbose output to see what it sees: sudo usbmuxd -f -v.

How Do You Pair an iPhone With idevicepair?

Pairing creates a trust record between your computer and the device. All the other tools need it. Unlock the phone, plug it in and then run:

idevicepair pair

The phone shows a Trust This Computer? prompt. Tap Trust and enter the passcode, then confirm:

idevicepair validate
idevicepair list          # devices paired with this host

The full command set from the idevicepair manual:

CommandWhat it does
idevicepair pairPair the device with this host
idevicepair validateCheck that the device is paired with this host
idevicepair unpairRemove the pairing
idevicepair listList devices paired with this host
idevicepair hostidPrint the host ID for the device
idevicepair systembuidPrint the system BUID of the usbmuxd host
-u UDIDTarget one device when several are plugged in
-wWireless pairing (used for Apple TV pairing mode)

Pairing records live in /var/lib/lockdown on Linux and /var/db/lockdown on macOS (per the usbmuxd README). If pairing keeps failing after an iOS update or a device reset, then run idevicepair unpair, unplug and replug the phone and then run idevicepair pair again.

Note

Note: No Mac and no spare iPhones? TestMu AI will run your .ipa on real iPhones in the browser with device logs, crash logs and network logs all in the same session. Start with real device app testing: go to App Testing under Real Device, select iOS, upload your app, pick the device and click Start.

Which libimobiledevice Commands Do You Actually Need for Testing?

These are the tools that a tester uses most. The descriptions are taken from the project README and the Debian manual pages.

TaskCommandNotes
List devicesidevice_id --list--network lists devices available over the network
Device detailsideviceinfo / ideviceinfo -k ProductVersionFull key dump, or one key such as the iOS version
Live system logidevicesyslogFilter with -p (process), -m (text), -q (hide noisy processes)
Crash reportsidevicecrashreport -e -k ./crashes-e writes separate .crash files, -k leaves them on the device
ScreenshotidevicescreenshotNeeds a mounted developer disk image
Simulated locationidevicesetlocationNeeds a mounted developer disk image
Mount developer imageideviceimagemounter1.4.0 added iOS 17+ personalized image support
Install, list, remove appsideviceinstaller install App.ipa / list / uninstall <bundle id>Separate project; recent builds use these subcommands
Browse app documentsifuse --documents <bundle id> ./mntSeparate project; unmount with fusermount -u ./mnt

How Do You Read iPhone Logs With idevicesyslog?

idevicesyslog will relay the device's system log to your terminal. The unfiltered stream is very noisy so filter by your app's name of the process and save to a file:

APP_PROCESS="${APP_PROCESS:?Set APP_PROCESS to your app process name}"
idevicesyslog -p "$APP_PROCESS" -q > "syslog-$(date +%Y%m%d-%H%M%S).log"

Useful flags from the idevicesyslog manual: -u UDID for one device, -x to exit when the device disconnects, -K to drop the kernel messages, -t STRING to start logging only when a string appears. Run idevicesyslog pidlist (1.4.0 and later) to see the running process names.

How Do You Install an .ipa With ideviceinstaller?

ideviceinstaller install ./build/MyApp.ipa
ideviceinstaller list                    # prints installed bundle identifiers
ideviceinstaller uninstall com.example.myapp

For GUI and over-the-air options, see other ways to install an IPA on the iPhone.

The .ipa must be signed for that device (a development or ad hoc profile that includes its UDID). The older distro packages of ideviceinstaller use flag-style syntax, so if a subcommand is rejected, check ideviceinstaller --help.

How Do You Mount iPhone Files With ifuse?

mkdir -p ./iphone-docs
ifuse --list-apps                                   # find the app's bundle ID
ifuse --documents com.example.myapp ./iphone-docs   # app's Documents folder
ls ./iphone-docs
fusermount -u ./iphone-docs

Use ifuse 1.2.1 or later. The ifuse README has a warning that 1.2.0 has a bug which corrupts data. On macOS you'll need macFUSE and its system extension enabled.

A Script to Collect an iPhone Debug Bundle

This script takes the above commands and turns them into a single repeatable step for bug reports. It will simply stop with a clear error if no device is attached or the device isn't paired. It will record the iOS version, capture the app log for a set period of time and then copy the crash reports without deleting them from the phone.

#!/usr/bin/env bash
# Usage: APP_PROCESS=MyApp CAPTURE_SECONDS=60 ./iphone_debug_bundle.sh
set -euo pipefail

: "${APP_PROCESS:?Set APP_PROCESS to the app process name}"
CAPTURE_SECONDS="${CAPTURE_SECONDS:-60}"
OUT="iphone-bundle-$(date +%Y%m%d-%H%M%S)"
mkdir -p "$OUT/crashes"

UDID="${UDID:-$(idevice_id --list | head -n 1 || true)}"
if [[ -z "$UDID" ]]; then
  echo "ERROR: no iPhone attached over USB (idevice_id --list is empty)" >&2
  exit 1
fi

if ! idevicepair -u "$UDID" validate; then
  echo "ERROR: $UDID is not paired. Unlock it and run: idevicepair -u $UDID pair" >&2
  exit 1
fi

ideviceinfo -u "$UDID" -k ProductVersion > "$OUT/ios-version.txt"
ideviceinfo -u "$UDID"                   > "$OUT/device-info.txt"

echo "Capturing $APP_PROCESS log for ${CAPTURE_SECONDS}s. Reproduce the bug now."
rc=0
timeout "$CAPTURE_SECONDS" idevicesyslog -u "$UDID" -p "$APP_PROCESS" -q > "$OUT/syslog.log" || rc=$?
if [[ $rc -ne 0 && $rc -ne 124 ]]; then
  echo "ERROR: idevicesyslog exited with code $rc" >&2
  exit 1
fi

idevicecrashreport -u "$UDID" -e -k "$OUT/crashes"

if [[ ! -s "$OUT/syslog.log" ]]; then
  echo "WARNING: no log lines matched process '$APP_PROCESS'. Check the name with: idevicesyslog pidlist" >&2
  exit 2
fi

echo "Bundle ready in $OUT"

timeout exits with code 124 when it stops the log stream at the end of the window (this is the expected behavior). Any other non-zero code (i.e. a disconnect or a service error) will stop the script. Set UDID to pick one device if multiple are attached.

An empty log is a failure as it typically indicates the name of the process is incorrect. Recent idevicesyslog builds also accept -o FILE, which will write the log without the color codes.

Why Does idevicepair Fail and How Do You Fix It?

The majority of libimobiledevice issues are pairing issues. The messages below are the strings that idevicepair prints (from the tool's source).

Message or symptomCauseFix
No device found.usbmuxd does not see the phoneUse a data cable, unlock the phone, check sudo usbmuxd -f -v on Linux; on Windows, complete the first trust step in the Apple Devices app
ERROR: Please accept the trust dialog on the screen of device …, then attempt to pair again.The Trust prompt is waitingUnlock the phone, tap Trust, run idevicepair pair again
ERROR: Device … said that the user denied the trust dialog.Don't Trust was tappedUnplug, replug, run idevicepair pair, tap Trust
ERROR: Could not validate with device … because a passcode is set. Please enter the passcode on the device and retry.The phone is lockedUnlock it and retry
Paired yesterday, fails todayStale pairing record after an iOS update or resetidevicepair unpair, unplug and replug, then idevicepair pair
idevicescreenshot or idevicesetlocation failsNo developer disk image mounted, or iOS 17+ developer services need a tunnelOn iOS 16 and earlier, mount the image with ideviceimagemounter; on iOS 17+, use pymobiledevice3 or go-ios over a tunnel
Test your website on the TestMu AI real device cloud

Does libimobiledevice Work With iOS 17 and Later?

On iOS 17 and later, pairing over USB still works without a tunnel, but developer services (screenshots, location simulation, process lists and debugging) require a tunnel. The libimobiledevice 1.4.0 change for iOS 17+ only covers mounting the personalized developer disk image. For the developer services that require a tunnel, use pymobiledevice3 or go-ios.

The RemoteXPC workshop write-up from Testμ 2026 explains the break. Prior to iOS 17, usbmuxd was the conduit, and USB was the only transport. iOS 17 moved device services behind CoreXPC and RemoteXPC, and as such the old service paths are now dead and a tunnel is required.

usbmuxd and lockdown will still find the paired device; the services then run over the tunnel.

Diagram of how libimobiledevice reaches an iPhone over USB on iOS 16 and earlier, which services need a tunnel on iOS 17 and later, and how a cloud iPhone replaces the USB path
TaskiOS 17+Source
Pairing over USBNo tunnel neededpymobiledevice3 installation guide
Mounting the developer disk imagePersonalized image mounting added in libimobiledevice 1.4.0libimobiledevice 1.4.0 changelog
Screenshot, location simulation, developer-tools process listTunnel needed (developer services)pymobiledevice3 guide
Debugging with debugserver and lldbTunnel neededpymobiledevice3 guide
System logNot listed as needing a tunnelpymobiledevice3 guide
Device info, crash reports, app install, ifuseNot covered by these sourcesCheck on an iOS 17 or 18 device before relying on it

The tunnel commands, from the pymobiledevice3 guide and the go-ios README:

CaseCommandNeeds root?
iOS 17.4+ over USBpymobiledevice3 developer commands build a userspace tunnel automatically; or sudo pymobiledevice3 lockdown start-tunnelNo for the automatic tunnel
iOS 17.0 to 17.3 on Linux or Windowssudo pymobiledevice3 remote tunneldYes (Administrator on Windows)
iOS 17+ with go-iossudo ios tunnel startYes
ToolLanguageiOS 17+ developer servicesWindowsInstall
libimobiledevice 1.4.0CPersonalized disk image mountingMSYS2 build, partial usbmuxd supportapt, dnf, pacman, Homebrew, MacPorts
pymobiledevice3PythonDeveloper services over a tunnelYesuv tool install --managed-python pymobiledevice3
go-iosGoRun sudo ios tunnel start firstYes (needs wintun.dll)npm install -g go-ios

The equivalent first commands, from each project's README:

# pymobiledevice3
pymobiledevice3 usbmux list
pymobiledevice3 syslog live

# go-ios
ios list
ios syslog
ios install --path=./build/MyApp.ipa

A practical split: keep libimobiledevice around for the pairing, logs and the various bits and pieces that just get passed on to your device. Use pymobiledevice3 or go-ios for the developer services on iOS 17 and later.

Can You Use libimobiledevice With Cloud iPhones?

No. libimobiledevice talks to the devices that are plugged into your machine via usbmuxd. TestMu AI's docs don't provide a local USB or usbmuxd connection to their cloud iPhones, so idevicepair and idevicesyslog can't attach to them.

The cloud does the same job via the session and the dashboard.

Tasklibimobiledevice (local)TestMu AI real iPhones
Install the appideviceinstaller install App.ipaUpload in App Testing, or POST the .ipa to the app upload API and use the returned lt:// app URL
System logidevicesyslogDevice tab in the session's Logs section (set devicelog: true for automated runs)
Crash reportsidevicecrashreportCrash tab, captured automatically when the app crashes
Network trafficNot coveredNetwork tab (network: true); apps with SSL pinning may not be captured, as the docs state
Many models and iOS versionsOne phone per USB portiPhone 8 to iPhone 18 Pro on iOS 14 to 27, per the iOS app testing page description
Needs a MacNoNo

Log details, capability names and the SSL-pinning limitation are in the debugging logs guide. Per the real-device docs, manual app testing on real devices needs the Real Device Plus Live plan or an Enterprise plan.

An upload from CI uses HTTP basic auth with your username and access key from the environment variables. The upload endpoint and the app_url response field are as per the app upload API docs. jq -e is used to ensure the step fails if the field is missing:

: "${LT_USERNAME:?Set LT_USERNAME}"
: "${LT_ACCESS_KEY:?Set LT_ACCESS_KEY}"
IPA_PATH="${IPA_PATH:-./build/MyApp.ipa}"
APP_NAME="${APP_NAME:-MyApp}"
[[ -f "$IPA_PATH" ]] || { echo "No IPA at $IPA_PATH" >&2; exit 1; }

APP_URL="$(curl -sS --fail -u "$LT_USERNAME:$LT_ACCESS_KEY" \
  -X POST "https://manual-api.lambdatest.com/app/upload/realDevice" \
  -F "appFile=@$IPA_PATH" -F "name=${APP_NAME}" | jq -er '.app_url')"
echo "Uploaded: $APP_URL"   # lt://APP... for the Appium 'app' capability

The documentation lists a 1GB maximum app size and notes that an upload can take as long as a minute.

The upload script returning an lt:// app URL, and device log lines from a real iPhone 15 on iOS 17.5.1 in a TestMu AI session run with devicelog: true

The USB-to-Bug-Report Checklist

Run these six checks before you attach iPhone evidence to a bug:

  • Device seen. idevice_id --list shows the UDID.
  • Pairing valid. idevicepair validate succeeds with the phone unlocked.
  • Version recorded. ideviceinfo -k ProductVersion and the full ideviceinfo dump are saved with the report.
  • Filtered log. The syslog is filtered down to your app's process along with timestamps covering the repro.
  • Crash files kept. idevicecrashreport -e -k copied .crash files without deleting them from the phone.
  • Coverage beyond one phone. The same build is checked on other iPhone models and iOS versions (both locally and on real cloud devices) prior to the bug being closed as fixed.

For writing the XCTest and XCUITest suites that run on those devices, see the XCTest tutorial on TestMu AI.

How to Access Device Logs on Real Devices - the cloud equivalent of idevicesyslog: enable and read device logs in a real device session.

Youtube thumbnail

Real Time App Testing on Real Devices - upload your app and test it live on a real device in the browser.

Youtube thumbnail

Conclusion

Start with one phone on your desk: install the tools, pair it with idevicepair and run the debug-bundle script the next time a bug report needs iPhone evidence. On iOS 17 and later, add pymobiledevice3 or go-ios for screenshots, location simulation and debugging. For the Android side of the same workflow, see scrcpy.

Test on real iPhones without a Mac or a device drawer. Upload your .ipa to App Live on TestMu AI, pick an iPhone model and iOS version, and debug with device, crash and network logs in the same session.

Testing iOS apps on iPhones you don't own? TestMu AI's Real Device Cloud runs live and automated sessions on 50,000+ real iOS and Android devices, with device logs, network logs and video for every session.

To run your first test, start free, or
for a full walkthrough of the product.

Was this helpful?

Authors

Shubham Soni

Shubham Soni

Author · 13 posts

Shubham Soni is a Senior Member of Technical Staff at TestMu AI, building the Real Device Cloud and real-time testing infrastructure. He optimized the WebRTC services that power live testing to sub-100ms latency with adaptive bitrate streaming, led a frontend migration from Angular to React that cut page load time from 5-6 seconds to 1-1.5 seconds, and contributes to the official Device SDK. He led a team of four to build an accessibility testing product covering manual and automated testing and mentored a team of six on a real-time testing product. He brings over eight years of experience and earlier scaled a cloud code platform to 200K+ monthly users. Shubham holds a B.Tech in Computer Science.

Srinivasan Sekar

Srinivasan Sekar

Reviewer

Srinivasan Sekar is Director of Engineering at TestMu AI, where he leads engineering and open-source initiatives behind the Selenium and Appium automation grid and owns TestMu AI's MCP Server. A committer to Appium and a contributor to Selenium, WebdriverIO, Taiko, and AppiumTestDistribution, he brings over 15 years of experience in quality engineering and open-source technologies. He is the author of the Apress book 'The MCP Standard: A Developer's Guide to Building Universal AI Tools with the Model Context Protocol,' a Certified Kubernetes and Cloud Native Associate, and an international conference speaker. Before TestMu AI he spent over eight years at Thoughtworks as a Principal Consultant and Quality Architect. Srinivasan holds a B.Tech in Information Technology from Anna University.

libimobiledevice FAQs

TestMu AI forEnterprise

Get access to solutions built on Enterprise
grade security, privacy, & compliance

  • Advanced access controls
  • Advanced data retention rules
  • Advanced Local Testing
  • Premium Support options
  • Early access to beta features
  • Private Slack Channel
  • Unlimited Manual Accessibility DevTools Tests