diff options
| -rw-r--r-- | include/libirecovery.h | 12 | ||||
| -rw-r--r-- | src/libirecovery.c | 19 |
2 files changed, 28 insertions, 3 deletions
diff --git a/include/libirecovery.h b/include/libirecovery.h index 95a353e..a44dcc3 100644 --- a/include/libirecovery.h +++ b/include/libirecovery.h | |||
| @@ -57,11 +57,13 @@ extern "C" { | |||
| 57 | #define CPID_IPHONE4S 0x8940 | 57 | #define CPID_IPHONE4S 0x8940 |
| 58 | #define CPID_APPLETV31 0x8942 | 58 | #define CPID_APPLETV31 0x8942 |
| 59 | #define CPID_IPAD24 0x8942 | 59 | #define CPID_IPAD24 0x8942 |
| 60 | #define CPID_IPAD25 0x8942 | ||
| 61 | #define CPID_IPOD5G 0x8942 | ||
| 60 | #define CPID_IPAD31 0x8945 | 62 | #define CPID_IPAD31 0x8945 |
| 61 | #define CPID_IPAD32 0x8945 | 63 | #define CPID_IPAD32 0x8945 |
| 62 | #define CPID_IPAD33 0x8945 | 64 | #define CPID_IPAD33 0x8945 |
| 63 | #define CPID_IPHONE5 0x8950 | 65 | #define CPID_IPHONE5 0x8950 |
| 64 | #define CPID_IPOD5G 0x8942 | 66 | #define CPID_IPAD34 0x8955 |
| 65 | 67 | ||
| 66 | #define BDID_UNKNOWN -1 | 68 | #define BDID_UNKNOWN -1 |
| 67 | #define BDID_IPHONE2G 0x00 | 69 | #define BDID_IPHONE2G 0x00 |
| @@ -81,12 +83,14 @@ extern "C" { | |||
| 81 | #define BDID_IPHONE4S 0x08 | 83 | #define BDID_IPHONE4S 0x08 |
| 82 | #define BDID_APPLETV31 0x08 | 84 | #define BDID_APPLETV31 0x08 |
| 83 | #define BDID_IPAD24 0x06 | 85 | #define BDID_IPAD24 0x06 |
| 86 | #define BDID_IPAD25 0x0a | ||
| 87 | #define BDID_IPOD5G 0x00 | ||
| 84 | #define BDID_IPAD31 0x00 | 88 | #define BDID_IPAD31 0x00 |
| 85 | #define BDID_IPAD32 0x02 | 89 | #define BDID_IPAD32 0x02 |
| 86 | #define BDID_IPAD33 0x04 | 90 | #define BDID_IPAD33 0x04 |
| 87 | #define BDID_IPHONE51 0x00 | 91 | #define BDID_IPHONE51 0x00 |
| 88 | #define BDID_IPHONE52 0x02 | 92 | #define BDID_IPHONE52 0x02 |
| 89 | #define BDID_IPOD5G 0x00 | 93 | #define BDID_IPAD34 0x00 |
| 90 | 94 | ||
| 91 | #define DEVICE_UNKNOWN -1 | 95 | #define DEVICE_UNKNOWN -1 |
| 92 | #define DEVICE_IPHONE2G 0 | 96 | #define DEVICE_IPHONE2G 0 |
| @@ -112,6 +116,8 @@ extern "C" { | |||
| 112 | #define DEVICE_IPHONE51 20 | 116 | #define DEVICE_IPHONE51 20 |
| 113 | #define DEVICE_IPHONE52 21 | 117 | #define DEVICE_IPHONE52 21 |
| 114 | #define DEVICE_IPOD5G 22 | 118 | #define DEVICE_IPOD5G 22 |
| 119 | #define DEVICE_IPAD25 23 | ||
| 120 | #define DEVICE_IPAD34 24 | ||
| 115 | 121 | ||
| 116 | enum { | 122 | enum { |
| 117 | kRecoveryMode1 = 0x1280, | 123 | kRecoveryMode1 = 0x1280, |
| @@ -217,6 +223,8 @@ static struct irecv_device irecv_devices[] = { | |||
| 217 | { 20, "iPhone5,1", "n41ap", 0x00, 0x8950 }, | 223 | { 20, "iPhone5,1", "n41ap", 0x00, 0x8950 }, |
| 218 | { 21, "iPhone5,2", "n42ap", 0x02, 0x8950 }, | 224 | { 21, "iPhone5,2", "n42ap", 0x02, 0x8950 }, |
| 219 | { 22, "iPod5,1", "n78ap", 0x00, 0x8942 }, | 225 | { 22, "iPod5,1", "n78ap", 0x00, 0x8942 }, |
| 226 | { 23, "iPad2,5", "p105ap", 0x0a, 0x8942 }, | ||
| 227 | { 24, "iPad3,4", "p101ap", 0x00, 0x8955 }, | ||
| 220 | { -1, NULL, NULL, -1, -1 } | 228 | { -1, NULL, NULL, -1, -1 } |
| 221 | }; | 229 | }; |
| 222 | 230 | ||
diff --git a/src/libirecovery.c b/src/libirecovery.c index e8ce634..63072c6 100644 --- a/src/libirecovery.c +++ b/src/libirecovery.c | |||
| @@ -1609,7 +1609,7 @@ irecv_error_t irecv_get_device(irecv_client_t client, irecv_device_t* device) { | |||
| 1609 | break; | 1609 | break; |
| 1610 | 1610 | ||
| 1611 | case CPID_APPLETV31: | 1611 | case CPID_APPLETV31: |
| 1612 | // AppleTV 3rd gen. iPad2,4 and iPod5,1 share the same ChipID, so we need to check the BoardID | 1612 | // AppleTV 3rd gen. iPad2,4, iPad 2,5 and iPod5,1 share the same ChipID, so we need to check the BoardID |
| 1613 | if (irecv_get_bdid(client, &bdid) < 0) { | 1613 | if (irecv_get_bdid(client, &bdid) < 0) { |
| 1614 | break; | 1614 | break; |
| 1615 | } | 1615 | } |
| @@ -1620,6 +1620,9 @@ irecv_error_t irecv_get_device(irecv_client_t client, irecv_device_t* device) { | |||
| 1620 | case BDID_IPAD24: | 1620 | case BDID_IPAD24: |
| 1621 | device_id = DEVICE_IPAD24; | 1621 | device_id = DEVICE_IPAD24; |
| 1622 | break; | 1622 | break; |
| 1623 | case BDID_IPAD25: | ||
| 1624 | device_id = DEVICE_IPAD25; | ||
| 1625 | break; | ||
| 1623 | case BDID_IPOD5G: | 1626 | case BDID_IPOD5G: |
| 1624 | device_id = DEVICE_IPOD5G; | 1627 | device_id = DEVICE_IPOD5G; |
| 1625 | break; | 1628 | break; |
| @@ -1646,6 +1649,20 @@ irecv_error_t irecv_get_device(irecv_client_t client, irecv_device_t* device) { | |||
| 1646 | } | 1649 | } |
| 1647 | break; | 1650 | break; |
| 1648 | 1651 | ||
| 1652 | case CPID_IPAD34: | ||
| 1653 | if (irecv_get_bdid(client, &bdid) < 0) { | ||
| 1654 | break; | ||
| 1655 | } | ||
| 1656 | switch (bdid) { | ||
| 1657 | case BDID_IPAD34: | ||
| 1658 | device_id = DEVICE_IPAD34; | ||
| 1659 | break; | ||
| 1660 | default: | ||
| 1661 | device_id = DEVICE_UNKNOWN; | ||
| 1662 | break; | ||
| 1663 | } | ||
| 1664 | break; | ||
| 1665 | |||
| 1649 | default: | 1666 | default: |
| 1650 | device_id = DEVICE_UNKNOWN; | 1667 | device_id = DEVICE_UNKNOWN; |
| 1651 | break; | 1668 | break; |
