summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Benjamin BOURGEAIS2021-05-06 17:23:07 +0200
committerGravatar Benjamin BOURGEAIS2021-05-08 14:16:50 +0200
commit46b3fde00c3c1d895e6e289e236e92bb6c50e714 (patch)
tree78f223b421d19b544b79487d7cdc6e5b829651b1
parent5aebc0a3d12d5904709624c5eacb194ab34676f9 (diff)
downloadidevicerestore-46b3fde00c3c1d895e6e289e236e92bb6c50e714.tar.gz
idevicerestore-46b3fde00c3c1d895e6e289e236e92bb6c50e714.tar.bz2
Add an embedded empty local policy file
This file will be needed later by the stage 1 boot process.
-rw-r--r--src/idevicerestore.c7
-rw-r--r--src/idevicerestore.h5
2 files changed, 12 insertions, 0 deletions
diff --git a/src/idevicerestore.c b/src/idevicerestore.c
index 7653125..0ec3af4 100644
--- a/src/idevicerestore.c
+++ b/src/idevicerestore.c
@@ -137,6 +137,13 @@ static void usage(int argc, char* argv[], int err)
}
#endif
+const uint8_t lpol_file[22] = {
+ 0x30, 0x14, 0x16, 0x04, 0x49, 0x4d, 0x34, 0x50,
+ 0x16, 0x04, 0x6c, 0x70, 0x6f, 0x6c, 0x16, 0x03,
+ 0x31, 0x2e, 0x30, 0x04, 0x01, 0x00
+};
+const uint32_t lpol_file_length = 22;
+
static int idevicerestore_keep_pers = 0;
static int load_version_data(struct idevicerestore_client_t* client)
diff --git a/src/idevicerestore.h b/src/idevicerestore.h
index d8e3440..65776c3 100644
--- a/src/idevicerestore.h
+++ b/src/idevicerestore.h
@@ -59,6 +59,11 @@ enum {
RESTORE_NUM_STEPS
};
+// lpol_file has been extracted from the IMG4 dump of the ac2 usb protocol. It is not present in the .ipsw and
+// represents and empty "local policy". See https://support.apple.com/guide/security/contents-a-localpolicy-file-mac-apple-silicon-secc745a0845/web.
+extern const uint8_t lpol_file[22];
+extern const uint32_t lpol_file_length;
+
typedef void (*idevicerestore_progress_cb_t)(int step, double step_progress, void* userdata);
struct idevicerestore_client_t* idevicerestore_client_new(void);