summaryrefslogtreecommitdiffstats
path: root/src/restore.c
diff options
context:
space:
mode:
authorGravatar BALATON Zoltan2017-11-13 17:06:56 +0100
committerGravatar Nikias Bassen2018-04-27 19:58:30 +0200
commitdc484d17a2c38660afc60b23a339f82a68c2ef6e (patch)
tree1914fd1a5c77b347fa3d59f2dc36f81469dc694a /src/restore.c
parent7476d787b4ee4561835d3f8f0f677604203f538d (diff)
downloadidevicerestore-dc484d17a2c38660afc60b23a339f82a68c2ef6e.tar.gz
idevicerestore-dc484d17a2c38660afc60b23a339f82a68c2ef6e.tar.bz2
Decide what to do when updating SE firmware based on chip ID
This should be more accurate than guessing based on what is in the build identity and avoid doing unexpected things for unknown hardware.
Diffstat (limited to 'src/restore.c')
-rw-r--r--src/restore.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/restore.c b/src/restore.c
index fd646a3..7cc2295 100644
--- a/src/restore.c
+++ b/src/restore.c
@@ -1789,10 +1789,14 @@ plist_t restore_get_se_firmware_data(restored_client_t restore, struct idevicere
plist_t request = NULL;
plist_t response = NULL;
int ret;
-
- if (build_identity_has_component(build_identity, "SE,Firmware")) {
+ uint64_t chip_id = 0;
+ plist_t node = plist_dict_get_item(p_info, "SE,ChipID");
+ if (node && plist_get_node_type(node) == PLIST_UINT) {
+ plist_get_uint_val(node, &chip_id);
+ }
+ if (chip_id == 0x20211) {
comp_name = "SE,Firmware";
- } else if (build_identity_has_component(build_identity, "SE,UpdatePayload")) {
+ } else if (chip_id == 0x73) {
comp_name = "SE,UpdatePayload";
} else {
error("ERROR: Neither 'SE,Firmware' nor 'SE,UpdatePayload' found in build identity.\n");