mirror of
https://github.com/tihmstar/futurerestore.git
synced 2025-01-08 20:25:30 +00:00
added more logs,
fixed parameter allocing 1 more byte (0 terminated string) of buffer for apticket
This commit is contained in:
parent
64fbd4d536
commit
6b0085ff6a
|
@ -202,8 +202,8 @@ void futurerestore::loadAPTickets(const vector<const char *> &apticketPaths){
|
||||||
|
|
||||||
size_t fSize = ftell(f);
|
size_t fSize = ftell(f);
|
||||||
fseek(f, 0, SEEK_SET);
|
fseek(f, 0, SEEK_SET);
|
||||||
char *buf = (char*)malloc(fSize);
|
char *buf = (char*)malloc(fSize+1);
|
||||||
memset(buf, 0, fSize);
|
memset(buf, 0, fSize+1);
|
||||||
fread(buf, fSize, 1, f);
|
fread(buf, fSize, 1, f);
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
|
||||||
|
@ -222,6 +222,7 @@ void futurerestore::loadAPTickets(const vector<const char *> &apticketPaths){
|
||||||
|
|
||||||
_im4ms.push_back(im4m);
|
_im4ms.push_back(im4m);
|
||||||
_aptickets.push_back(apticket);
|
_aptickets.push_back(apticket);
|
||||||
|
printf("reading ticket %s done\n",apticketPath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
static struct option longopts[] = {
|
static struct option longopts[] = {
|
||||||
{ "apticket", required_argument, NULL, 't' },
|
{ "apticket", required_argument, NULL, 't' },
|
||||||
{ "baseband", required_argument, NULL, 'b' },
|
{ "baseband", required_argument, NULL, 'b' },
|
||||||
{ "baseband-plist", required_argument, NULL, 'p' },
|
{ "baseband-manifest", required_argument, NULL, 'p' },
|
||||||
{ "sep", required_argument, NULL, 's' },
|
{ "sep", required_argument, NULL, 's' },
|
||||||
{ "sep-manifest", required_argument, NULL, 'm' },
|
{ "sep-manifest", required_argument, NULL, 'm' },
|
||||||
{ "wait", no_argument, NULL, 'w' },
|
{ "wait", no_argument, NULL, 'w' },
|
||||||
|
@ -76,10 +76,8 @@ int main(int argc, const char * argv[]) {
|
||||||
|
|
||||||
vector<const char*> apticketPaths;
|
vector<const char*> apticketPaths;
|
||||||
|
|
||||||
t_devicevals devVals;
|
t_devicevals devVals = {0};
|
||||||
t_iosVersion versVals;
|
t_iosVersion versVals = {0};
|
||||||
memset(&devVals, 0, sizeof(devVals));
|
|
||||||
memset(&versVals, 0, sizeof(versVals));
|
|
||||||
|
|
||||||
if (argc == 1){
|
if (argc == 1){
|
||||||
cmd_help();
|
cmd_help();
|
||||||
|
@ -133,6 +131,8 @@ int main(int argc, const char * argv[]) {
|
||||||
futurerestore client;
|
futurerestore client;
|
||||||
if (!client.init()) reterror(-3,"can't init, no device found\n");
|
if (!client.init()) reterror(-3,"can't init, no device found\n");
|
||||||
|
|
||||||
|
printf("futurerestore init done\n");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (apticketPaths.size()) client.loadAPTickets(apticketPaths);
|
if (apticketPaths.size()) client.loadAPTickets(apticketPaths);
|
||||||
|
|
||||||
|
@ -168,6 +168,8 @@ int main(int argc, const char * argv[]) {
|
||||||
client.setBasebandManifestPath(basebandManifestPath);
|
client.setBasebandManifestPath(basebandManifestPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
printf("Did set sep+baseband path and firmware\n");
|
||||||
|
|
||||||
|
|
||||||
versVals.basebandMode = kBasebandModeWithoutBaseband;
|
versVals.basebandMode = kBasebandModeWithoutBaseband;
|
||||||
if (!(isSepManifestSigned = isManifestSignedForDevice(client.sepManifestPath(), &devVals, &versVals))){
|
if (!(isSepManifestSigned = isManifestSignedForDevice(client.sepManifestPath(), &devVals, &versVals))){
|
||||||
|
|
Loading…
Reference in a new issue