diff options
author | BALATON Zoltan | 2018-10-08 22:55:51 +0200 |
---|---|---|
committer | BALATON Zoltan | 2018-10-08 22:55:51 +0200 |
commit | f4d36e36cf6a32b1fbd62e57d55c0b4c67c387d0 (patch) | |
tree | 68d592bf8f37e865d1ec0adc7369315a3c2aae95 /src | |
parent | 6d66394439149f74764404b169d1d19c47fdceb8 (diff) | |
download | libusbmuxd-f4d36e36cf6a32b1fbd62e57d55c0b4c67c387d0.tar.gz libusbmuxd-f4d36e36cf6a32b1fbd62e57d55c0b4c67c387d0.tar.bz2 |
Add hyphen to new style UDIDs introduced with iPhone XS/XR
Diffstat (limited to 'src')
-rw-r--r-- | src/libusbmuxd.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libusbmuxd.c b/src/libusbmuxd.c index 1097f1d..a183919 100644 --- a/src/libusbmuxd.c +++ b/src/libusbmuxd.c @@ -1011,6 +1011,11 @@ static usbmuxd_device_info_t *device_info_from_device_record(struct usbmuxd_devi memset(devinfo->udid, '\0', sizeof(devinfo->udid)); memcpy(devinfo->udid, dev->serial_number, sizeof(devinfo->udid)); + if (strlen(devinfo->udid) == 24) { + memmove(&devinfo->udid[9], &devinfo->udid[8], 17); + devinfo->udid[8] = '-'; + } + if (strcasecmp(devinfo->udid, "ffffffffffffffffffffffffffffffffffffffff") == 0) { sprintf(devinfo->udid + 32, "%08x", devinfo->handle); } |