diff options
| author | 2012-09-21 11:22:18 +0200 | |
|---|---|---|
| committer | 2012-09-21 11:22:18 +0200 | |
| commit | e22c85cbf5211b3f8b87c9ee824cf4ccd70cab36 (patch) | |
| tree | d118241b6cdf683366723e6ce1220474f8ab61db | |
| parent | a66e7cd6ef03ba4ae2af5ebfb62118c76c70b48a (diff) | |
| download | libirecovery-e22c85cbf5211b3f8b87c9ee824cf4ccd70cab36.tar.gz libirecovery-e22c85cbf5211b3f8b87c9ee824cf4ccd70cab36.tar.bz2 | |
updated with iPhone5 models.
| -rw-r--r-- | include/libirecovery.h | 7 | ||||
| -rw-r--r-- | src/libirecovery.c | 16 |
2 files changed, 23 insertions, 0 deletions
diff --git a/include/libirecovery.h b/include/libirecovery.h index 0323135..781123b 100644 --- a/include/libirecovery.h +++ b/include/libirecovery.h | |||
| @@ -58,6 +58,7 @@ extern "C" { | |||
| 58 | #define CPID_IPAD31 0x8945 | 58 | #define CPID_IPAD31 0x8945 |
| 59 | #define CPID_IPAD32 0x8945 | 59 | #define CPID_IPAD32 0x8945 |
| 60 | #define CPID_IPAD33 0x8945 | 60 | #define CPID_IPAD33 0x8945 |
| 61 | #define CPID_IPHONE5 0x8950 | ||
| 61 | 62 | ||
| 62 | #define BDID_UNKNOWN -1 | 63 | #define BDID_UNKNOWN -1 |
| 63 | #define BDID_IPHONE2G 0x00 | 64 | #define BDID_IPHONE2G 0x00 |
| @@ -80,6 +81,8 @@ extern "C" { | |||
| 80 | #define BDID_IPAD31 0x00 | 81 | #define BDID_IPAD31 0x00 |
| 81 | #define BDID_IPAD32 0x02 | 82 | #define BDID_IPAD32 0x02 |
| 82 | #define BDID_IPAD33 0x04 | 83 | #define BDID_IPAD33 0x04 |
| 84 | #define BDID_IPHONE51 0x00 | ||
| 85 | #define BDID_IPHONE52 0x02 | ||
| 83 | 86 | ||
| 84 | #define DEVICE_UNKNOWN -1 | 87 | #define DEVICE_UNKNOWN -1 |
| 85 | #define DEVICE_IPHONE2G 0 | 88 | #define DEVICE_IPHONE2G 0 |
| @@ -102,6 +105,8 @@ extern "C" { | |||
| 102 | #define DEVICE_IPAD31 17 | 105 | #define DEVICE_IPAD31 17 |
| 103 | #define DEVICE_IPAD32 18 | 106 | #define DEVICE_IPAD32 18 |
| 104 | #define DEVICE_IPAD33 19 | 107 | #define DEVICE_IPAD33 19 |
| 108 | #define DEVICE_IPHONE51 20 | ||
| 109 | #define DEVICE_IPHONE52 21 | ||
| 105 | 110 | ||
| 106 | enum { | 111 | enum { |
| 107 | kRecoveryMode1 = 0x1280, | 112 | kRecoveryMode1 = 0x1280, |
| @@ -204,6 +209,8 @@ static struct irecv_device irecv_devices[] = { | |||
| 204 | { 17, "iPad3,1", "j1ap", 0x00, 0x8945 }, | 209 | { 17, "iPad3,1", "j1ap", 0x00, 0x8945 }, |
| 205 | { 18, "iPad3,2", "j2ap", 0x02, 0x8945 }, | 210 | { 18, "iPad3,2", "j2ap", 0x02, 0x8945 }, |
| 206 | { 19, "iPad3,3", "j2aap", 0x04, 0x8945 }, | 211 | { 19, "iPad3,3", "j2aap", 0x04, 0x8945 }, |
| 212 | { 20, "iPhone5,1", "n41ap", 0x00, 0x8950 }, | ||
| 213 | { 21, "iPhone5,2", "n42ap", 0x02, 0x8950 }, | ||
| 207 | { -1, NULL, NULL, -1, -1 } | 214 | { -1, NULL, NULL, -1, -1 } |
| 208 | }; | 215 | }; |
| 209 | 216 | ||
diff --git a/src/libirecovery.c b/src/libirecovery.c index 1e249a5..4db314b 100644 --- a/src/libirecovery.c +++ b/src/libirecovery.c | |||
| @@ -1607,6 +1607,22 @@ irecv_error_t irecv_get_device(irecv_client_t client, irecv_device_t* device) { | |||
| 1607 | break; | 1607 | break; |
| 1608 | } | 1608 | } |
| 1609 | break; | 1609 | break; |
| 1610 | case CPID_IPHONE5: | ||
| 1611 | if (irecv_get_bdid(client, &bdid) < 0) { | ||
| 1612 | break; | ||
| 1613 | } | ||
| 1614 | switch (bdid) { | ||
| 1615 | case BDID_IPHONE51: | ||
| 1616 | device_id = DEVICE_IPHONE51; | ||
| 1617 | break; | ||
| 1618 | case BDID_IPHONE52: | ||
| 1619 | device_id = DEVICE_IPHONE52; | ||
| 1620 | break; | ||
| 1621 | default: | ||
| 1622 | device_id = DEVICE_UNKNOWN; | ||
| 1623 | break; | ||
| 1624 | } | ||
| 1625 | break; | ||
| 1610 | 1626 | ||
| 1611 | default: | 1627 | default: |
| 1612 | device_id = DEVICE_UNKNOWN; | 1628 | device_id = DEVICE_UNKNOWN; |
