Two commits, reviewable separately.
1. Add Apple T1 coprocessor (iBridge1,1 / x619ap) to the device table. The T1 in the 2016 and 2017 Touch Bar MacBook Pros (MacBookPro13,2, 13,3, 14,2, 14,3) runs its own EmbeddedOS and enumerates over the host's internal USB as 05ac:8600, or 05ac:1281 in recovery when it has nothing to boot. It identifies as iBridge1,1 / x619ap, CPID 0x8002, BDID 0x12; all four machines share that identity. Placed next to the existing T2 (iBridge2,x) entries.
2. Make the iSerialNumber string read robust to slow or failing devices. libusb_get_string_descriptor_ascii() uses a fixed 1 s timeout. The T1 in recovery answers the iSerialNumber read only intermittently and often later than that, so the read returns LIBUSB_ERROR_TIMEOUT. Losing it costs the device identity and the AP/SEP nonces, and in _irecv_handle_device_add() it meant giving up: IRECV_DEVICE_ADD was never emitted and callers concluded nothing was attached. The commit:
- retries the descriptor read with libirecovery's own
USB_TIMEOUTwhen the libusb helper fails; - on Linux, when there is still no iBoot string, falls back to the serial string the kernel already cached for the same bus/devnum under
/sys/bus/usb/devices(used when opening a device and in the hotplug add handler; never fatal; compiled to a no-op elsewhere); - only assumes the legacy CPID
0x8900when the iBoot string is non-empty but has noCPID:field. An empty string means the read failed, and claiming0x8900there mis-identifies every modern part.
Devices that answer the first read promptly take exactly the path they take today. The second commit is not T1-specific; if you would rather take it on its own, or not at all, the first commit stands alone.
Testing. Linux only (libusb backend), on a MacBookPro14,3: with these two changes irecovery -q identifies the T1 in recovery reliably, and a full Linux-only EmbeddedOS restore of the T1 through idevicerestore completes (t1-revive carries exactly these changes as its libirecovery patch). Not tested on the IOKit or Windows backends; the new code is under #ifndef HAVE_IOKIT / #ifdef __linux__.
Offered under the project's existing LGPL-2.1 terms.
🤖 Generated with Claude Code