Getting serial port output on modern Macs
4 days ago
- #UART
- #Jailbreak
- #macvdmtool
- Modern devices default to serial output over DockChannel by default, making macvdmtool serial ineffective.
- To use legacy UART, disable SIP and boot-arg filtering on the target device.
- Set boot args: `serial=3` (or another value) and `use-legacy-uart=1` for macOS 14 or below.
- For macOS 15 or above, download an IPSW, extract DeviceTree, find `uart0` node's `AAPL,phandle`, and set `serial-device=[value]`.
- Reboot and ensure boot args are set correctly, then connect host and target via the correct DFU port.
- Run `macvdmtool reboot serial` on the host device; Monterey or above requires removing `AppleSerialShim` from the boot KC.
- For logging, use `sudo picocom -q --omap crlf --imap lfcrlf -b 115200 /dev/tty.debug-console`.
- Jailbreak is required for iOS; compile stacksmashing's macvdmtool fork (iphone15 branch) for iOS.
- If no private headers, copy `IOCFPlugIn.h` and modify `AppleHPMLib.h` and `main.cpp` before compiling.
- Alternatively, build for macOS and convert for iOS using `vtool` and `install_name_tool`, then sign with specific entitlements.
- Actions like DFU and reboot will work, but serial functionality is unavailable on iOS.