From 4d74cd31751165b671eba9a1b0936718b7f39b52 Mon Sep 17 00:00:00 2001 From: Joshua Hill Date: Tue, 1 Jun 2010 16:13:25 -0400 Subject: Began major refactoring, not quite finished yet, this branch is probably broke --- src/recovery.h | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'src/recovery.h') diff --git a/src/recovery.h b/src/recovery.h index 5495638..86e3af2 100644 --- a/src/recovery.h +++ b/src/recovery.h @@ -19,19 +19,22 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef RECOVERY_H -#define RECOVERY_H +#ifndef IDEVICERESTORE_RECOVERY_H +#define IDEVICERESTORE_RECOVERY_H #include #include -int recovery_send_signed_component(irecv_client_t client, char* ipsw, plist_t tss, char* component); +int recovery_check_mode(); +int recovery_send_signed_component(irecv_client_t client, const char* ipsw, plist_t tss, char* component); irecv_error_t recovery_open_with_timeout(irecv_client_t* client); -int recovery_send_ibec(char* ipsw, plist_t tss); -int recovery_send_applelogo(char* ipsw, plist_t tss); -int recovery_send_devicetree(char* ipsw, plist_t tss); -int recovery_send_ramdisk(char* ipsw, plist_t tss); -int recovery_send_kernelcache(char* ipsw, plist_t tss); +int recovery_send_ibec(const char* ipsw, plist_t tss); +int recovery_send_applelogo(const char* ipsw, plist_t tss); +int recovery_send_devicetree(const char* ipsw, plist_t tss); +int recovery_send_ramdisk(const char* ipsw, plist_t tss); +int recovery_send_kernelcache(const char* ipsw, plist_t tss); int recovery_get_ecid(uint64_t* ecid); +int recovery_get_cpid(uint32_t* cpid); +int recovery_get_bdid(uint32_t* bdid); #endif -- cgit v1.1-32-gdbae From 26e7635460c7369be07455a7bcc7621cf53cdd2d Mon Sep 17 00:00:00 2001 From: Joshua Hill Date: Fri, 4 Jun 2010 16:02:05 -0400 Subject: Refactoring continued, lots of bug fixes, probably about half way through --- src/recovery.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/recovery.h') diff --git a/src/recovery.h b/src/recovery.h index 86e3af2..b191aa5 100644 --- a/src/recovery.h +++ b/src/recovery.h @@ -26,6 +26,7 @@ #include int recovery_check_mode(); +int recovery_enter_restore(const char* ipsw, plist_t tss); int recovery_send_signed_component(irecv_client_t client, const char* ipsw, plist_t tss, char* component); irecv_error_t recovery_open_with_timeout(irecv_client_t* client); int recovery_send_ibec(const char* ipsw, plist_t tss); -- cgit v1.1-32-gdbae From 0966c00988477450691c8c9bce47a3fb30eff6da Mon Sep 17 00:00:00 2001 From: Joshua Hill Date: Fri, 4 Jun 2010 23:17:05 -0400 Subject: Even more major cleanups and refactoring, this branch is still broken but starting to mature really well --- src/recovery.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/recovery.h') diff --git a/src/recovery.h b/src/recovery.h index b191aa5..1953c6a 100644 --- a/src/recovery.h +++ b/src/recovery.h @@ -26,7 +26,7 @@ #include int recovery_check_mode(); -int recovery_enter_restore(const char* ipsw, plist_t tss); +int recovery_enter_restore(const char* uuid, const char* ipsw, plist_t tss); int recovery_send_signed_component(irecv_client_t client, const char* ipsw, plist_t tss, char* component); irecv_error_t recovery_open_with_timeout(irecv_client_t* client); int recovery_send_ibec(const char* ipsw, plist_t tss); -- cgit v1.1-32-gdbae From 24afafe06f902bfd9f5652beb8797f24033c68bc Mon Sep 17 00:00:00 2001 From: Joshua Hill Date: Sun, 20 Jun 2010 22:02:18 -0400 Subject: Archived for historical reasons --- src/recovery.h | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'src/recovery.h') diff --git a/src/recovery.h b/src/recovery.h index 1953c6a..6cd467c 100644 --- a/src/recovery.h +++ b/src/recovery.h @@ -22,12 +22,24 @@ #ifndef IDEVICERESTORE_RECOVERY_H #define IDEVICERESTORE_RECOVERY_H +#ifdef __cplusplus +extern "C" { +#endif + #include #include +#include + +struct recovery_client_t { + irecv_client_t client; + const char* ipsw; + plist_t tss; +}; int recovery_check_mode(); -int recovery_enter_restore(const char* uuid, const char* ipsw, plist_t tss); -int recovery_send_signed_component(irecv_client_t client, const char* ipsw, plist_t tss, char* component); +int recovery_client_new(struct idevicerestore_client_t* client); +void recovery_client_free(struct idevicerestore_client_t* client); +int recovery_send_signed_component(struct idevicerestore_client_t* client, const char* ipsw, plist_t tss, char* component) { irecv_error_t recovery_open_with_timeout(irecv_client_t* client); int recovery_send_ibec(const char* ipsw, plist_t tss); int recovery_send_applelogo(const char* ipsw, plist_t tss); @@ -38,4 +50,8 @@ int recovery_get_ecid(uint64_t* ecid); int recovery_get_cpid(uint32_t* cpid); int recovery_get_bdid(uint32_t* bdid); +#ifdef __cplusplus +} +#endif + #endif -- cgit v1.1-32-gdbae From 930f4b350474435e011b9dca18424dd1c42ea353 Mon Sep 17 00:00:00 2001 From: Joshua Hill Date: Mon, 21 Jun 2010 03:47:54 -0400 Subject: Finally fixed the out of control problem --- src/recovery.h | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'src/recovery.h') diff --git a/src/recovery.h b/src/recovery.h index 6cd467c..5d1129f 100644 --- a/src/recovery.h +++ b/src/recovery.h @@ -28,8 +28,11 @@ extern "C" { #include #include -#include +#include "common.h" + +struct irecv_client; +typedef struct irecv_client* irecv_client_t; struct recovery_client_t { irecv_client_t client; const char* ipsw; @@ -37,18 +40,19 @@ struct recovery_client_t { }; int recovery_check_mode(); +int recovery_open_with_timeout(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_send_signed_component(struct idevicerestore_client_t* client, const char* ipsw, plist_t tss, char* component) { -irecv_error_t recovery_open_with_timeout(irecv_client_t* client); -int recovery_send_ibec(const char* ipsw, plist_t tss); -int recovery_send_applelogo(const char* ipsw, plist_t tss); -int recovery_send_devicetree(const char* ipsw, plist_t tss); -int recovery_send_ramdisk(const char* ipsw, plist_t tss); -int recovery_send_kernelcache(const char* ipsw, plist_t tss); -int recovery_get_ecid(uint64_t* ecid); -int recovery_get_cpid(uint32_t* cpid); -int recovery_get_bdid(uint32_t* bdid); +int recovery_send_signed_component(struct idevicerestore_client_t* client, const char* component); +int recovery_send_ibec(struct idevicerestore_client_t* client); +int recovery_send_applelogo(struct idevicerestore_client_t* client); +int recovery_send_devicetree(struct idevicerestore_client_t* client); +int recovery_send_ramdisk(struct idevicerestore_client_t* client); +int recovery_send_kernelcache(struct idevicerestore_client_t* client); +int recovery_get_ecid(struct idevicerestore_client_t* client, uint64_t* ecid); +int recovery_get_cpid(struct idevicerestore_client_t* client, uint32_t* cpid); +int recovery_get_bdid(struct idevicerestore_client_t* client, uint32_t* bdid); + #ifdef __cplusplus } -- cgit v1.1-32-gdbae From 4090b98d9e8cdaada701ac320e20f7c8b0cf88f6 Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Fri, 9 Jul 2010 03:47:42 +0200 Subject: Implement handling of devices which do not require a tss request This introduces passing around the "selected" build identity and fixes code logic issues to make idevicerestore work again. --- src/recovery.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/recovery.h') diff --git a/src/recovery.h b/src/recovery.h index 5d1129f..b7cc0e4 100644 --- a/src/recovery.h +++ b/src/recovery.h @@ -43,12 +43,12 @@ int recovery_check_mode(); int recovery_open_with_timeout(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_send_signed_component(struct idevicerestore_client_t* client, const char* component); -int recovery_send_ibec(struct idevicerestore_client_t* client); -int recovery_send_applelogo(struct idevicerestore_client_t* client); -int recovery_send_devicetree(struct idevicerestore_client_t* client); -int recovery_send_ramdisk(struct idevicerestore_client_t* client); -int recovery_send_kernelcache(struct idevicerestore_client_t* client); +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); +int recovery_send_devicetree(struct idevicerestore_client_t* client, plist_t build_identity); +int recovery_send_ramdisk(struct idevicerestore_client_t* client, plist_t build_identity); +int recovery_send_kernelcache(struct idevicerestore_client_t* client, plist_t build_identity); int recovery_get_ecid(struct idevicerestore_client_t* client, uint64_t* ecid); int recovery_get_cpid(struct idevicerestore_client_t* client, uint32_t* cpid); int recovery_get_bdid(struct idevicerestore_client_t* client, uint32_t* bdid); -- cgit v1.1-32-gdbae