mirror of
https://github.com/tihmstar/futurerestore.git
synced 2025-07-06 15:40:33 +00:00
parent
6ccc68162b
commit
38a3c0888a
|
@ -1533,9 +1533,8 @@ void futurerestore::downloadLatestVeridian(){
|
|||
|
||||
void futurerestore::downloadLatestFirmwareComponents(){
|
||||
info("Downloading the latest firmware components...\n");
|
||||
mkdir(FIRMWARES_TMP_PATH, 0755);
|
||||
__mkdir(FIRMWARES_TMP_PATH, 0755);
|
||||
char zip_name[PATH_MAX];
|
||||
char *tmp = FIRMWARES_TMP_PATH;
|
||||
sprintf(zip_name, "%s/%s", FUTURERESTORE_TMP_PATH, "Firmwares.ipsw");
|
||||
unlink(zip_name);
|
||||
downloadLatestRose();
|
||||
|
@ -1543,10 +1542,14 @@ void futurerestore::downloadLatestFirmwareComponents(){
|
|||
downloadLatestSavage();
|
||||
downloadLatestVeridian();
|
||||
zip_directory(FIRMWARES_TMP_PATH, zip_name);
|
||||
rmdir(FIRMWARES_TMP_PATH); //remove the dir if its empty so zip won't fail
|
||||
struct stat st{0};
|
||||
retassure(!stat(zip_name, &st), "could not zip Firmwares to ipsw\n");
|
||||
char *firmware_zip = zip_name;
|
||||
_client->ipsw2 = strdup(firmware_zip);
|
||||
if(!stat(FIRMWARES_TMP_PATH, &st))
|
||||
{
|
||||
retassure(!stat(zip_name, &st), "could not zip Firmwares to ipsw\n");
|
||||
char *firmware_zip = zip_name;
|
||||
_client->ipsw2 = strdup(firmware_zip);
|
||||
}
|
||||
info("Finished downloading the latest firmware components!\n");
|
||||
}
|
||||
|
||||
|
|
|
@ -255,9 +255,8 @@ int main_r(int argc, const char * argv[]) {
|
|||
|
||||
versVals.basebandMode = kBasebandModeWithoutBaseband;
|
||||
if (!client.is32bit() && !(isSepManifestSigned = isManifestSignedForDevice(client.sepManifestPath(), &devVals, &versVals))){
|
||||
reterror("SEP firmware doesn't signed\n");
|
||||
reterror("SEP firmware is NOT being signed!\n");
|
||||
}
|
||||
client.downloadLatestFirmwareComponents();
|
||||
if (flags & FLAG_NO_BASEBAND){
|
||||
printf("\nWARNING: user specified is not to flash a baseband. This can make the restore fail if the device needs a baseband!\n");
|
||||
printf("if you added this flag by mistake, you can press CTRL-C now to cancel\n");
|
||||
|
@ -284,10 +283,11 @@ int main_r(int argc, const char * argv[]) {
|
|||
printf("[WARNING] using tsschecker's fallback to get BasebandGoldCertID. This might result in invalid baseband signing status information\n");
|
||||
}
|
||||
if (!(isBasebandSigned = isManifestSignedForDevice(client.basebandManifestPath(), &devVals, &versVals))) {
|
||||
reterror("baseband firmware doesn't signed\n");
|
||||
reterror("baseband firmware is NOT being signed!\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
client.downloadLatestFirmwareComponents();
|
||||
client.putDeviceIntoRecovery();
|
||||
if (flags & FLAG_WAIT){
|
||||
client.waitForNonce();
|
||||
|
|
Loading…
Reference in a new issue