diff options
author | Benjamin BOURGEAIS | 2021-05-06 17:37:31 +0200 |
---|---|---|
committer | Benjamin BOURGEAIS | 2021-05-08 14:16:50 +0200 |
commit | 1b96826b10d3eeef6f2c44eca0c44fe239b68b8a (patch) | |
tree | 10c40da10800baa369f5e050952bf4042ae38d1b /src | |
parent | 52f8db759040a1ee1d6ffbb694b50b646c9c41e2 (diff) | |
download | idevicerestore-1b96826b10d3eeef6f2c44eca0c44fe239b68b8a.tar.gz idevicerestore-1b96826b10d3eeef6f2c44eca0c44fe239b68b8a.tar.bz2 |
recovery: Ignore firmwares already sent on stage 1
Diffstat (limited to 'src')
-rw-r--r-- | src/recovery.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/recovery.c b/src/recovery.c index 13d273d..415a5d1 100644 --- a/src/recovery.c +++ b/src/recovery.c @@ -436,8 +436,14 @@ int recovery_send_loaded_by_iboot(struct idevicerestore_client_t* client, plist_ plist_dict_next_item(manifest_node, iter, &key, &node); if (key == NULL) break; + plist_t iboot_node = plist_access_path(node, 2, "Info", "IsLoadedByiBoot"); - if (iboot_node && plist_get_node_type(iboot_node) == PLIST_BOOLEAN) { + plist_t iboot_stg1_node = plist_access_path(node, 2, "Info", "IsLoadedByiBootStage1"); + uint8_t is_stg1 = 0; + if (iboot_stg1_node && plist_get_node_type(iboot_stg1_node) == PLIST_BOOLEAN) { + plist_get_bool_val(iboot_stg1_node, &is_stg1); + } + if (iboot_node && plist_get_node_type(iboot_node) == PLIST_BOOLEAN && !is_stg1) { uint8_t b = 0; plist_get_bool_val(iboot_node, &b); if (b) { |