diff options
author | 2013-11-20 11:32:26 +0100 | |
---|---|---|
committer | 2013-11-20 11:32:26 +0100 | |
commit | 9308e665a2741690b4fa50fa494d7568dda95a28 (patch) | |
tree | c3a2a560f34561961ff063dffd79a95f913650e8 /src/dfu.c | |
parent | f034c26e87e59b96877e7434ac0757d1569906d8 (diff) | |
download | idevicerestore-9308e665a2741690b4fa50fa494d7568dda95a28.tar.gz idevicerestore-9308e665a2741690b4fa50fa494d7568dda95a28.tar.bz2 |
refactor component personalization and add support for Image4 stitching
Diffstat (limited to 'src/dfu.c')
-rw-r--r-- | src/dfu.c | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -179,11 +179,23 @@ int dfu_send_component(struct idevicerestore_client_t* client, plist_t build_ide } } - if (ipsw_get_component_by_path(client->ipsw, client->tss, component, path, &data, &size) < 0) { - error("ERROR: Unable to get component: %s\n", component); + unsigned char* component_data = NULL; + unsigned int component_size = 0; + + if (extract_component(client->ipsw, path, &component_data, &component_size) < 0) { + error("ERROR: Unable to extract component: %s\n", component); + free(path); + return -1; + } + + if (personalize_component(component, component_data, component_size, client->tss, &data, &size) < 0) { + error("ERROR: Unable to get personalized component: %s\n", component); + free(component_data); free(path); return -1; } + free(component_data); + component_data = NULL; if (!(client->flags & FLAG_CUSTOM) && (strcmp(component, "iBEC") == 0)) { unsigned char* ticket = NULL; |