summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2019-09-28 16:15:40 +0200
committerGravatar Nikias Bassen2019-09-28 16:15:40 +0200
commitb2a9edb52b4b56c5865dc0f4bc9a2a15ab32d539 (patch)
tree155aacc94977a83faecef5954239f4c3f261ff26
parente98d13746fc6c007319e94849883d8ab6feabfb6 (diff)
downloadlibirecovery-b2a9edb52b4b56c5865dc0f4bc9a2a15ab32d539.tar.gz
libirecovery-b2a9edb52b4b56c5865dc0f4bc9a2a15ab32d539.tar.bz2
Add display_name to device database and irecv_device struct
-rw-r--r--include/libirecovery.h1
-rw-r--r--src/libirecovery.c210
2 files changed, 108 insertions, 103 deletions
diff --git a/include/libirecovery.h b/include/libirecovery.h
index 201be0d..e7be89b 100644
--- a/include/libirecovery.h
+++ b/include/libirecovery.h
@@ -74,6 +74,7 @@ struct irecv_device {
const char* hardware_model;
unsigned int board_id;
unsigned int chip_id;
+ const char* display_name;
};
typedef struct irecv_device* irecv_device_t;
diff --git a/src/libirecovery.c b/src/libirecovery.c
index 2ebe89c..5dada9a 100644
--- a/src/libirecovery.c
+++ b/src/libirecovery.c
@@ -120,109 +120,113 @@ static libusb_context* libirecovery_context = NULL;
#endif
static struct irecv_device irecv_devices[] = {
- {"iPhone1,1", "m68ap", 0x00, 0x8900 },
- {"iPhone1,2", "n82ap", 0x04, 0x8900 },
- {"iPhone2,1", "n88ap", 0x00, 0x8920 },
- {"iPhone3,1", "n90ap", 0x00, 0x8930 },
- {"iPhone3,2", "n90bap", 0x04, 0x8930 },
- {"iPhone3,3", "n92ap", 0x06, 0x8930 },
- {"iPhone4,1", "n94ap", 0x08, 0x8940 },
- {"iPhone5,1", "n41ap", 0x00, 0x8950 },
- {"iPhone5,2", "n42ap", 0x02, 0x8950 },
- {"iPhone5,3", "n48ap", 0x0a, 0x8950 },
- {"iPhone5,4", "n49ap", 0x0e, 0x8950 },
- {"iPhone6,1", "n51ap", 0x00, 0x8960 },
- {"iPhone6,2", "n53ap", 0x02, 0x8960 },
- {"iPhone7,1", "n56ap", 0x04, 0x7000 },
- {"iPhone7,2", "n61ap", 0x06, 0x7000 },
- {"iPhone8,1", "n71ap", 0x04, 0x8000 },
- {"iPhone8,1", "n71map", 0x04, 0x8003 },
- {"iPhone8,2", "n66ap", 0x06, 0x8000 },
- {"iPhone8,2", "n66map", 0x06, 0x8003 },
- {"iPhone8,4", "n69ap", 0x02, 0x8003 },
- {"iPhone8,4", "n69uap", 0x02, 0x8000 },
- {"iPhone9,1", "d10ap", 0x08, 0x8010 },
- {"iPhone9,2", "d11ap", 0x0a, 0x8010 },
- {"iPhone9,3", "d101ap", 0x0c, 0x8010 },
- {"iPhone9,4", "d111ap", 0x0e, 0x8010 },
- {"iPhone10,1","d20ap", 0x02, 0x8015 },
- {"iPhone10,2","d21ap", 0x04, 0x8015 },
- {"iPhone10,3","d22ap", 0x06, 0x8015 },
- {"iPhone10,4","d201ap", 0x0a, 0x8015 },
- {"iPhone10,5","d211ap", 0x0c, 0x8015 },
- {"iPhone10,6","d221ap", 0x0e, 0x8015 },
- {"iPhone11,2","d321ap", 0x0e, 0x8020 },
- {"iPhone11,4","d331ap", 0x0a, 0x8020 },
- {"iPhone11,6","d331pap",0x1a, 0x8020 },
- {"iPhone11,8","n841ap", 0x0c, 0x8020 },
- {"iPhone12,1","n104ap", 0x04, 0x8030 },
- {"iPhone12,3","d421ap", 0x06, 0x8030 },
- {"iPhone12,5","d431ap", 0x02, 0x8030 },
- {"iPod1,1", "n45ap", 0x02, 0x8900 },
- {"iPod2,1", "n72ap", 0x00, 0x8720 },
- {"iPod3,1", "n18ap", 0x02, 0x8922 },
- {"iPod4,1", "n81ap", 0x08, 0x8930 },
- {"iPod5,1", "n78ap", 0x00, 0x8942 },
- {"iPod7,1", "n102ap", 0x10, 0x7000 },
- {"iPod9,1", "n112ap", 0x16, 0x8010 },
- {"iPad1,1", "k48ap", 0x02, 0x8930 },
- {"iPad2,1", "k93ap", 0x04, 0x8940 },
- {"iPad2,2", "k94ap", 0x06, 0x8940 },
- {"iPad2,3", "k95ap", 0x02, 0x8940 },
- {"iPad2,4", "k93aap", 0x06, 0x8942 },
- {"iPad2,5", "p105ap", 0x0a, 0x8942 },
- {"iPad2,6", "p106ap", 0x0c, 0x8942 },
- {"iPad2,7", "p107ap", 0x0e, 0x8942 },
- {"iPad3,1", "j1ap", 0x00, 0x8945 },
- {"iPad3,2", "j2ap", 0x02, 0x8945 },
- {"iPad3,3", "j2aap", 0x04, 0x8945 },
- {"iPad3,4", "p101ap", 0x00, 0x8955 },
- {"iPad3,5", "p102ap", 0x02, 0x8955 },
- {"iPad3,6", "p103ap", 0x04, 0x8955 },
- {"iPad4,1", "j71ap", 0x10, 0x8960 },
- {"iPad4,2", "j72ap", 0x12, 0x8960 },
- {"iPad4,4", "j85ap", 0x0a, 0x8960 },
- {"iPad4,5", "j86ap", 0x0c, 0x8960 },
- {"iPad4,6", "j87ap", 0x0e, 0x8960 },
- {"iPad4,7", "j85map", 0x32, 0x8960 },
- {"iPad4,8", "j86map", 0x34, 0x8960 },
- {"iPad4,9", "j87map", 0x36, 0x8960 },
- {"iPad5,1", "j96ap", 0x08, 0x7000 },
- {"iPad5,2", "j97ap", 0x0A, 0x7000 },
- {"iPad5,3", "j81ap", 0x06, 0x7001 },
- {"iPad5,4", "j82ap", 0x02, 0x7001 },
- {"iPad6,3", "j127ap", 0x08, 0x8001 },
- {"iPad6,4", "j128ap", 0x0a, 0x8001 },
- {"iPad6,7", "j98aap", 0x10, 0x8001 },
- {"iPad6,8", "j99aap", 0x12, 0x8001 },
- {"iPad6,11", "j71sap", 0x10, 0x8000 },
- {"iPad6,11", "j71tap", 0x10, 0x8003 },
- {"iPad6,12", "j72sap", 0x12, 0x8000 },
- {"iPad6,12", "j72tap", 0x12, 0x8003 },
- {"iPad7,1", "j120ap", 0x0C, 0x8011 },
- {"iPad7,2", "j121ap", 0x0E, 0x8011 },
- {"iPad7,3", "j207ap", 0x04, 0x8011 },
- {"iPad7,4", "j208ap", 0x06, 0x8011 },
- {"iPad7,5", "j71bap", 0x18, 0x8010 },
- {"iPad7,6", "j72bap", 0x1A, 0x8010 },
- {"iPad8,1", "j317ap", 0x0C, 0x8027 },
- {"iPad8,2", "j317xap", 0x1C, 0x8027 },
- {"iPad8,3", "j318ap", 0x0E, 0x8027 },
- {"iPad8,4", "j318xap", 0x1E, 0x8027 },
- {"iPad8,5", "j320ap", 0x08, 0x8027 },
- {"iPad8,6", "j320xap", 0x18, 0x8027 },
- {"iPad8,7", "j321ap", 0x0A, 0x8027 },
- {"iPad8,8", "j321xap", 0x1A, 0x8027 },
- {"iPad11,1", "j210ap", 0x14, 0x8020 },
- {"iPad11,2", "j211ap", 0x16, 0x8020 },
- {"iPad11,3", "j217ap", 0x1C, 0x8020 },
- {"iPad11,4", "j218ap", 0x1E, 0x8020 },
- {"AppleTV2,1", "k66ap", 0x10, 0x8930 },
- {"AppleTV3,1", "j33ap", 0x08, 0x8942 },
- {"AppleTV3,2","j33iap", 0x00, 0x8947 },
- {"AppleTV5,3","j42dap", 0x34, 0x7000 },
- {"AppleTV6,2","j105aap",0x02, 0x8011 },
- { NULL, NULL, -1, -1 }
+ /* iPhone */
+ { "iPhone1,1", "m68ap", 0x00, 0x8900, "iPhone 2G" },
+ { "iPhone1,2", "n82ap", 0x04, 0x8900, "iPhone 3G" },
+ { "iPhone2,1", "n88ap", 0x00, 0x8920, "iPhone 3Gs" },
+ { "iPhone3,1", "n90ap", 0x00, 0x8930, "iPhone 4 (GSM)" },
+ { "iPhone3,2", "n90bap", 0x04, 0x8930, "iPhone 4 (GSM) R2 2012" },
+ { "iPhone3,3", "n92ap", 0x06, 0x8930, "iPhone 4 (CDMA)" },
+ { "iPhone4,1", "n94ap", 0x08, 0x8940, "iPhone 4s" },
+ { "iPhone5,1", "n41ap", 0x00, 0x8950, "iPhone 5 (GSM)" },
+ { "iPhone5,2", "n42ap", 0x02, 0x8950, "iPhone 5 (Global)" },
+ { "iPhone5,3", "n48ap", 0x0a, 0x8950, "iPhone 5c (GSM)" },
+ { "iPhone5,4", "n49ap", 0x0e, 0x8950, "iPhone 5c (Global)" },
+ { "iPhone6,1", "n51ap", 0x00, 0x8960, "iPhone 5s (GSM)" },
+ { "iPhone6,2", "n53ap", 0x02, 0x8960, "iPhone 5s (Global)" },
+ { "iPhone7,1", "n56ap", 0x04, 0x7000, "iPhone 6 Plus" },
+ { "iPhone7,2", "n61ap", 0x06, 0x7000, "iPhone 6" },
+ { "iPhone8,1", "n71ap", 0x04, 0x8000, "iPhone 6s" },
+ { "iPhone8,1", "n71map", 0x04, 0x8003, "iPhone 6s" },
+ { "iPhone8,2", "n66ap", 0x06, 0x8000, "iPhone 6s Plus" },
+ { "iPhone8,2", "n66map", 0x06, 0x8003, "iPhone 6s Plus" },
+ { "iPhone8,4", "n69ap", 0x02, 0x8003, "iPhone SE" },
+ { "iPhone8,4", "n69uap", 0x02, 0x8000, "iPhone SE" },
+ { "iPhone9,1", "d10ap", 0x08, 0x8010, "iPhone 7 (Global)" },
+ { "iPhone9,2", "d11ap", 0x0a, 0x8010, "iPhone 7 Plus (Global)" },
+ { "iPhone9,3", "d101ap", 0x0c, 0x8010, "iPhone 7 (GSM)" },
+ { "iPhone9,4", "d111ap", 0x0e, 0x8010, "iPhone 7 Plus (GSM)" },
+ { "iPhone10,1", "d20ap", 0x02, 0x8015, "iPhone 8 (Global)" },
+ { "iPhone10,2", "d21ap", 0x04, 0x8015, "iPhone 8 Plus (Global)" },
+ { "iPhone10,3", "d22ap", 0x06, 0x8015, "iPhone X (Global)" },
+ { "iPhone10,4", "d201ap", 0x0a, 0x8015, "iPhone 8 (GSM)" },
+ { "iPhone10,5", "d211ap", 0x0c, 0x8015, "iPhone 8 Plus (GSM)" },
+ { "iPhone10,6", "d221ap", 0x0e, 0x8015, "iPhone X (GSM)" },
+ { "iPhone11,2", "d321ap", 0x0e, 0x8020, "iPhone XS" },
+ { "iPhone11,4", "d331ap", 0x0a, 0x8020, "iPhone XS Max (China)" },
+ { "iPhone11,6", "d331pap", 0x1a, 0x8020, "iPhone XS Max" },
+ { "iPhone11,8", "n841ap", 0x0c, 0x8020, "iPhone XR" },
+ { "iPhone12,1", "n104ap", 0x04, 0x8030, "iPhone 11" },
+ { "iPhone12,3", "d421ap", 0x06, 0x8030, "iPhone 11 Pro" },
+ { "iPhone12,5", "d431ap", 0x02, 0x8030, "iPhone 11 Pro Max" },
+ /* iPod */
+ { "iPod1,1", "n45ap", 0x02, 0x8900, "iPod Touch (1st gen)" },
+ { "iPod2,1", "n72ap", 0x00, 0x8720, "iPod Touch (2nd gen)" },
+ { "iPod3,1", "n18ap", 0x02, 0x8922, "iPod Touch (3rd gen)" },
+ { "iPod4,1", "n81ap", 0x08, 0x8930, "iPod Touch (4th gen)" },
+ { "iPod5,1", "n78ap", 0x00, 0x8942, "iPod Touch (5th gen)" },
+ { "iPod7,1", "n102ap", 0x10, 0x7000, "iPod Touch (6th gen)" },
+ { "iPod9,1", "n112ap", 0x16, 0x8010, "iPod Touch (7th gen)" },
+ /* iPad */
+ { "iPad1,1", "k48ap", 0x02, 0x8930, "iPad" },
+ { "iPad2,1", "k93ap", 0x04, 0x8940, "iPad 2 (WiFi)" },
+ { "iPad2,2", "k94ap", 0x06, 0x8940, "iPad 2 (GSM)" },
+ { "iPad2,3", "k95ap", 0x02, 0x8940, "iPad 2 (CDMA)" },
+ { "iPad2,4", "k93aap", 0x06, 0x8942, "iPad 2 (WiFi) R2 2012" },
+ { "iPad2,5", "p105ap", 0x0a, 0x8942, "iPad Mini (WiFi)" },
+ { "iPad2,6", "p106ap", 0x0c, 0x8942, "iPad Mini (GSM)" },
+ { "iPad2,7", "p107ap", 0x0e, 0x8942, "iPad Mini (Global)" },
+ { "iPad3,1", "j1ap", 0x00, 0x8945, "iPad 3 (WiFi)" },
+ { "iPad3,2", "j2ap", 0x02, 0x8945, "iPad 3 (CDMA)" },
+ { "iPad3,3", "j2aap", 0x04, 0x8945, "iPad 3 (GSM)" },
+ { "iPad3,4", "p101ap", 0x00, 0x8955, "iPad 4 (WiFi)" },
+ { "iPad3,5", "p102ap", 0x02, 0x8955, "iPad 4 (GSM)" },
+ { "iPad3,6", "p103ap", 0x04, 0x8955, "iPad 4 (Global)" },
+ { "iPad4,1", "j71ap", 0x10, 0x8960, "iPad Air (WiFi)" },
+ { "iPad4,2", "j72ap", 0x12, 0x8960, "iPad Air (Cellular)" },
+ { "iPad4,4", "j85ap", 0x0a, 0x8960, "iPad Mini 2 (WiFi)" },
+ { "iPad4,5", "j86ap", 0x0c, 0x8960, "iPad Mini 2 (Cellular)" },
+ { "iPad4,6", "j87ap", 0x0e, 0x8960, "iPad Mini 2 (China)" },
+ { "iPad4,7", "j85map", 0x32, 0x8960, "iPad Mini 3 (WiFi)" },
+ { "iPad4,8", "j86map", 0x34, 0x8960, "iPad Mini 3 (Cellular)" },
+ { "iPad4,9", "j87map", 0x36, 0x8960, "iPad Mini 3 (China)" },
+ { "iPad5,1", "j96ap", 0x08, 0x7000, "iPad Mini 4 (WiFi)" },
+ { "iPad5,2", "j97ap", 0x0A, 0x7000, "iPad Mini 4 (Cellular)" },
+ { "iPad5,3", "j81ap", 0x06, 0x7001, "iPad Air 2 (WiFi)" },
+ { "iPad5,4", "j82ap", 0x02, 0x7001, "iPad Air 2 (Cellular)" },
+ { "iPad6,3", "j127ap", 0x08, 0x8001, "iPad Pro 9.7in (WiFi)" },
+ { "iPad6,4", "j128ap", 0x0a, 0x8001, "iPad Pro 9.7in (Cellular)" },
+ { "iPad6,7", "j98aap", 0x10, 0x8001, "iPad Pro 12.9in (WiFi)" },
+ { "iPad6,8", "j99aap", 0x12, 0x8001, "iPad Pro 12.9in (Cellular)" },
+ { "iPad6,11", "j71sap", 0x10, 0x8000, "iPad 5 (WiFi)" },
+ { "iPad6,11", "j71tap", 0x10, 0x8003, "iPad 5 (WiFi)" },
+ { "iPad6,12", "j72sap", 0x12, 0x8000, "iPad 5 (Cellular)" },
+ { "iPad6,12", "j72tap", 0x12, 0x8003, "iPad 5 (Cellular)" },
+ { "iPad7,1", "j120ap", 0x0C, 0x8011, "iPad Pro 2 12.9in (WiFi)" },
+ { "iPad7,2", "j121ap", 0x0E, 0x8011, "iPad Pro 2 12.9in (Cellular)" },
+ { "iPad7,3", "j207ap", 0x04, 0x8011, "iPad Pro 10.5in (WiFi)" },
+ { "iPad7,4", "j208ap", 0x06, 0x8011, "iPad Pro 10.5in (Cellular)" },
+ { "iPad7,5", "j71bap", 0x18, 0x8010, "iPad 6 (WiFi)" },
+ { "iPad7,6", "j72bap", 0x1A, 0x8010, "iPad 6 (Cellular)" },
+ { "iPad8,1", "j317ap", 0x0C, 0x8027, "iPad Pro 3 11in (WiFi)" },
+ { "iPad8,2", "j317xap", 0x1C, 0x8027, "iPad Pro 3 11in (WiFi, 1TB)" },
+ { "iPad8,3", "j318ap", 0x0E, 0x8027, "iPad Pro 3 11in (Cellular)" },
+ { "iPad8,4", "j318xap", 0x1E, 0x8027, "iPad Pro 3 11in (Cellular, 1TB)" },
+ { "iPad8,5", "j320ap", 0x08, 0x8027, "iPad Pro 3 12.9in (WiFi)" },
+ { "iPad8,6", "j320xap", 0x18, 0x8027, "iPad Pro 3 12.9in (WiFi, 1TB)" },
+ { "iPad8,7", "j321ap", 0x0A, 0x8027, "iPad Pro 3 12.9in (Cellular)" },
+ { "iPad8,8", "j321xap", 0x1A, 0x8027, "iPad Pro 3 12.9in (Cellular, 1TB)" },
+ { "iPad11,1", "j210ap", 0x14, 0x8020, "iPad Mini 5 (WiFi)" },
+ { "iPad11,2", "j211ap", 0x16, 0x8020, "iPad Mini 5 (Cellular)" },
+ { "iPad11,3", "j217ap", 0x1C, 0x8020, "iPad Air 3 (WiFi)" },
+ { "iPad11,4", "j218ap", 0x1E, 0x8020, "iPad Air 3 (Celluar)" },
+ /* Apple TV */
+ { "AppleTV2,1", "k66ap", 0x10, 0x8930, "Apple TV 2" },
+ { "AppleTV3,1", "j33ap", 0x08, 0x8942, "Apple TV 3" },
+ { "AppleTV3,2", "j33iap", 0x00, 0x8947, "Apple TV 3 (2013)" },
+ { "AppleTV5,3", "j42dap", 0x34, 0x7000, "Apple TV 4" },
+ { "AppleTV6,2", "j105aap", 0x02, 0x8011, "Apple TV 4K" },
+ { NULL, NULL, -1, -1, NULL }
};
#ifndef USE_DUMMY