| name | ios-device-screenshot |
| description | Use when capturing screenshots from physical iOS devices connected via USB using pymobiledevice3. |
| metadata | {"author":"0xbigboss"} |
iOS Device Screenshot
Take screenshots from physical iOS devices connected via USB using pymobiledevice3.
Installation
uv tool install pymobiledevice3
pipx install pymobiledevice3
Prerequisites
- Physical iOS device connected via USB
- Developer Mode enabled on the device (Settings > Privacy & Security > Developer Mode)
- Device trusted - approve "Trust This Computer" prompt on device
Usage
For iOS 17+ (including iOS 26+)
iOS 17+ requires a tunneld daemon running with root privileges:
sudo pymobiledevice3 remote tunneld
pymobiledevice3 developer dvt screenshot --tunnel "" /path/to/screenshot.png
The --tunnel "" flag tells it to use the tunneld for device communication.
For iOS 16 and earlier
pymobiledevice3 developer screenshot /path/to/screenshot.png
Quick Reference
xcrun devicectl list devices
ideviceinfo -k ProductVersion
ideviceimagemounter list
pymobiledevice3 mounter auto-mount --tunnel ""
pymobiledevice3 developer dvt screenshot --tunnel "" ~/Desktop/screenshot.png
pymobiledevice3 developer dvt screenshot --tunnel "00008101-001E05A41144001E" ~/Desktop/screenshot.png
Important: When multiple devices are connected, pass the UDID directly to --tunnel (not --udid). The --tunnel "" syntax prompts for interactive selection which fails in non-interactive shells.
Troubleshooting
"InvalidServiceError" or "Failed to start service"
- Ensure tunneld is running:
ps aux | grep tunneld
- If not running:
sudo pymobiledevice3 remote tunneld
- Use the DVT command instead of regular screenshot:
developer dvt screenshot instead of developer screenshot
"DeveloperDiskImage not mounted"
pymobiledevice3 mounter auto-mount --tunnel ""
Multiple devices connected
Specify the target device with --udid:
xcrun devicectl list devices
pymobiledevice3 developer dvt screenshot --tunnel "" --udid "40182233-00C8-51ED-8C68-174E14E4B4C9" /tmp/screenshot.png
Key Discovery
For iOS 17+, the regular pymobiledevice3 developer screenshot command often fails even with tunneld running. The solution is to use the DVT (Developer Tools) variant:
pymobiledevice3 developer screenshot --tunnel "" /tmp/screenshot.png
pymobiledevice3 developer dvt screenshot --tunnel "" /tmp/screenshot.png
Integration Example
#!/bin/bash
OUTPUT="/tmp/ios-screenshot-$(date +%Y%m%d-%H%M%S).png"
if ! pgrep -f "pymobiledevice3 remote tunneld" > /dev/null; then
echo "Starting tunneld (requires sudo)..."
sudo pymobiledevice3 remote tunneld &
sleep 3
fi
pymobiledevice3 developer dvt screenshot --tunnel "" "$OUTPUT"
if [ -f "$OUTPUT" ]; then
echo "Screenshot saved to: $OUTPUT"
open "$OUTPUT"
else
echo "Failed to capture screenshot"
exit 1
fi
Converted and distributed by TomeVault — claim your Tome and manage your conversions.