idevice

Architecture

How idevice is layered internally.

idevice is built around a few small layers:

  1. usbmuxd finds USB-connected devices and opens sockets to them.
  2. LockdownClient starts device services through lockdown on port 62078.
  3. IdeviceProvider hides where the connection comes from.
  4. IdeviceService gives services a shared connect() pattern.
  5. RsdService covers services reached through RSD on newer iOS versions.
  6. RemoteXpcClient speaks XPC over HTTP/2.
  7. CoreDeviceServiceClient wraps newer CoreDevice services.

Lockdown-backed services use this path:

usbmuxd -> lockdown -> start_service -> service port -> optional TLS

iOS 17+ RSD/CoreDevice developer services use this path:

RSD handshake -> RemoteXPC -> CoreDevice tunnel -> XPC service

Main traits

IdeviceProvider is the main abstraction for opening connections. A provider can represent a USB device through usbmuxd, a network device over TCP, or a newer RSD/CoreDevice path.

IdeviceService is the shared pattern for lockdown-backed services. A service declares its service name, asks lockdown to start it, opens the returned port, and wraps the stream.

RsdService is the equivalent shape for services reached through RSD. These services do not use the older lockdown start_service flow.

On this page