summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/dfu.c2
-rw-r--r--src/idevicerestore.c1
-rw-r--r--src/idevicerestore.h3
-rw-r--r--src/ipsw.c1
-rw-r--r--src/normal.c3
-rw-r--r--src/recovery.c5
-rw-r--r--src/recovery.h1
-rw-r--r--src/restore.c2
-rw-r--r--src/tss.c1
9 files changed, 17 insertions, 2 deletions
diff --git a/src/dfu.c b/src/dfu.c
index 796bd47..6217ec3 100644
--- a/src/dfu.c
+++ b/src/dfu.c
@@ -24,9 +24,11 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
#include <libirecovery.h>
#include "dfu.h"
+#include "tss.h"
#include "recovery.h"
#include "idevicerestore.h"
#include "common.h"
diff --git a/src/idevicerestore.c b/src/idevicerestore.c
index 8a2786f..829b968 100644
--- a/src/idevicerestore.c
+++ b/src/idevicerestore.c
@@ -25,6 +25,7 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include <ctype.h>
#include <getopt.h>
#include <plist/plist.h>
#include <zlib.h>
diff --git a/src/idevicerestore.h b/src/idevicerestore.h
index 65bb001..44e3350 100644
--- a/src/idevicerestore.h
+++ b/src/idevicerestore.h
@@ -77,8 +77,11 @@ const char* check_product_type(struct idevicerestore_client_t* client);
int get_ecid(struct idevicerestore_client_t* client, uint64_t* ecid);
int get_bdid(struct idevicerestore_client_t* client, uint32_t* bdid);
int get_cpid(struct idevicerestore_client_t* client, uint32_t* cpid);
+int get_nonce(struct idevicerestore_client_t* client, unsigned char** nonce, int* nonce_size);
int get_shsh_blobs(struct idevicerestore_client_t* client, uint64_t ecid, unsigned char* nonce, int nonce_size, plist_t build_identity, plist_t* tss);
void fixup_tss(plist_t tss);
+int build_manifest_get_identity_count(plist_t build_manifest);
+int build_manifest_check_compatibility(plist_t build_manifest, const char* product);
void build_manifest_get_version_information(plist_t build_manifest, struct idevicerestore_client_t* client);
plist_t build_manifest_get_build_identity(plist_t build_manifest, uint32_t identity);
int build_manifest_get_build_count(plist_t build_manifest);
diff --git a/src/ipsw.c b/src/ipsw.c
index 4f86baa..08bd2c1 100644
--- a/src/ipsw.c
+++ b/src/ipsw.c
@@ -29,6 +29,7 @@
#include "ipsw.h"
#include "locking.h"
+#include "download.h"
#include "common.h"
#include "idevicerestore.h"
diff --git a/src/normal.c b/src/normal.c
index 92fff4c..e498113 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -24,6 +24,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
#include <libirecovery.h>
#include <libimobiledevice/lockdown.h>
#include <libimobiledevice/libimobiledevice.h>
@@ -32,6 +33,8 @@
#include "normal.h"
#include "recovery.h"
+extern int16_t userpref_remove_device_record(const char* udid);
+
static int normal_device_connected = 0;
void normal_device_callback(const idevice_event_t* event, void* userdata) {
diff --git a/src/recovery.c b/src/recovery.c
index 5e3dc91..fb5a0fc 100644
--- a/src/recovery.c
+++ b/src/recovery.c
@@ -24,6 +24,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
#include <libirecovery.h>
#include <libimobiledevice/restore.h>
#include <libimobiledevice/libimobiledevice.h>
@@ -261,8 +262,8 @@ int recovery_send_ticket(struct idevicerestore_client_t* client)
}
int recovery_send_component(struct idevicerestore_client_t* client, plist_t build_identity, const char* component) {
- uint32_t size = 0;
- char* data = NULL;
+ unsigned int size = 0;
+ unsigned char* data = NULL;
char* path = NULL;
char* blob = NULL;
irecv_error_t err = 0;
diff --git a/src/recovery.h b/src/recovery.h
index 42fddad..9ffb226 100644
--- a/src/recovery.h
+++ b/src/recovery.h
@@ -43,6 +43,7 @@ struct recovery_client_t {
int recovery_check_mode(struct idevicerestore_client_t* client);
int recovery_client_new(struct idevicerestore_client_t* client);
void recovery_client_free(struct idevicerestore_client_t* client);
+int recovery_enter_restore(struct idevicerestore_client_t* client, plist_t build_identity);
int recovery_send_component(struct idevicerestore_client_t* client, plist_t build_identity, const char* component);
int recovery_send_ibec(struct idevicerestore_client_t* client, plist_t build_identity);
int recovery_send_applelogo(struct idevicerestore_client_t* client, plist_t build_identity);
diff --git a/src/restore.c b/src/restore.c
index 7e613e6..d9694c0 100644
--- a/src/restore.c
+++ b/src/restore.c
@@ -24,6 +24,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
#include <libimobiledevice/restore.h>
#include <zip.h>
#include <libirecovery.h>
@@ -33,6 +34,7 @@
#include "fls.h"
#include "mbn.h"
#include "tss.h"
+#include "ipsw.h"
#include "restore.h"
#include "common.h"
diff --git a/src/tss.c b/src/tss.c
index 7d9c4a4..ed18561 100644
--- a/src/tss.c
+++ b/src/tss.c
@@ -24,6 +24,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
#include <curl/curl.h>
#include <plist/plist.h>