idevicediagnostics
Retrieve diagnostics from connected iOS devices
TLDR
Print diagnostics information
Print mobilegestalt key values
Shutdown, restart, or sleep the device
SYNOPSIS
idevicediagnostics [-u, --udid UDID] [-d, --debug] [-n, --network] [subcommand] [args]
PARAMETERS
-d, --debug
Enable communication debugging output
-u UDID, --udid UDID
Target device by UDID
-n, --network
Connect to network-attached device
-h, --help
Print usage information
diagnostics
Relay all available diagnostics (default subcommand)
getdiag CLASS
Get specific diagnostic class, e.g., com.apple.iOS.Diagnostics.*
ping
Ping the diagnostics service
DESCRIPTION
The idevicediagnostics command is part of the libimobiledevice suite, a cross-platform library enabling Linux communication with Apple iOS devices without iTunes or proprietary software. It interacts with the iOS Diagnostics Service (com.apple.DiagnosticsRelay), allowing users to retrieve diagnostic logs, perform health checks, and relay device telemetry.
Primarily used for debugging iOS hardware/software issues, it supports connected USB devices or network-attached ones via Wi-Fi. Common tasks include fetching crash reports, battery health data, sensor readings, and system diagnostics. Output is typically in XML or plist format, parseable for analysis.
Requires a paired/trusted device; use idevicepair for setup. Debug mode aids troubleshooting communication. Ideal for developers, sysadmins, and forensic analysts examining iOS telemetry on non-macOS systems.
CAVEATS
Requires libimobiledevice & usbmuxd; device must be unlocked & trusted. Network mode needs prior pairing. XML output may require plutil or xmllint for readability. Not all diagnostics available on all iOS versions.
INSTALLATION
Install via apt install libimobiledevice-utils (Debian/Ubuntu) or equivalent. Ensure usbmuxd daemon running.
EXAMPLE USAGE
idevicediagnostics diagnostics
idevicediagnostics -u <UDID> getdiag com.apple.iOS.Diagnostics.Baseband
HISTORY
Developed as part of libimobiledevice project (since ~2007) by open-source community to support iOS on Linux/FreeBSD. Enhanced in versions 1.3+ with diagnostics relay support matching iOS 10+. Actively maintained for latest iOS.
SEE ALSO
ideviceinfo(1), idevice_id(1), idevicepair(1), usbmuxd(8)


