phone_home_layout
Reads all iPhone Home Screen pages, Dock, folders, and widget stacks; backs up, previews, applies, or restores layouts from a plist without screenshots or swiping.
Instructions
Read all home-screen pages, Dock, folder pages and widget stacks from the paired iPhone without opening folders, swiping, or taking screenshots. Optional page selects one zero-based page to reduce output. Requires a configured physical target reachable through usbmuxd. This metadata read does not require drivable=true or a running XCTest Runner; never reconnect or open Home solely for this read. Page indexes refer to persisted icon state, including hidden/Focus-filtered pages; they are not the visible page-control indexes. Zero-based row/col positions are derived from icon-state order and grid metrics; null positions or positions_complete=false mean unknown, never safe drag coordinates. Contains no pixel coordinates. An unreadable device returns an error rather than an empty home screen. Writing (action): backup saves the layout as a plist on the Mac; preview compares a plist with the phone by app identifier (added, removed, moved, widgets that would be lost); apply/restore replace the whole layout, only with confirm=true after the person agreed to the preview, and back up the replaced layout first. After a write read again: SpringBoard may bring App Library apps back over a few passes. Undo with action=restore.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | Absolute path of a layout .plist on the Mac (from a backup). | |
| page | No | ||
| action | No | Omit to read. `backup` saves the current layout on the Mac; `preview` shows what writing `file` would change, by app identifier; `apply` writes `file`; `restore` writes the newest automatic backup (or `file`). | |
| confirm | No | apply/restore only: true writes. Without it the preview comes back and nothing changes; show it to the person and ask first. | |
| instance | No | Installed local instance name, such as i13 or default. Omit to use the configured daemon. No fallback on failure. |