mirror of
https://github.com/tihmstar/futurerestore.git
synced 2024-12-21 17:25:30 +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
|
||||
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!
|
||||
//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 ){
|
||||
|
|
|
@ -280,14 +280,15 @@ error:
|
|||
}
|
||||
|
||||
int main(int argc, const char * argv[]) {
|
||||
//#ifdef DEBUG
|
||||
// return main_r(argc, argv);
|
||||
//#else
|
||||
#ifdef DEBUG
|
||||
return main_r(argc, argv);
|
||||
#else
|
||||
try {
|
||||
return main_r(argc, argv);
|
||||
} catch (std::exception &e) {
|
||||
printf("%s: failed with exception (%s)\n",PACKAGE_NAME,e.what());
|
||||
return -1;
|
||||
} catch (tihmstar::exception &e) {
|
||||
printf("%s: failed with exception:\n",PACKAGE_NAME);
|
||||
e.dump();
|
||||
return e.code();
|
||||
}
|
||||
//#endif
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue