mirror of
https://github.com/tihmstar/futurerestore.git
synced 2025-07-22 19:58:44 +00:00
added option to ignore bad ramdisk hashes
This commit is contained in:
parent
7298131780
commit
923d8168e5
|
@ -670,7 +670,20 @@ void futurerestore::doRestore(const char *ipsw){
|
||||||
}else
|
}else
|
||||||
printf("Verified ECID in APTicket matches device ECID\n");
|
printf("Verified ECID in APTicket matches device ECID\n");
|
||||||
|
|
||||||
plist_t ticketIdentity = img4tool::getBuildIdentityForIm4m({im4m.first,im4m.second}, buildmanifest);
|
plist_t ticketIdentity = NULL;
|
||||||
|
|
||||||
|
try {
|
||||||
|
ticketIdentity = img4tool::getBuildIdentityForIm4m({im4m.first,im4m.second}, buildmanifest);
|
||||||
|
} catch (tihmstar::exception &e) {
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!ticketIdentity) {
|
||||||
|
printf("Failed to get exact match for build identity, using fallback to ignore certain values");
|
||||||
|
ticketIdentity = img4tool::getBuildIdentityForIm4m({im4m.first,im4m.second}, buildmanifest, {"RestoreRamDisk","RestoreTrustCache"});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//TODO: make this nicer!
|
//TODO: make this nicer!
|
||||||
//for now a simple pointercompare should be fine, because both plist_t should point into the same buildidentity inside the buildmanifest
|
//for now a simple pointercompare should be fine, because both plist_t should point into the same buildidentity inside the buildmanifest
|
||||||
if (ticketIdentity != build_identity ){
|
if (ticketIdentity != build_identity ){
|
||||||
|
|
|
@ -280,14 +280,15 @@ error:
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, const char * argv[]) {
|
int main(int argc, const char * argv[]) {
|
||||||
//#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
// return main_r(argc, argv);
|
return main_r(argc, argv);
|
||||||
//#else
|
#else
|
||||||
try {
|
try {
|
||||||
return main_r(argc, argv);
|
return main_r(argc, argv);
|
||||||
} catch (std::exception &e) {
|
} catch (tihmstar::exception &e) {
|
||||||
printf("%s: failed with exception (%s)\n",PACKAGE_NAME,e.what());
|
printf("%s: failed with exception:\n",PACKAGE_NAME);
|
||||||
return -1;
|
e.dump();
|
||||||
|
return e.code();
|
||||||
}
|
}
|
||||||
//#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue