idevice
Device Info & System

Diagnostics Relay

Read hardware, MobileGestalt, IORegistry, NAND, Wi-Fi, and battery diagnostics.

Diagnostics Relay exposes device diagnostic queries through DiagnosticsRelayClient. It also sends device power actions such as restart, shutdown, and sleep.

Use It For

  • Query IORegistry entries.
  • Read MobileGestalt keys.
  • Read gas gauge, NAND, and Wi-Fi diagnostics.
  • Send restart, shutdown, sleep, and goodbye requests.

Feature Flag

Cargo.toml
[dependencies]
idevice = { version = "0.1.64", features = ["usbmuxd", "diagnostics_relay"] }

Service Names

PathValue
Lockdowncom.apple.mobile.diagnostics_relay
RSDcom.apple.mobile.diagnostics_relay.shim.remote

Rust Example

src/main.rs
use idevice::{
    IdeviceService,
    diagnostics_relay::DiagnosticsRelayClient,
};

let provider = first_provider().await?;
let mut client = DiagnosticsRelayClient::connect(&provider).await?;
let battery = client.gasguage().await?;
println!("{battery:#?}");

CLI Equivalent

Terminal
idevice-tools diagnostics gasguage
idevice-tools diagnostics mobilegestalt ProductVersion,ProductType
idevice-tools diagnostics restart

Common Errors

ErrorWhat to check
Service not foundThe device/iOS version does not advertise this service on the selected transport.
Connection failedCheck pairing, trust state, and whether the selected provider can reach the device.
Permission errorThe service requires a device state, entitlement, or developer setting that is not active.

Source

On this page