From da40807d6f135f3e6a4cbb0bd7c51ccdd3881453 Mon Sep 17 00:00:00 2001 From: tihmstar Date: Sat, 31 Dec 2016 20:20:06 +0100 Subject: [PATCH] added option to manually set bbgcid as workaroung for baseband not signed bug --- futurerestore/main.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/futurerestore/main.cpp b/futurerestore/main.cpp index d4d7194b..f3d3598a 100644 --- a/futurerestore/main.cpp +++ b/futurerestore/main.cpp @@ -30,6 +30,7 @@ static struct option longopts[] = { { "debug", no_argument, NULL, 'd' }, { "latest-sep", no_argument, NULL, '0' }, { "latest-baseband", no_argument, NULL, '1' }, + { "bbgcid", required_argument, NULL, '2' }, { NULL, 0, NULL, 0 } }; @@ -42,6 +43,7 @@ void cmd_help(){ printf("Usage: futurerestore [OPTIONS] IPSW\n"); printf("Allows restoring nonmatching iOS/Sep/Baseband\n\n"); + printf(" --bbgcid ID\t\tmanually specify bbgcid\n"); printf(" -t, --apticket PATH\t\tApticket used for restoring\n"); printf(" -b, --baseband PATH\t\tBaseband to be flashed\n"); printf(" -p, --baseband-manifest PATH\tBuildmanifest for requesting baseband ticket\n"); @@ -113,6 +115,10 @@ int main(int argc, const char * argv[]) { case '1': // long option: "latest-baseband"; flags |= FLAG_LATEST_BASEBAND; break; + case '2': // long option: "latest-baseband"; + devVals.bbgcid = (uint64_t)atoll(optarg); + printf("manually set bbgcid to %llu\n",(unsigned long long)devVals.bbgcid); + break; case 'd': // long option: "debug"; can be called as short option idevicerestore_debug = 1; break; @@ -177,8 +183,10 @@ int main(int argc, const char * argv[]) { } versVals.basebandMode = kBasebandModeOnlyBaseband; - if (!(devVals.bbgcid = client.getBasebandGoldCertIDFromDevice())){ - printf("[WARNING] using tsschecker's fallback to get BasebandGoldCertID. This might result in invalid baseband signing status information\n"); + if (!devVals.bbgcid) { + if (!(devVals.bbgcid = client.getBasebandGoldCertIDFromDevice())){ + 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(-3,"baseband firmware isn't signed\n");