diff options
author | Nikias Bassen | 2012-09-21 11:22:18 +0200 |
---|---|---|
committer | Nikias Bassen | 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" { #define CPID_IPAD31 0x8945 #define CPID_IPAD32 0x8945 #define CPID_IPAD33 0x8945 +#define CPID_IPHONE5 0x8950 #define BDID_UNKNOWN -1 #define BDID_IPHONE2G 0x00 @@ -80,6 +81,8 @@ extern "C" { #define BDID_IPAD31 0x00 #define BDID_IPAD32 0x02 #define BDID_IPAD33 0x04 +#define BDID_IPHONE51 0x00 +#define BDID_IPHONE52 0x02 #define DEVICE_UNKNOWN -1 #define DEVICE_IPHONE2G 0 @@ -102,6 +105,8 @@ extern "C" { #define DEVICE_IPAD31 17 #define DEVICE_IPAD32 18 #define DEVICE_IPAD33 19 +#define DEVICE_IPHONE51 20 +#define DEVICE_IPHONE52 21 enum { kRecoveryMode1 = 0x1280, @@ -204,6 +209,8 @@ static struct irecv_device irecv_devices[] = { { 17, "iPad3,1", "j1ap", 0x00, 0x8945 }, { 18, "iPad3,2", "j2ap", 0x02, 0x8945 }, { 19, "iPad3,3", "j2aap", 0x04, 0x8945 }, + { 20, "iPhone5,1", "n41ap", 0x00, 0x8950 }, + { 21, "iPhone5,2", "n42ap", 0x02, 0x8950 }, { -1, NULL, NULL, -1, -1 } }; 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) { break; } break; + case CPID_IPHONE5: + if (irecv_get_bdid(client, &bdid) < 0) { + break; + } + switch (bdid) { + case BDID_IPHONE51: + device_id = DEVICE_IPHONE51; + break; + case BDID_IPHONE52: + device_id = DEVICE_IPHONE52; + break; + default: + device_id = DEVICE_UNKNOWN; + break; + } + break; default: device_id = DEVICE_UNKNOWN; |