summaryrefslogtreecommitdiffstats
path: root/src/restore.c
diff options
context:
space:
mode:
authorGravatar BALATON Zoltan2015-05-05 01:02:14 +0200
committerGravatar BALATON Zoltan2015-05-05 01:02:14 +0200
commitac78b820e4144617f80c27f866f153f49ffdd92e (patch)
treeae05c2c324e3072da5c85f7862dca9c334245aa4 /src/restore.c
parent245bc9b6510a8900c69c2fd543434bae1bc6ca6a (diff)
downloadidevicerestore-ac78b820e4144617f80c27f866f153f49ffdd92e.tar.gz
idevicerestore-ac78b820e4144617f80c27f866f153f49ffdd92e.tar.bz2
Improved command sequence and use SystemPartitionPadding from build
identity to make sure we use correct values.
Diffstat (limited to 'src/restore.c')
-rw-r--r--src/restore.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/restore.c b/src/restore.c
index 79e1828..aa352c5 100644
--- a/src/restore.c
+++ b/src/restore.c
@@ -1805,17 +1805,19 @@ int restore_device(struct idevicerestore_client_t* client, plist_t build_identit
// FIXME: not required for iOS 5?
//plist_dict_set_item(opts, "SourceRestoreBundlePath", plist_new_string("/tmp"));
plist_dict_set_item(opts, "SystemImage", plist_new_bool(1));
- plist_t spp = plist_new_dict();
- {
+ // FIXME: new on iOS 5 ?
+ plist_dict_set_item(opts, "SystemImageType", plist_new_string("User"));
+ plist_t spp = plist_access_path(build_identity, 2, "Info", "SystemPartitionPadding");
+ if (spp) {
+ spp = plist_copy(spp);
+ } else {
+ spp = plist_new_dict();
plist_dict_set_item(spp, "128", plist_new_uint(1280));
plist_dict_set_item(spp, "16", plist_new_uint(160));
plist_dict_set_item(spp, "32", plist_new_uint(320));
plist_dict_set_item(spp, "64", plist_new_uint(640));
plist_dict_set_item(spp, "8", plist_new_uint(80));
}
- // FIXME: new on iOS 5 ?
- plist_dict_set_item(opts, "SystemImageType", plist_new_string("User"));
-
plist_dict_set_item(opts, "SystemPartitionPadding", spp);
char* guid = generate_guid();
if (guid) {