Skip to content

Commit 981d6f3

Browse files
author
Kevin Bradley
committed
finally some hacky progress on the shelf science. massively broken once scrolling passed second index. just committing to have something started, will need to mostly re-write the layout method to be smarter and less verbose and convoluted.
1 parent 45e3e70 commit 981d6f3

30 files changed

+69
-12
lines changed

NativeStuffs/Restore/IPSW.m

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,27 @@ - (BOOL)containsString:(NSString *)theString;
1616

1717
@implementation NSString (Additions)
1818

19+
/*
20+
21+
char -[NSString(Additions) containsString:](void * self, void * _cmd, void * arg2) {
22+
var_C = self;
23+
var_10 = _cmd;
24+
var_14 = arg_8;
25+
eax = [var_C rangeOfString:arg_8];
26+
var_1C = var_C;
27+
var_20 = eax;
28+
if (var_20 == 0x7fffffff) {
29+
var_5 = 0x0;
30+
}
31+
else {
32+
var_5 = 0x1;
33+
}
34+
eax = sign_extend_32(var_5);
35+
return eax;
36+
}
37+
38+
*/
39+
1940
- (BOOL)containsString:(NSString *)theString
2041
{
2142
if ([self rangeOfString:theString].location == NSNotFound)

NativeStuffs/Restore/IPSWRestore.m

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,8 @@ - (void)startListening
152152

153153
- (void)stopListening
154154
{
155+
[bootOptions release];
156+
bootOptions = nil;
155157
AMRestorableDeviceUnregisterForNotifications(self.clientID);
156158
self.clientID = 0;
157159
self.isListening = NO;
@@ -405,6 +407,7 @@ void iFaithStateMachineHandleRestoreComplete(AMRestorableDeviceRef device)
405407

406408
void handleNewDevice(AMRestorableDeviceRef device)
407409
{
410+
NSLog(@"handleNewDevice");
408411
if (currentState != IDLE_STATE)
409412
{
410413
NSLog(@"Device is already being restored");
@@ -418,6 +421,9 @@ void handleNewDevice(AMRestorableDeviceRef device)
418421

419422
void handleKnownDevice(AMRestorableDeviceRef device)
420423
{
424+
NSLog(@"handleKnownDevice");
425+
426+
421427
if (currentState == TRANSITIONING_STATE)
422428
{
423429
cancelTimer();
@@ -434,6 +440,10 @@ void handleKnownDevice(AMRestorableDeviceRef device)
434440

435441
void handleDisconnectedDevice(AMRestorableDeviceRef device)
436442
{
443+
444+
NSLog(@"handleDisconnectedDevice");
445+
446+
437447
if (currentState == RESTORING_STATE)
438448
{
439449
iFaithStateMachineSetState(device, TRANSITIONING_STATE);
@@ -444,6 +454,8 @@ void handleDisconnectedDevice(AMRestorableDeviceRef device)
444454

445455
void eventHandler(AMRestorableDeviceRef device, int event, void *refCon)
446456
{
457+
NSLog(@"eventHandler");
458+
447459
if (event == RESTORABLE_CONNECTED)
448460
{
449461
if (deviceIsTheOne(device)) {
@@ -469,7 +481,7 @@ void eventHandler(AMRestorableDeviceRef device, int event, void *refCon)
469481

470482
void progress_callback(void *device, int operation, int progress, void *user_info)
471483
{
472-
484+
NSLog(@"progress_callback");
473485
CFTypeID deviceTypeID = CFGetTypeID(device);
474486

475487
NSMutableDictionary *info = [@{@"Status" : @"Restoring", @"Operation" : @(operation), @"Progress" : @(progress)} mutableCopy];

NativeStuffs/libusbkit/libusbkit.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ void register_for_usb_notifications(UKDevice * Device) {
151151

152152
void device_attached(void * refCon, io_iterator_t iterator) {
153153

154+
fprintf(stderr, "device attached!\n");
154155
io_service_t usbDevice;
155156
IOReturn ret;
156157
IOCFPlugInInterface **pluginInterface = NULL;
@@ -224,6 +225,7 @@ void device_attached(void * refCon, io_iterator_t iterator) {
224225
}
225226

226227
void device_detached(void *refCon, io_iterator_t iterator) {
228+
fprintf(stderr, "device_detached!\n");
227229

228230
io_service_t service;
229231
SInt32 locationID;
30.1 KB
Binary file not shown.

bin/genpass

9.2 KB
Binary file not shown.

bin/idr/idevicerestore

9.85 KB
Binary file not shown.

bin/idr/libcrypto.1.0.0.dylib

33.5 KB
Binary file not shown.

bin/idr/libcurl.4.dylib

10.9 KB
Binary file not shown.

bin/idr/libiconv.2.dylib

30.3 KB
Binary file not shown.

bin/idr/libidn.11.dylib

22.2 KB
Binary file not shown.

0 commit comments

Comments
 (0)