summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Joshua Hill2010-06-07 17:17:30 +0800
committerGravatar rcg4u2010-06-09 17:17:29 +0800
commit7d6207c33c44648cf9056ddd31ce51ac834563ab (patch)
tree61a4884132293f27e48eab6b468131ad158be7fe
parenta274554b753880dd7042b6013d0158a0b81124c7 (diff)
downloadidevicerestore-7d6207c33c44648cf9056ddd31ce51ac834563ab.tar.gz
idevicerestore-7d6207c33c44648cf9056ddd31ce51ac834563ab.tar.bz2
More small fixes and updated the TODO list
-rw-r--r--TODO35
-rw-r--r--src/idevicerestore.c9
-rw-r--r--src/idevicerestore.h7
-rw-r--r--src/restore.h1
4 files changed, 29 insertions, 23 deletions
diff --git a/TODO b/TODO
index 80e336c..9e77cef 100644
--- a/TODO
+++ b/TODO
@@ -1,19 +1,16 @@
-x Unzip IPSW
-x Parse BuildManifest.plist
-x Build TSS request
-x Submit TSS request to apple
-X Stitch new signatures onto firmware
-X Connect to iBoot
-X Upload iBEC and execute go
-X Reconnect to iBEC
-X Upload devicetree and execute devicetree
-X Upload ramdisk and execute ramdisk
-X Upload kernelcache and execute bootx
-X Send QueryType request
-X Send StartRestore request
-X Send source verification packets
-X Send filesystem payload
-X Send kernelcache payload
-X Send NOR firmware payload
-* Fetch activation ticket from apple
-* Send activation ticket to device \ No newline at end of file
+TODO List
+------------------------------------------------
+
+1) Instead of assumeing upgrade or restore, the program should query all avaiable build identitiys and find which ones are valid, if more then one is valid then display a menu asking whether to resore or upgrade. (This would also benifit users by cacheing both upgrade and restore SHSH blobs to sauriks server so users aren't stuck with only being able to upgrade or restore.)
+2) Also img3 should be updated to be able to fetch tags from each image such as the VERS tag to be able to compare with the current iBoot version.
+3) Many of idevicerestore options can probably be compiled into one flags structure.
+4) need to implement restore_reboot().
+5) Need to update restore progress notifications to use print_progress_bar().
+6) Need to add 8900 file support into img3.c.
+7) Cacheing TSS and activation info locally so the program doesn't need to query apple/cydia servers everytime would be nice.
+8) Need to add support to handle and display status messages correctly.
+9) Writing restore logs to an external file for debugging would be a great help.
+10) Need to change some info progresses to only display the component name rather then the full path which can be messy.
+11) Would be nice to add options to keep some connections open during similar operations rather then reopening and closing them each time.
+12) Extracting and signing all firmware files at one time rather then extracting and signing each one as we need it could speed things up as well.
+13) restore.c is still very ugly and can be cleaned up \ No newline at end of file
diff --git a/src/idevicerestore.c b/src/idevicerestore.c
index a1faeac..cc97e2c 100644
--- a/src/idevicerestore.c
+++ b/src/idevicerestore.c
@@ -144,6 +144,13 @@ int main(int argc, char* argv[]) {
}
idevicerestore_device = &idevicerestore_devices[id];
+ if (idevicerestore_mode == MODE_RESTORE) {
+ if (restore_reboot(uuid) < 0) {
+ error("ERROR: Unable to exit restore mode\n");
+ return -1;
+ }
+ }
+
// extract buildmanifest
plist_t buildmanifest = NULL;
info("Extracting BuildManifest from IPSW\n");
@@ -590,7 +597,7 @@ int extract_filesystem(const char* ipsw, plist_t build_identity, char** filesyst
return 0;
}
-int get_signed_component(char* ipsw, plist_t tss, const char* path, char** data, uint32_t* size) {
+int get_signed_component(const char* ipsw, plist_t tss, const char* path, char** data, uint32_t* size) {
img3_file* img3 = NULL;
uint32_t component_size = 0;
char* component_data = NULL;
diff --git a/src/idevicerestore.h b/src/idevicerestore.h
index f92aad2..e4186c9 100644
--- a/src/idevicerestore.h
+++ b/src/idevicerestore.h
@@ -1,5 +1,5 @@
/*
- * idevicerestore.g
+ * idevicerestore.h
* Restore device firmware and filesystem
*
* Copyright (c) 2010 Joshua Hill. All Rights Reserved.
@@ -22,7 +22,8 @@
#ifndef IDEVICERESTORE_H
#define IDEVICERESTORE_H
-#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
#include <plist/plist.h>
#define info(...) printf(__VA_ARGS__)
@@ -101,7 +102,7 @@ plist_t get_build_identity(plist_t buildmanifest, uint32_t identity);
int write_file(const char* filename, const void* data, size_t size);
int get_shsh_blobs(uint64_t ecid, plist_t build_identity, plist_t* tss);
int extract_filesystem(const char* ipsw, plist_t buildmanifest, char** filesystem);
-int get_signed_component(char* ipsw, plist_t tss, const char* path, char** data, uint32_t* size);
+int get_signed_component(const char* ipsw, plist_t tss, const char* path, char** data, uint32_t* size);
inline static void debug_plist(plist_t plist) {
int size = 0;
diff --git a/src/restore.h b/src/restore.h
index 6614355..7a2e27e 100644
--- a/src/restore.h
+++ b/src/restore.h
@@ -26,6 +26,7 @@
#include <libimobiledevice/restore.h>
#include <libimobiledevice/libimobiledevice.h>
+int restore_reboot(const char* uuid);
int restore_check_mode(const char* uuid);
int restore_check_device(const char* uuid);
const char* restore_progress_string(unsigned int operation);