Skip to content

Commit

Permalink
Update model identifiers with aditional models.
Browse files Browse the repository at this point in the history
  • Loading branch information
artehe committed Sep 18, 2024
1 parent c316de3 commit aa671c3
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 21 deletions.
1 change: 0 additions & 1 deletion Netimobiledevice/Lockdown/LockdownClient.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using Netimobiledevice.Exceptions;
using Netimobiledevice.HelperFiles;
using Netimobiledevice.Lockdown.Pairing;
using Netimobiledevice.NotificationProxy;
using Netimobiledevice.Plist;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
using System.Collections.Generic;

namespace Netimobiledevice.HelperFiles
namespace Netimobiledevice.Lockdown
{
internal static class ModelIdentifier
{
internal static string GetDeviceModelName(string identifier)
{
Dictionary<string, string> modelMapping = new Dictionary<string, string>
{
//iPhone mapping begins
private static readonly Dictionary<string, string> modelMapping = new Dictionary<string, string> {
//iPhone mapping begins
{"iPhone1,1", "iPhone"},
{"iPhone1,2", "iPhone 3G"},
{"iPhone2,1", "iPhone 3GS"},
Expand Down Expand Up @@ -49,43 +46,100 @@ internal static string GetDeviceModelName(string identifier)
{"iPhone13,2", "iPhone 12"},
{"iPhone13,3", "iPhone 12 Pro"},
{"iPhone13,4", "iPhone 12 Pro Max"},
{"iPhone14,4", "iPhone 13 mini"},
{"iPhone14,5", "iPhone 13"},
{"iPhone14,2", "iPhone 13 Pro"},
{"iPhone14,3", "iPhone 13 Pro Max"},
{"iPhone14,4", "iPhone 13 mini"},
{"iPhone14,5", "iPhone 13"},
{"iPhone14,6","iPhone SE (3rd generation)"},
{"iPhone15,3","iPhone 14 Pro Max"},
{"iPhone15,2","iPhone 14 Pro"},
{"iPhone14,8","iPhone 14 Plus"},
{"iPhone14,7","iPhone 14"},
{"iPhone16,2","iPhone 15 Pro Max"},
{"iPhone16,1","iPhone 15 Pro"},
{"iPhone15,5","iPhone 15 Plus"},
{"iPhone14,8","iPhone 14 Plus"},
{"iPhone15,2","iPhone 14 Pro"},
{"iPhone15,3","iPhone 14 Pro Max"},
{"iPhone15,4","iPhone 15"},
{"iPhone15,5","iPhone 15 Plus"},
{"iPhone16,1","iPhone 15 Pro"},
{"iPhone16,2","iPhone 15 Pro Max"},
{"iPhone17,1","iPhone 16 Pro"},
{"iPhone17,2","iPhone 16 Pro Max"},
{"iPhone17,3","iPhone 16"},
{"iPhone17,4","iPhone 16 Plus"},

//Ipad version begins
{"iPad1,1", "iPad"},
{"iPad2,1", "iPad 2 (Wi-Fi)"},
{"iPad2,2", "iPad 2 (GSM)"},
{"iPad2,3", "iPad 2 (CDMA)"},
{"iPad2,4", "iPad 2 (Wi-Fi, Rev A)"},
{"iPad2,5", "iPad mini (WiFi)"},
{"iPad2,6", "iPad mini (GSM)"},
{"iPad2,7", "iPad mini (Global)"},
{"iPad3,1", "iPad (3rd generation, Wi-Fi)"},
{"iPad3,2", "iPad (3rd generation, GSM)"},
{"iPad3,3", "iPad (3rd generation, CDMA)"},
{"iPad3,4", "iPad (4th generation, Wi-Fi)"},
{"iPad3,5", "iPad (4th generation, GSM)"},
{"iPad3,6", "iPad (4th generation, CDMA)"},
{"iPad4,1", "iPad Air (WiFi)"},
{"iPad4,2", "iPad Air (Cellular)"},
{"iPad4,3", "iPad Air (China)"},
{"iPad4,4", "iPad mini 2 (WiFi)"},
{"iPad4,5", "iPad mini 2 (Cellular)"},
{"iPad4,6", "iPad mini 2 (China)"},
{"iPad4,7", "iPad mini 3 (WiFi)"},
{"iPad4,8", "iPad mini 3 (Cellular)"},
{"iPad4,9", "iPad mini 3 (China)"},
{"iPad5,1", "iPad mini 4 (WiFi)"},
{"iPad5,2", "iPad mini 4 (Cellular)"},
{"iPad5,3", "iPad Air 2 (WiFi)"},
{"iPad5,4", "iPad Air 2 (Cellular)"},
{"iPad6,3", "iPad Pro 9.7-inch (WiFi)"},
{"iPad6,4", "iPad Pro 9.7-inch (Cellular)"},
{"iPad6,7", "iPad Pro 12.9-inch (1st gen, WiFi)"},
{"iPad6,8", "iPad Pro 12.9-inch (1st gen, Cellular)"},
{"iPad6,11", "iPad (5th generation, Wi-Fi)"},
{"iPad6,12", "iPad (5th generation, Cellular)"},
{"iPad7,1", "iPad Pro 12.9-inch (2nd gen, WiFi)"},
{"iPad7,2", "iPad Pro 12.9-inch (2nd gen, Cellular)"},
{"iPad7,3", "iPad Pro 10.5-inch (WiFi)"},
{"iPad7,4", "iPad Pro 10.5-inch (Cellular)"},
{"iPad7,5", "iPad (6th generation, Wi-Fi)"},
{"iPad7,6", "iPad (6th generation, Cellular)"},
{"iPad7,11", "iPad (7th generation, Wi-Fi)"},
{"iPad7,12", "iPad (7th generation, Cellular)"},
{"iPad8,1", "iPad Pro 11-inch (1st gen, WiFi)"},
{"iPad8,2", "iPad Pro 11-inch (1st gen, WiFi, 1TB)"},
{"iPad8,3", "iPad Pro 11-inch (1st gen, Cellular)"},
{"iPad8,4", "iPad Pro 11-inch (1st gen, Cellular, 1TB)"},
{"iPad8,5", "iPad Pro 12.9-inch (3rd gen, WiFi)"},
{"iPad8,6", "iPad Pro 12.9-inch (3rd gen, WiFi, 1TB)"},
{"iPad8,7", "iPad Pro 12.9-inch (3rd gen, Cellular)"},
{"iPad8,8", "iPad Pro 12.9-inch (3rd gen, Cellular, 1TB)"},
{"iPad8,9", "iPad Pro 11-inch (2nd gen, WiFi)"},
{"iPad8,10", "iPad Pro 11-inch (2nd gen, Cellular)"},
{"iPad8,11", "iPad Pro 12.9-inch (4th gen, WiFi)"},
{"iPad8,12", "iPad Pro 12.9-inch (4th gen, Cellular)"},
{"iPad11,1", "iPad mini (5th gen, WiFi)"},
{"iPad11,2", "iPad mini (5th gen, Cellular)"},
{"iPad11,3", "iPad Air (3rd gen, WiFi)"},
{"iPad11,4", "iPad Air (3rd gen, Celluar)"},
{"iPad11,6", "iPad (8th generation, Wi-Fi)"},
{"iPad11,7", "iPad (8th generation, Cellular)"},
{"iPad5,3","iPad Air 2"},
{"iPad5,4","iPad Air 2"},
{"iPad4,7","iPad mini 3"},
{"iPad12,1", "iPad (9th gen, WiFi)"},
{"iPad12,2", "iPad (9th gen, Cellular)"},
{"iPad13,1", "iPad Air (4th gen, WiFi)"},
{"iPad13,2", "iPad Air (4th gen, Celluar)"},
{"iPad13,4", "iPad Pro 11-inch (3rd gen, WiFi)"},
{"iPad13,5", "iPad Pro 11-inch (3rd gen, WiFi, 2TB)"},
{"iPad13,6", "iPad Pro 11-inch (3rd gen, Cellular)"},
{"iPad13,7", "iPad Pro 11-inch (3rd gen, Cellular, 2TB)"},
{"iPad13,8", "iPad Pro 12.9-inch (5th gen, WiFi)"},
{"iPad13,9", "iPad Pro 12.9-inch (5th gen, WiFi, 2TB)"},
{"iPad13,10", "iPad Pro 12.9-inch (5th gen, Cellular)"},
{"iPad13,11", "iPad Pro 12.9-inch (5th gen, Cellular, 2TB)"},
{"iPad13,16", "iPad Air (5th gen, WiFi)"},
{"iPad13,17", "iPad Air (5th gen, Celluar)"},
{"iPad14,1", "iPad mini (6th gen, WiFi)"},
{"iPad14,2", "iPad mini (6th gen, Cellular)"},

//iPod models
{ "iPod1,1", "iPod touch (1st generation)" },
Expand All @@ -95,9 +149,11 @@ internal static string GetDeviceModelName(string identifier)
{ "iPod5,1", "iPod touch (5th generation)" },
{ "iPod7,1", "iPod touch (6th generation)" },
{ "iPod9,1", "iPod touch (7th generation)" }
};
};

if (modelMapping.TryGetValue(identifier, out var modelName)) {
internal static string GetDeviceModelName(string identifier)
{
if (modelMapping.TryGetValue(identifier, out string? modelName)) {
return modelName;
}

Expand Down
2 changes: 1 addition & 1 deletion Netimobiledevice/Netimobiledevice.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<RepositoryUrl>https://github.com/artehe/Netimobiledevice</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<Title>$(AssemblyName)</Title>
<Version>1.2.0</Version>
<Version>1.2.1</Version>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit aa671c3

Please sign in to comment.