Skip to content

Device mapping from model/machine ID to model names

License

Notifications You must be signed in to change notification settings

tlacroix/mobile-devices-model-mapping-data

Repository files navigation

Mobile Devices Model Mapping Data

Unofficial mapping from mobile device model/machine ID to model name, for iOS and Android devices.

Examples

  • Android + SM-G965W = Samsung Galaxy S9+
  • iOS + iPhone9,3 = iPhone 7

How to get the model identifier

+(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;
}

File Formats

  • CSV: Comma Separated Values, with header row
  • SQL: MySQL format with CREATE TABLE IF NOT EXISTS and INSERT 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

Credits

This project is independent and has not been authorized, sponsored, or otherwise approved by Apple or Google or any other individual or company.

Data Sources

About

Device mapping from model/machine ID to model names

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published