Unofficial mapping from mobile device model/machine ID to model name, for iOS and Android devices.
Android
+SM-G965W
= Samsung Galaxy S9+iOS
+iPhone9,3
= iPhone 7
- iOS: This is done through a
sysctlbyname
call, as explained here:
+(NSString *) getDeviceModel {
size_t size;
sysctlbyname("hw.machine", NULL, &size, NULL, 0);
char *model = malloc(size);
sysctlbyname("hw.machine", model, &size, NULL, 0);
NSString *deviceModel = [NSString stringWithCString:model encoding:NSUTF8StringEncoding];
free(model);
return deviceModel;
}
- Android: see Build.MODEL
- Cordova: see cordova-plugin-device and device.model
- CSV: Comma Separated Values, with header row
- SQL: MySQL format with
CREATE TABLE IF NOT EXISTS
andINSERT IGNORE
- PList: Apple PList file in XML format (as opposed to binary)
- Properties: Java properties file format; the manufacturer and model names are separated by a pipe character (ie.
Samsung|Galaxy S9+
)
Note: All files are UTF-8 encoded
This project is independent and has not been authorized, sponsored, or otherwise approved by Apple or Google or any other individual or company.
- iOS:
/Applications/Xcode.app/Contents/Developer/Platforms/*.platform/usr/standalone/device_traits.db
- Android: https://storage.googleapis.com/play_public/supported_devices.html