summaryrefslogtreecommitdiffstats
path: root/libirecovery.c
diff options
context:
space:
mode:
Diffstat (limited to 'libirecovery.c')
-rw-r--r--libirecovery.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/libirecovery.c b/libirecovery.c
index 614b81d..278a529 100644
--- a/libirecovery.c
+++ b/libirecovery.c
@@ -1224,6 +1224,35 @@ irecv_error_t irecv_get_device(irecv_client_t client, irecv_device_t* device) {
}
break;
+ case CPID_IPAD21:
+ // iPad2,1 iPad2,2 iPad2,3 and iPhone4,1 share the same ChipID, so we need to check the BoardID
+ if (irecv_get_bdid(client, &bdid) < 0) {
+ break;
+ }
+
+ switch (bdid) {
+ case BDID_IPAD21
+ device_id = DEVICE_IPAD21;
+ break;
+
+ case BDID_IPAD22
+ device_id = DEVICE_IPAD22;
+ break;
+
+ case BDID_IPAD23
+ device_id = DEVICE_IPAD23;
+ break;
+
+ case BDID_IPHONE4S
+ device_id = DEVICE_IPHONE4S;
+ break;
+
+ default:
+ device_id = DEVICE_UNKNOWN;
+ break;
+ }
+ break;
+
default:
device_id = DEVICE_UNKNOWN;
break;