diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/idevicerestore.c | 33 | ||||
-rw-r--r-- | src/idevicerestore.h | 1 |
2 files changed, 34 insertions, 0 deletions
diff --git a/src/idevicerestore.c b/src/idevicerestore.c index ef821f8..d02864e 100644 --- a/src/idevicerestore.c +++ b/src/idevicerestore.c @@ -925,3 +925,36 @@ int build_identity_get_component_path(plist_t build_identity, const char* compon return 0; } +const char* get_component_name(const char* filename) +{ + if (!strncmp(filename, "LLB", 3)) { + return "LLB"; + } else if (!strncmp(filename, "iBoot", 5)) { + return "iBoot"; + } else if (!strncmp(filename, "DeviceTree", 10)) { + return "RestoreDeviceTree"; + } else if (!strncmp(filename, "applelogo", 9)) { + return "AppleLogo"; + } else if (!strncmp(filename, "recoverymode", 12)) { + return "RecoveryMode"; + } else if (!strncmp(filename, "batterylow0", 11)) { + return "BatteryLow0"; + } else if (!strncmp(filename, "batterylow1", 11)) { + return "BatteryLow1"; + } else if (!strncmp(filename, "glyphcharging", 13)) { + return "BatteryCharging"; + } else if (!strncmp(filename, "glyphplugin", 11)) { + return "BatteryPlugin"; + } else if (!strncmp(filename, "batterycharging0", 16)) { + return "BatteryCharging0"; + } else if (!strncmp(filename, "batterycharging1", 16)) { + return "BatteryCharging1"; + } else if (!strncmp(filename, "batteryfull", 11)) { + return "BatteryFull"; + } else if (!strncmp(filename, "SCAB", 4)) { + return "SCAB"; + } else { + error("WARNING: Unhandled component '%s'", filename); + return NULL; + } +} diff --git a/src/idevicerestore.h b/src/idevicerestore.h index a83ac5c..4d25428 100644 --- a/src/idevicerestore.h +++ b/src/idevicerestore.h @@ -46,6 +46,7 @@ void build_identity_print_information(plist_t build_identity); int build_identity_get_component_path(plist_t build_identity, const char* component, char** path); int ipsw_extract_filesystem(const char* ipsw, plist_t build_identity, char** filesystem); int ipsw_get_component_by_path(const char* ipsw, plist_t tss, const char* component, const char* path, char** data, uint32_t* size); +const char* get_component_name(const char* filename); #ifdef __cplusplus } |