DeviceTree

A device tree (or DeviceTree) is a tree containing information about a device's various ports and peripherals. It is used by bootloaders (iBoot in the case of iOS) to provide the kernel with a map of the hardware. In iOS' case, most nodes in the tree file are empty (null), and are instead populated by iBoot before control is passed over to the kernel (XNU).

This file is present in all IPSW files and is the same for every version of iOS (but different for each device). Despite being the same for every version of iOS, the encryption keys are different each time.

Payload Format

Once extracted from the outer container (IMG2, IMG3, or IMG4), the device tree can be dumped. It follows a simple binary tree format that can be described in just three structures (two if you don't count the root node):

DeviceTree {
   0  DTreeNode root;
}
DTreeNode {
   0  uint32  propCount;
   4  uint32  childrenCount;
   8  DTreeNodeProp[] props;    // count(props) == propCount
????  DTreeNode[]     children; // count(children) == childrenCount
}
DTreeNodeProp {
   0  uint8[32] name;
  20  uint32    length;
  24  uint8[]   value; // sizeof(value) == length
????  uint8[]   pad;   // pad to multiple of four bytes
}

Device Trees from iDevices

Listed below are links to device trees for all iDevices. For devices where there are multiple variants with the same identifier (such as iPad6,11 with J71sAP and J71tAP), both variants' trees will be listed on the same page.

AirPods

Apple TV

Apple TV Accessories

  • Siri Remote: ???
  • Siri Remote (2nd generation): ???

Apple Watch

HomePod

iPad

iPad Air

iPad mini

iPad Pro

iPad Accessories

  • Apple Pencil: ???
  • Apple Pencil (2nd generation): ???
  • Smart Keyboard: ???
  • Smart Keyboard Folio: ???

iPhone

iPod touch