mirror of
https://github.com/tihmstar/futurerestore.git
synced 2025-07-23 20:08:17 +00:00
using tsschecker's fallback for bbgcid if device is already connected in recovery (there are still some problems if tsschecker's bbgcid is wrong/does not exist)
This commit is contained in:
parent
b991cfa441
commit
1e225977f5
|
@ -227,7 +227,10 @@ void futurerestore::loadAPTickets(const vector<const char *> &apticketPaths){
|
||||||
|
|
||||||
uint64_t futurerestore::getBasebandGoldCertIDFromDevice(){
|
uint64_t futurerestore::getBasebandGoldCertIDFromDevice(){
|
||||||
if (!_client->preflight_info){
|
if (!_client->preflight_info){
|
||||||
normal_get_preflight_info(_client, &_client->preflight_info);
|
if (normal_get_preflight_info(_client, &_client->preflight_info) == -1){
|
||||||
|
printf("[WARNING] failed to read BasebandGoldCertID from device! Is it already in recovery?\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
plist_t node;
|
plist_t node;
|
||||||
node = plist_dict_get_item(_client->preflight_info, "CertID");
|
node = plist_dict_get_item(_client->preflight_info, "CertID");
|
||||||
|
|
|
@ -172,13 +172,13 @@ int main(int argc, const char * argv[]) {
|
||||||
}
|
}
|
||||||
|
|
||||||
versVals.basebandMode = kBasebandModeOnlyBaseband;
|
versVals.basebandMode = kBasebandModeOnlyBaseband;
|
||||||
if ((devVals.bbgcid = client.getBasebandGoldCertIDFromDevice())){
|
if (!(devVals.bbgcid = client.getBasebandGoldCertIDFromDevice())){
|
||||||
if (!(isBasebandSigned = isManifestSignedForDevice(client.basebandManifestPath(), &devVals, &versVals))) {
|
printf("[WARNING] using tsschecker's fallback to get BasebandGoldCertID. This might result in invalid baseband signing status information\n");
|
||||||
reterror(-3,"baseband firmware isn't signed\n");
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
reterror(-3,"unable to get bbgcid from device\n");
|
|
||||||
}
|
}
|
||||||
|
if (!(isBasebandSigned = isManifestSignedForDevice(client.basebandManifestPath(), &devVals, &versVals))) {
|
||||||
|
reterror(-3,"baseband firmware isn't signed\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
client.putDeviceIntoRecovery();
|
client.putDeviceIntoRecovery();
|
||||||
if (flags & FLAG_WAIT){
|
if (flags & FLAG_WAIT){
|
||||||
|
|
Loading…
Reference in a new issue