mirror of
https://github.com/tihmstar/futurerestore.git
synced 2025-07-07 15:50:32 +00:00
parent
6ccc68162b
commit
38a3c0888a
|
@ -1533,9 +1533,8 @@ void futurerestore::downloadLatestVeridian(){
|
||||||
|
|
||||||
void futurerestore::downloadLatestFirmwareComponents(){
|
void futurerestore::downloadLatestFirmwareComponents(){
|
||||||
info("Downloading the latest firmware components...\n");
|
info("Downloading the latest firmware components...\n");
|
||||||
mkdir(FIRMWARES_TMP_PATH, 0755);
|
__mkdir(FIRMWARES_TMP_PATH, 0755);
|
||||||
char zip_name[PATH_MAX];
|
char zip_name[PATH_MAX];
|
||||||
char *tmp = FIRMWARES_TMP_PATH;
|
|
||||||
sprintf(zip_name, "%s/%s", FUTURERESTORE_TMP_PATH, "Firmwares.ipsw");
|
sprintf(zip_name, "%s/%s", FUTURERESTORE_TMP_PATH, "Firmwares.ipsw");
|
||||||
unlink(zip_name);
|
unlink(zip_name);
|
||||||
downloadLatestRose();
|
downloadLatestRose();
|
||||||
|
@ -1543,10 +1542,14 @@ void futurerestore::downloadLatestFirmwareComponents(){
|
||||||
downloadLatestSavage();
|
downloadLatestSavage();
|
||||||
downloadLatestVeridian();
|
downloadLatestVeridian();
|
||||||
zip_directory(FIRMWARES_TMP_PATH, zip_name);
|
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};
|
struct stat st{0};
|
||||||
retassure(!stat(zip_name, &st), "could not zip Firmwares to ipsw\n");
|
if(!stat(FIRMWARES_TMP_PATH, &st))
|
||||||
char *firmware_zip = zip_name;
|
{
|
||||||
_client->ipsw2 = strdup(firmware_zip);
|
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");
|
info("Finished downloading the latest firmware components!\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -255,9 +255,8 @@ int main_r(int argc, const char * argv[]) {
|
||||||
|
|
||||||
versVals.basebandMode = kBasebandModeWithoutBaseband;
|
versVals.basebandMode = kBasebandModeWithoutBaseband;
|
||||||
if (!client.is32bit() && !(isSepManifestSigned = isManifestSignedForDevice(client.sepManifestPath(), &devVals, &versVals))){
|
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){
|
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("\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");
|
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");
|
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))) {
|
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();
|
client.putDeviceIntoRecovery();
|
||||||
if (flags & FLAG_WAIT){
|
if (flags & FLAG_WAIT){
|
||||||
client.waitForNonce();
|
client.waitForNonce();
|
||||||
|
|
Loading…
Reference in a new issue