|
@@ -88,6 +88,9 @@ static NSString *appleTVAddress = nil;
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
- (void)downloadFile:(NSString *)thePayload toLocation:(NSString *)downloadLocation
|
|
- (void)downloadFile:(NSString *)thePayload toLocation:(NSString *)downloadLocation
|
|
|
{
|
|
{
|
|
|
//statusLabel.stringValue = [NSString stringWithFormat:@"Downloading: %@...", thePayload.lastPathComponent];
|
|
//statusLabel.stringValue = [NSString stringWithFormat:@"Downloading: %@...", thePayload.lastPathComponent];
|
|
@@ -96,7 +99,23 @@ static NSString *appleTVAddress = nil;
|
|
|
//get the stream we want to download
|
|
//get the stream we want to download
|
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
|
+ [downloadFile downloadURL:[NSURL URLWithString:thePayload] toLocation:downloadLocation progress:^(double percentComplete) {
|
|
|
|
|
+
|
|
|
|
|
+ [self setDownloadProgress:percentComplete];
|
|
|
|
|
+
|
|
|
|
|
+ } completed:^(NSString *downloadedFile) {
|
|
|
|
|
+ self.downloading = false;
|
|
|
|
|
+
|
|
|
|
|
+ [self setDownloadProgress:0];
|
|
|
|
|
+ statusLabel.stringValue = [NSString stringWithFormat:@"Uploading file %@....", downloadedFile.lastPathComponent];
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ [self handleDownloadFile:downloadedFile];
|
|
|
|
|
+
|
|
|
|
|
+ }];
|
|
|
|
|
+
|
|
|
|
|
+ return;
|
|
|
|
|
+
|
|
|
[downloadFile downloadFileWithURL:[NSURL URLWithString:thePayload] toLocation:downloadLocation progress:^(double percentComplete) {
|
|
[downloadFile downloadFileWithURL:[NSURL URLWithString:thePayload] toLocation:downloadLocation progress:^(double percentComplete) {
|
|
|
|
|
|
|
|
[self setDownloadProgress:percentComplete];
|
|
[self setDownloadProgress:percentComplete];
|
|
@@ -141,18 +160,19 @@ static NSString *appleTVAddress = nil;
|
|
|
|
|
|
|
|
if ([FM fileExistsAtPath:downloadLocation])
|
|
if ([FM fileExistsAtPath:downloadLocation])
|
|
|
{
|
|
{
|
|
|
- NSString *hash = @"59293ffbdee698488aba799a96fcfe95e1165fa10f760362a2ce910576134e39";
|
|
|
|
|
|
|
+ NSString *hash = @"9e021bd57a31155bfdd05f1cec42a2ba9d0f2c00d4d0e66962b0240d66435577";
|
|
|
switch (self.versionState) {
|
|
switch (self.versionState) {
|
|
|
case KBInstallVersionStateEleven:
|
|
case KBInstallVersionStateEleven:
|
|
|
case KBInstallVersionStateTenTwo:
|
|
case KBInstallVersionStateTenTwo:
|
|
|
-
|
|
|
|
|
- hash = @"59293ffbdee698488aba799a96fcfe95e1165fa10f760362a2ce910576134e39";
|
|
|
|
|
|
|
+ case KBInstallVersionStateTenOne:
|
|
|
|
|
+
|
|
|
|
|
+ hash = @"9e021bd57a31155bfdd05f1cec42a2ba9d0f2c00d4d0e66962b0240d66435577";
|
|
|
break;
|
|
break;
|
|
|
|
|
|
|
|
case KBInstallVersionStateNine:
|
|
case KBInstallVersionStateNine:
|
|
|
- case KBInstallVersionStateTenOne:
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
- hash = @"327c7cea49282109e23c9415d318121f91b79ca7bb813c8724a1c0752e8311af";
|
|
|
|
|
|
|
+ hash = @"e9f68bc562b6f675839437e87d37d5d996f3aafb2d62e7c6cb2c60eb6181ea10";
|
|
|
break;
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
default:
|
|
@@ -165,7 +185,7 @@ static NSString *appleTVAddress = nil;
|
|
|
if (!verify)
|
|
if (!verify)
|
|
|
{
|
|
{
|
|
|
NSLog(@"invalid selection");
|
|
NSLog(@"invalid selection");
|
|
|
- NSAlert *alert = [NSAlert alertWithMessageText:@"This payload does not match our checksum, if you did not modify the payload you should not proceed any further! Otherwise press continue."
|
|
|
|
|
|
|
+ NSAlert *alert = [NSAlert alertWithMessageText:@"This payload does not match our checksum, if you did not modify the payload you should click Download Again! Otherwise press continue."
|
|
|
defaultButton:@"Cancel"
|
|
defaultButton:@"Cancel"
|
|
|
alternateButton:@"Continue"
|
|
alternateButton:@"Continue"
|
|
|
otherButton:@"Download Again"
|
|
otherButton:@"Download Again"
|
|
@@ -241,7 +261,7 @@ static NSString *appleTVAddress = nil;
|
|
|
NSString *tarString = [self tarPathForCurrentMode];
|
|
NSString *tarString = [self tarPathForCurrentMode];
|
|
|
NSString *bootstrap = [NSString stringWithFormat:@"/var/mobile/Documents/%@", downloadedFile.lastPathComponent];
|
|
NSString *bootstrap = [NSString stringWithFormat:@"/var/mobile/Documents/%@", downloadedFile.lastPathComponent];
|
|
|
|
|
|
|
|
- NSString *installCommand = [NSString stringWithFormat:@"%@ fxpv %@ -C / ; /usr/libexec/substrate ; /usr/bin/uicache ; /bin/bash /usr/libexec/nito/firmware.sh ; rm /var/mobile/Library/Preferences/Featured.plist", tarString, bootstrap];
|
|
|
|
|
|
|
+ NSString *installCommand = [NSString stringWithFormat:@"%@ fxpv %@ -C / ; /usr/libexec/substrate ; /usr/bin/uicache ; /usr/bin/bash /usr/libexec/nito/firmware.sh ; rm /var/mobile/Library/Preferences/Featured.plist", tarString, bootstrap];
|
|
|
|
|
|
|
|
|
|
|
|
|
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), ^{
|
|
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), ^{
|
|
@@ -752,7 +772,7 @@ static NSString *appleTVAddress = nil;
|
|
|
{
|
|
{
|
|
|
NSLog(@"10.0 or greater");
|
|
NSLog(@"10.0 or greater");
|
|
|
self.versionState = KBInstallVersionStateTenOne;
|
|
self.versionState = KBInstallVersionStateTenOne;
|
|
|
- bootstrapPath = [bootstrapPath stringByAppendingString:@"bootstrap9.tar"];
|
|
|
|
|
|
|
+ bootstrapPath = [bootstrapPath stringByAppendingString:@"bootstrap11.tar"];
|
|
|
} else {
|
|
} else {
|
|
|
NSLog(@"9.0 or greater?");
|
|
NSLog(@"9.0 or greater?");
|
|
|
self.versionState = KBInstallVersionStateNine;
|
|
self.versionState = KBInstallVersionStateNine;
|