diff options
| -rw-r--r-- | include/libirecovery.h | 5 | ||||
| -rw-r--r-- | libirecovery.c | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/include/libirecovery.h b/include/libirecovery.h index 3220669..8f3208a 100644 --- a/include/libirecovery.h +++ b/include/libirecovery.h | |||
| @@ -45,6 +45,7 @@ extern "C" { | |||
| 45 | #define CPID_IPHONE4 8930 | 45 | #define CPID_IPHONE4 8930 |
| 46 | #define CPID_IPOD4G 8930 | 46 | #define CPID_IPOD4G 8930 |
| 47 | #define CPID_APPLETV2 8930 | 47 | #define CPID_APPLETV2 8930 |
| 48 | #define CPID_IPHONE42 8930 | ||
| 48 | 49 | ||
| 49 | #define BDID_UNKNOWN -1 | 50 | #define BDID_UNKNOWN -1 |
| 50 | #define BDID_IPHONE2G 0 | 51 | #define BDID_IPHONE2G 0 |
| @@ -57,6 +58,7 @@ extern "C" { | |||
| 57 | #define BDID_IPHONE4 0 | 58 | #define BDID_IPHONE4 0 |
| 58 | #define BDID_IPOD4G 8 | 59 | #define BDID_IPOD4G 8 |
| 59 | #define BDID_APPLETV2 10 | 60 | #define BDID_APPLETV2 10 |
| 61 | #define BDID_IPHONE42 6 | ||
| 60 | 62 | ||
| 61 | #define DEVICE_UNKNOWN -1 | 63 | #define DEVICE_UNKNOWN -1 |
| 62 | #define DEVICE_IPHONE2G 0 | 64 | #define DEVICE_IPHONE2G 0 |
| @@ -69,6 +71,7 @@ extern "C" { | |||
| 69 | #define DEVICE_IPHONE4 7 | 71 | #define DEVICE_IPHONE4 7 |
| 70 | #define DEVICE_IPOD4G 8 | 72 | #define DEVICE_IPOD4G 8 |
| 71 | #define DEVICE_APPLETV2 9 | 73 | #define DEVICE_APPLETV2 9 |
| 74 | #define DEVICE_IPHONE42 10 | ||
| 72 | 75 | ||
| 73 | enum { | 76 | enum { |
| 74 | kRecoveryMode1 = 0x1280, | 77 | kRecoveryMode1 = 0x1280, |
| @@ -171,6 +174,8 @@ static struct irecv_device irecv_devices[] = { | |||
| 171 | "http://appldnld.apple.com/iPhone4/061-8490.20100901.hyjtR/iPod4,1_4.1_8B117_Restore.ipsw" }, | 174 | "http://appldnld.apple.com/iPhone4/061-8490.20100901.hyjtR/iPod4,1_4.1_8B117_Restore.ipsw" }, |
| 172 | { 9, "AppleTV2,1", "k66ap", 10, 8930, | 175 | { 9, "AppleTV2,1", "k66ap", 10, 8930, |
| 173 | "http://appldnld.apple.com/AppleTV/061-8940.20100926.Tvtnz/AppleTV2,1_4.1_8M89_Restore.ipsw" }, | 176 | "http://appldnld.apple.com/AppleTV/061-8940.20100926.Tvtnz/AppleTV2,1_4.1_8M89_Restore.ipsw" }, |
| 177 | { 10, "iPhone3,3", "n92ap", 6, 8930, | ||
| 178 | "http://appldnld.apple.com/iPhone4/041-0177.20110131.Pyvrz/iPhone3,3_4.2.6_8E200_Restore.ipsw" }, | ||
| 174 | { -1, NULL, NULL, -1, -1, | 179 | { -1, NULL, NULL, -1, -1, |
| 175 | NULL } | 180 | NULL } |
| 176 | }; | 181 | }; |
diff --git a/libirecovery.c b/libirecovery.c index c186f41..a323386 100644 --- a/libirecovery.c +++ b/libirecovery.c | |||
| @@ -1151,7 +1151,7 @@ irecv_error_t irecv_get_device(irecv_client_t client, irecv_device_t* device) { | |||
| 1151 | break; | 1151 | break; |
| 1152 | 1152 | ||
| 1153 | case CPID_IPAD1G: | 1153 | case CPID_IPAD1G: |
| 1154 | // iPhone3,1 iPad4,1 and iPad1,1 all share the same ChipID | 1154 | // iPhone3,1 iPhone3,3 iPad4,1 and iPad1,1 all share the same ChipID |
| 1155 | // so we need to check the BoardID | 1155 | // so we need to check the BoardID |
| 1156 | if (irecv_get_bdid(client, &bdid) < 0) { | 1156 | if (irecv_get_bdid(client, &bdid) < 0) { |
| 1157 | break; | 1157 | break; |
| @@ -1174,6 +1174,10 @@ irecv_error_t irecv_get_device(irecv_client_t client, irecv_device_t* device) { | |||
| 1174 | device_id = DEVICE_APPLETV2; | 1174 | device_id = DEVICE_APPLETV2; |
| 1175 | break; | 1175 | break; |
| 1176 | 1176 | ||
| 1177 | case BDID_IPHONE42: | ||
| 1178 | device_id = DEVICE_IPHONE42; | ||
| 1179 | break; | ||
| 1180 | |||
| 1177 | default: | 1181 | default: |
| 1178 | device_id = DEVICE_UNKNOWN; | 1182 | device_id = DEVICE_UNKNOWN; |
| 1179 | break; | 1183 | break; |
