diff options
author | Hector Martin | 2021-11-17 15:00:15 +0900 |
---|---|---|
committer | Hector Martin | 2021-11-17 15:11:53 +0900 |
commit | ef2db7acb3b177aab665267934e3d64c95cfe758 (patch) | |
tree | dc262ddfd2befb5195668d6938d5082763019b7e /src/restore.c | |
parent | 17c80a650f963be7842ef15d83e93286a0129f7a (diff) | |
download | idevicerestore-ef2db7acb3b177aab665267934e3d64c95cfe758.tar.gz idevicerestore-ef2db7acb3b177aab665267934e3d64c95cfe758.tar.bz2 |
idevicerestore: Identify build identity by Variant (Monterey)
Monterey got rid of VariantSupportsGlobalSigning. Identify builds
based on the Variant field (which seems to always have consistent
values) instead of using RestoreBehavior and
VariantSupportsGlobalSigning.
Signed-off-by: Hector Martin <marcan@marcan.st>
Diffstat (limited to 'src/restore.c')
-rw-r--r-- | src/restore.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/restore.c b/src/restore.c index d26f398..97ee18e 100644 --- a/src/restore.c +++ b/src/restore.c @@ -2802,16 +2802,23 @@ plist_t restore_get_build_identity(struct idevicerestore_client_t* client, uint8 { unsigned int size = 0; unsigned char* data = NULL; + const char *variant; plist_t buildmanifest = NULL; ipsw_extract_to_memory(client->ipsw, "BuildManifest.plist", &data, &size); plist_from_xml((char*)data, size, &buildmanifest); free(data); - plist_t build_identity = build_manifest_get_build_identity_for_model_with_restore_behavior_and_global_signing( + if (is_recover_os) + variant = "macOS Customer"; + else if (client->flags & FLAG_ERASE) + variant = "Customer Erase Install (IPSW)"; + else + variant = "Customer Upgrade Install (IPSW)"; + + plist_t build_identity = build_manifest_get_build_identity_for_model_with_variant( buildmanifest, client->device->hardware_model, - client->flags & FLAG_ERASE ? "Erase": "Update", - is_recover_os); + variant); plist_t unique_id_node = plist_dict_get_item(buildmanifest, "UniqueBuildID"); debug_plist(unique_id_node); |