Browse Source

updated icon, lots of bug fixes, too many to remember or track

Kevin Bradley 6 years ago
parent
commit
8197c44705
24 changed files with 74 additions and 167 deletions
  1. 6 0
      g0blin.xcodeproj/project.pbxproj
  2. 1 0
      g0blin/ViewController.m
  3. 0 6
      g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Contents.json
  4. 0 17
      g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Contents.json
  5. 0 16
      g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/Contents.json
  6. 0 6
      g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Contents.json
  7. 0 6
      g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Contents.json
  8. 1 0
      g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/Contents.json
  9. BIN
      g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/back.png
  10. 1 0
      g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json
  11. BIN
      g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/g0blin@2x.png
  12. 0 16
      g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/Contents.json
  13. 0 6
      g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Contents.json
  14. 0 17
      g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Contents.json
  15. 0 16
      g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/Contents.json
  16. 0 6
      g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Contents.json
  17. 0 20
      g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/g0blin.imageset/Contents.json
  18. 0 16
      g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json
  19. 0 6
      g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Contents.json
  20. 3 3
      g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json
  21. 9 2
      g0blinTV/NewV0rtex/v0rtex2.m
  22. 52 7
      g0blinTV/ViewController.m
  23. 1 1
      g0blinTV/bootstrap.m
  24. BIN
      g0blinTV/bootstrap.tar

+ 6 - 0
g0blin.xcodeproj/project.pbxproj

@@ -579,12 +579,15 @@
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				CODE_SIGN_IDENTITY = "iPhone Developer: Kevin Bradley (GR994726NJ)";
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Kevin Bradley (GR994726NJ)";
 				CODE_SIGN_STYLE = Automatic;
 				DEVELOPMENT_TEAM = 23C653WLNB;
 				INFOPLIST_FILE = g0blin/Info.plist;
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
 				PRODUCT_BUNDLE_IDENTIFIER = com.sticktron.g0blin;
 				PRODUCT_NAME = "$(TARGET_NAME)";
+				PROVISIONING_PROFILE = "1227de24-9d8e-4833-a884-702d46dfde34";
 				TARGETED_DEVICE_FAMILY = "1,2";
 			};
 			name = Debug;
@@ -593,12 +596,15 @@
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				CODE_SIGN_IDENTITY = "iPhone Distribution: Likey, LLC (DRS5893MPG)";
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: Likey, LLC (DRS5893MPG)";
 				CODE_SIGN_STYLE = Automatic;
 				DEVELOPMENT_TEAM = 23C653WLNB;
 				INFOPLIST_FILE = g0blin/Info.plist;
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
 				PRODUCT_BUNDLE_IDENTIFIER = com.sticktron.g0blin;
 				PRODUCT_NAME = "$(TARGET_NAME)";
+				PROVISIONING_PROFILE = "e7c737ba-075c-49d3-a68a-5a184b6d2fee";
 				TARGETED_DEVICE_FAMILY = "1,2";
 			};
 			name = Release;

+ 1 - 0
g0blin/ViewController.m

@@ -121,6 +121,7 @@ AVPlayerViewController *cont;
         [self.goButton setTitle:@"try again" forState:UIControlStateNormal];
         
         [self log:@"ERROR: exploit failed \n"];
+        
         return;
     }
     LOG("v0rtex was successful");

+ 0 - 6
g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Contents.json

@@ -1,6 +0,0 @@
-{
-  "info" : {
-    "version" : 1,
-    "author" : "xcode"
-  }
-}

+ 0 - 17
g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Contents.json

@@ -1,17 +0,0 @@
-{
-  "layers" : [
-    {
-      "filename" : "Front.imagestacklayer"
-    },
-    {
-      "filename" : "Middle.imagestacklayer"
-    },
-    {
-      "filename" : "Back.imagestacklayer"
-    }
-  ],
-  "info" : {
-    "version" : 1,
-    "author" : "xcode"
-  }
-}

+ 0 - 16
g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/Contents.json

@@ -1,16 +0,0 @@
-{
-  "images" : [
-    {
-      "idiom" : "tv",
-      "scale" : "1x"
-    },
-    {
-      "idiom" : "tv",
-      "scale" : "2x"
-    }
-  ],
-  "info" : {
-    "version" : 1,
-    "author" : "xcode"
-  }
-}

+ 0 - 6
g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Contents.json

@@ -1,6 +0,0 @@
-{
-  "info" : {
-    "version" : 1,
-    "author" : "xcode"
-  }
-}

+ 0 - 6
g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Contents.json

@@ -1,6 +0,0 @@
-{
-  "info" : {
-    "version" : 1,
-    "author" : "xcode"
-  }
-}

+ 1 - 0
g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/Contents.json

@@ -2,6 +2,7 @@
   "images" : [
     {
       "idiom" : "tv",
+      "filename" : "back.png",
       "scale" : "1x"
     },
     {

BIN
g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/back.png


+ 1 - 0
g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json

@@ -2,6 +2,7 @@
   "images" : [
     {
       "idiom" : "tv",
+      "filename" : "g0blin@2x.png",
       "scale" : "1x"
     },
     {

BIN
g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/g0blin@2x.png


+ 0 - 16
g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/Contents.json

@@ -1,16 +0,0 @@
-{
-  "images" : [
-    {
-      "idiom" : "tv",
-      "scale" : "1x"
-    },
-    {
-      "idiom" : "tv",
-      "scale" : "2x"
-    }
-  ],
-  "info" : {
-    "version" : 1,
-    "author" : "xcode"
-  }
-}

+ 0 - 6
g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Contents.json

@@ -1,6 +0,0 @@
-{
-  "info" : {
-    "version" : 1,
-    "author" : "xcode"
-  }
-}

+ 0 - 17
g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Contents.json

@@ -1,17 +0,0 @@
-{
-  "layers" : [
-    {
-      "filename" : "Front.imagestacklayer"
-    },
-    {
-      "filename" : "Middle.imagestacklayer"
-    },
-    {
-      "filename" : "Back.imagestacklayer"
-    }
-  ],
-  "info" : {
-    "version" : 1,
-    "author" : "xcode"
-  }
-}

+ 0 - 16
g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/Contents.json

@@ -1,16 +0,0 @@
-{
-  "images" : [
-    {
-      "idiom" : "tv",
-      "scale" : "1x"
-    },
-    {
-      "idiom" : "tv",
-      "scale" : "2x"
-    }
-  ],
-  "info" : {
-    "version" : 1,
-    "author" : "xcode"
-  }
-}

+ 0 - 6
g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Contents.json

@@ -1,6 +0,0 @@
-{
-  "info" : {
-    "version" : 1,
-    "author" : "xcode"
-  }
-}

+ 0 - 20
g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/g0blin.imageset/Contents.json

@@ -1,20 +0,0 @@
-{
-  "images" : [
-    {
-      "idiom" : "universal",
-      "scale" : "1x"
-    },
-    {
-      "idiom" : "universal",
-      "scale" : "2x"
-    },
-    {
-      "idiom" : "universal",
-      "scale" : "3x"
-    }
-  ],
-  "info" : {
-    "version" : 1,
-    "author" : "xcode"
-  }
-}

+ 0 - 16
g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json

@@ -1,16 +0,0 @@
-{
-  "images" : [
-    {
-      "idiom" : "tv",
-      "scale" : "1x"
-    },
-    {
-      "idiom" : "tv",
-      "scale" : "2x"
-    }
-  ],
-  "info" : {
-    "version" : 1,
-    "author" : "xcode"
-  }
-}

+ 0 - 6
g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Contents.json

@@ -1,6 +0,0 @@
-{
-  "info" : {
-    "version" : 1,
-    "author" : "xcode"
-  }
-}

+ 3 - 3
g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json

@@ -3,13 +3,13 @@
     {
       "size" : "1280x768",
       "idiom" : "tv",
-      "filename" : "App Icon - App Store.imagestack",
+      "filename" : "App Icon - Large.imagestack",
       "role" : "primary-app-icon"
     },
     {
       "size" : "400x240",
       "idiom" : "tv",
-      "filename" : "App Icon.imagestack",
+      "filename" : "App Icon - Small.imagestack",
       "role" : "primary-app-icon"
     },
     {
@@ -29,4 +29,4 @@
     "version" : 1,
     "author" : "xcode"
   }
-}
+}

+ 9 - 2
g0blinTV/NewV0rtex/v0rtex2.m

@@ -770,7 +770,7 @@ kern_return_t v0rtex(offsets_t *off, task_t *tfp0, kptr_t *kslide, kptr_t *kernu
     IOConnectCallAsyncStructMethod(client, 17, port, &ref, 1, in, sizeof(in), NULL, NULL);
 
     LOG("herp derp");
-    usleep(100000);
+    usleep(300000);
 
     sched_yield();
     ret = mach_ports_register(self, &client, 1); // gonna use that later
@@ -779,7 +779,8 @@ kern_return_t v0rtex(offsets_t *off, task_t *tfp0, kptr_t *kslide, kptr_t *kernu
     {
         goto out;
     }
-
+    LOG("herp derp mcgerp");
+    usleep(300000);
     // Prevent cleanup
     fakeport = port;
     port = MACH_PORT_NULL;
@@ -795,6 +796,9 @@ kern_return_t v0rtex(offsets_t *off, task_t *tfp0, kptr_t *kslide, kptr_t *kernu
         goto out;
     }
 
+    LOG("herp derp bajerp");
+    usleep(300000);
+    
     for(uint32_t i = 0; i < NUM_DATA; ++i)
     {
         dict[DATA_SIZE / sizeof(uint32_t) + 6] = transpose(i);
@@ -877,8 +881,11 @@ kern_return_t v0rtex(offsets_t *off, task_t *tfp0, kptr_t *kslide, kptr_t *kernu
         goto out;
     }
 
+    LOG("herp derp fasherp");
+    usleep(300000);
     // Register realport on fakeport
     mach_port_t notify = MACH_PORT_NULL;
+    //XXX: dies here a lot
     ret = mach_port_request_notification(self, fakeport, MACH_NOTIFY_PORT_DESTROYED, 0, realport, MACH_MSG_TYPE_MAKE_SEND_ONCE, &notify);
     LOG("mach_port_request_notification(realport): %x, %s", notify, mach_error_string(ret));
     if(ret != KERN_SUCCESS)

+ 52 - 7
g0blinTV/ViewController.m

@@ -75,6 +75,7 @@
 @interface ViewController ()
 {
     BOOL _force;
+    BOOL _disabled;
 }
 @property (weak, nonatomic) IBOutlet UIImageView *logoView;
 @property (weak, nonatomic) IBOutlet FocusedButton *goButton;
@@ -118,12 +119,15 @@ AVPlayerViewController *cont;
     struct utsname u;
     uname(&u);
     [self log:[NSString stringWithFormat:@"%s \n", u.version]];
-    
+    _disabled = NO;
     // abort if already jailbroken
     if (strstr(u.version, "MarijuanARM")) {
-        self.goButton.enabled = NO;
-        self.goButton.backgroundColor = UIColor.darkGrayColor;
+        //self.goButton.enabled = NO;
+        _disabled = YES;
+        //self.goButton.backgroundColor = UIColor.darkGrayColor;
         [self.goButton setTitle:@"jailbroke yo!" forState:UIControlStateDisabled];
+        [self.goButton buttonColors:UIColor.darkGrayColor
+                       andUnfocused:[UIColor whiteColor]];
     }
     
     // try to load offsets for device
@@ -171,7 +175,12 @@ AVPlayerViewController *cont;
 
 - (IBAction)go:(UIButton *)sender {
     
-    
+    if (_disabled) {
+        
+        LOG("Already jailbroken bro!");
+        
+        return;
+    }
     dispatch_async(dispatch_get_main_queue(), ^{
         
         [self.consoleView.layoutManager ensureLayoutForTextContainer:self.consoleView.textContainer];
@@ -200,6 +209,7 @@ AVPlayerViewController *cont;
                 [self.goButton setTitle:@"try again" forState:UIControlStateNormal];
                 
                 [self log:@"ERROR: exploit failed \n"];
+                [self kludgeBoot];
                 return;
             }
             LOG("v0rtex was successful");
@@ -248,6 +258,17 @@ AVPlayerViewController *cont;
     
 }
 
+//we know retrying with reboot, and if we detect faiure wait a few seconds and try again to force a reboot
+- (void)kludgeBoot
+{
+    LOG("== Auto retrying in 3 seconds to trigger reboot ==");
+    [self log:@"== Auto retrying in 3 seconds to trigger reboot =="];
+    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 3 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
+       
+        [self go:nil];
+    });
+}
+
 - (void)bootstrap {
     [self log:@"bootstrapping"];
     
@@ -264,16 +285,40 @@ AVPlayerViewController *cont;
     }
 }
 
++ (NSString *)returnForProcess:(NSString *)call
+{
+    if (call==nil)
+        return 0;
+    char line[200];
+    NSLog(@"running process: %@", call);
+    FILE* fp = popen([call UTF8String], "r");
+    NSMutableArray *lines = [[NSMutableArray alloc]init];
+    if (fp)
+    {
+        while (fgets(line, sizeof line, fp))
+        {
+            NSString *s = [NSString stringWithCString:line encoding:NSUTF8StringEncoding];
+            s = [s stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
+            [lines addObject:s];
+        }
+    }
+    pclose(fp);
+    return [lines componentsJoinedByString:@"\n"];
+}
+
 - (void)finish {
+    
+    NSString *hostname = [ViewController returnForProcess:@"/bin/hostname"];
+    
     [self log:@"device is now jailbroken!"];
     [self log:@""];
-    [self log:@"SSH server is ready on port 2222"];
+    [self log:[NSString stringWithFormat:@"SSH server is ready at %@.local", hostname]];
     [self log:@"change your root/mobile passwords"];
     [self log:@""];
     [self log:@"respring to load tweaks"];
     
     sleep(2);
-    
+    RunCmd("/usr/libexec/substrate");
     LOG("reloading daemons...");
     pid_t pid;
     posix_spawn(&pid, "/bin/launchctl", 0, 0, (char**)&(const char*[]){"/bin/launchctl", "load", "/Library/LaunchDaemons/0.reload.plist", NULL}, NULL);
@@ -288,7 +333,7 @@ AVPlayerViewController *cont;
 
 - (void)restart {
     
-    RunCmd("/usr/libexec/substrate");
+    
     LOG("Running uicache...");
     
     //pid_t pd;

+ 1 - 1
g0blinTV/bootstrap.m

@@ -105,7 +105,7 @@ kern_return_t do_bootstrap(bool force) {
         
         // run nito install scripts
         {
-            char *name = "/var/lib/dpkg/info/mobilesubstrate.extrainst_";
+            char *name = "/var/lib/dpkg/info/mobilesubstrate.postinst";
             RunCmd(name);
             RunCmd("/usr/libexec/substrate");
             RunCmd("/usr/libexec/nito/firmware.sh");

BIN
g0blinTV/bootstrap.tar