Просмотр исходного кода

new bootstrap.tgz with manually entitled Cydia

Sticktron лет назад: 8
Родитель
Сommit
eb903a7dff
4 измененных файлов с 34 добавлено и 18 удалено
  1. 4 4
      g0blin.xcodeproj/project.pbxproj
  2. 30 14
      g0blin/bootstrap.m
  3. BIN
      g0blin/bootstrap.tar
  4. BIN
      g0blin/bootstrap.tgz

+ 4 - 4
g0blin.xcodeproj/project.pbxproj

@@ -7,6 +7,7 @@
 	objects = {
 	objects = {
 
 
 /* Begin PBXBuildFile section */
 /* Begin PBXBuildFile section */
+		EE59F3C31FF81C1E006BCFE1 /* bootstrap.tgz in Resources */ = {isa = PBXBuildFile; fileRef = EE59F3C21FF81C1E006BCFE1 /* bootstrap.tgz */; };
 		EE9402401FF33CAE00C9325F /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = EE94023F1FF33CAE00C9325F /* AppDelegate.m */; };
 		EE9402401FF33CAE00C9325F /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = EE94023F1FF33CAE00C9325F /* AppDelegate.m */; };
 		EE9402431FF33CAE00C9325F /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = EE9402421FF33CAE00C9325F /* ViewController.m */; };
 		EE9402431FF33CAE00C9325F /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = EE9402421FF33CAE00C9325F /* ViewController.m */; };
 		EE9402461FF33CAE00C9325F /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = EE9402441FF33CAE00C9325F /* Main.storyboard */; };
 		EE9402461FF33CAE00C9325F /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = EE9402441FF33CAE00C9325F /* Main.storyboard */; };
@@ -25,11 +26,11 @@
 		EE9828C91FF418800085B633 /* 0.reload.plist in Resources */ = {isa = PBXBuildFile; fileRef = EE9828C51FF4187F0085B633 /* 0.reload.plist */; };
 		EE9828C91FF418800085B633 /* 0.reload.plist in Resources */ = {isa = PBXBuildFile; fileRef = EE9828C51FF4187F0085B633 /* 0.reload.plist */; };
 		EE9828CA1FF418800085B633 /* launchctl in Resources */ = {isa = PBXBuildFile; fileRef = EE9828C61FF4187F0085B633 /* launchctl */; };
 		EE9828CA1FF418800085B633 /* launchctl in Resources */ = {isa = PBXBuildFile; fileRef = EE9828C61FF4187F0085B633 /* launchctl */; };
 		EE9828CB1FF418800085B633 /* reload in Resources */ = {isa = PBXBuildFile; fileRef = EE9828C71FF4187F0085B633 /* reload */; };
 		EE9828CB1FF418800085B633 /* reload in Resources */ = {isa = PBXBuildFile; fileRef = EE9828C71FF4187F0085B633 /* reload */; };
-		EEE1C50F1FF5B42800A77E2C /* bootstrap.tar in Resources */ = {isa = PBXBuildFile; fileRef = EEE1C50E1FF5B42800A77E2C /* bootstrap.tar */; };
 		EEF6994B1FF68F6A00932DB7 /* dropbear.plist in Resources */ = {isa = PBXBuildFile; fileRef = EEE1C5101FF5D3FE00A77E2C /* dropbear.plist */; };
 		EEF6994B1FF68F6A00932DB7 /* dropbear.plist in Resources */ = {isa = PBXBuildFile; fileRef = EEE1C5101FF5D3FE00A77E2C /* dropbear.plist */; };
 /* End PBXBuildFile section */
 /* End PBXBuildFile section */
 
 
 /* Begin PBXFileReference section */
 /* Begin PBXFileReference section */
+		EE59F3C21FF81C1E006BCFE1 /* bootstrap.tgz */ = {isa = PBXFileReference; lastKnownFileType = file; path = bootstrap.tgz; sourceTree = "<group>"; };
 		EE94023B1FF33CAE00C9325F /* g0blin.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = g0blin.app; sourceTree = BUILT_PRODUCTS_DIR; };
 		EE94023B1FF33CAE00C9325F /* g0blin.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = g0blin.app; sourceTree = BUILT_PRODUCTS_DIR; };
 		EE94023E1FF33CAE00C9325F /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
 		EE94023E1FF33CAE00C9325F /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
 		EE94023F1FF33CAE00C9325F /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
 		EE94023F1FF33CAE00C9325F /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
@@ -61,7 +62,6 @@
 		EE9828C51FF4187F0085B633 /* 0.reload.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = 0.reload.plist; sourceTree = "<group>"; };
 		EE9828C51FF4187F0085B633 /* 0.reload.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = 0.reload.plist; sourceTree = "<group>"; };
 		EE9828C61FF4187F0085B633 /* launchctl */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = launchctl; sourceTree = "<group>"; };
 		EE9828C61FF4187F0085B633 /* launchctl */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = launchctl; sourceTree = "<group>"; };
 		EE9828C71FF4187F0085B633 /* reload */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = reload; sourceTree = "<group>"; };
 		EE9828C71FF4187F0085B633 /* reload */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = reload; sourceTree = "<group>"; };
-		EEE1C50E1FF5B42800A77E2C /* bootstrap.tar */ = {isa = PBXFileReference; lastKnownFileType = archive.tar; path = bootstrap.tar; sourceTree = "<group>"; };
 		EEE1C5101FF5D3FE00A77E2C /* dropbear.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = dropbear.plist; sourceTree = "<group>"; };
 		EEE1C5101FF5D3FE00A77E2C /* dropbear.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = dropbear.plist; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 /* End PBXFileReference section */
 
 
@@ -138,8 +138,8 @@
 		EE9828CC1FF4188B0085B633 /* payload */ = {
 		EE9828CC1FF4188B0085B633 /* payload */ = {
 			isa = PBXGroup;
 			isa = PBXGroup;
 			children = (
 			children = (
+				EE59F3C21FF81C1E006BCFE1 /* bootstrap.tgz */,
 				EE9828C41FF4187F0085B633 /* tar */,
 				EE9828C41FF4187F0085B633 /* tar */,
-				EEE1C50E1FF5B42800A77E2C /* bootstrap.tar */,
 				EE9828C61FF4187F0085B633 /* launchctl */,
 				EE9828C61FF4187F0085B633 /* launchctl */,
 				EE9828C71FF4187F0085B633 /* reload */,
 				EE9828C71FF4187F0085B633 /* reload */,
 				EE9828C51FF4187F0085B633 /* 0.reload.plist */,
 				EE9828C51FF4187F0085B633 /* 0.reload.plist */,
@@ -207,13 +207,13 @@
 			buildActionMask = 2147483647;
 			buildActionMask = 2147483647;
 			files = (
 			files = (
 				EEF6994B1FF68F6A00932DB7 /* dropbear.plist in Resources */,
 				EEF6994B1FF68F6A00932DB7 /* dropbear.plist in Resources */,
-				EEE1C50F1FF5B42800A77E2C /* bootstrap.tar in Resources */,
 				EE9828C81FF418800085B633 /* tar in Resources */,
 				EE9828C81FF418800085B633 /* tar in Resources */,
 				EE9828C91FF418800085B633 /* 0.reload.plist in Resources */,
 				EE9828C91FF418800085B633 /* 0.reload.plist in Resources */,
 				EE9828CA1FF418800085B633 /* launchctl in Resources */,
 				EE9828CA1FF418800085B633 /* launchctl in Resources */,
 				EE9828CB1FF418800085B633 /* reload in Resources */,
 				EE9828CB1FF418800085B633 /* reload in Resources */,
 				EE94024B1FF33CAE00C9325F /* LaunchScreen.storyboard in Resources */,
 				EE94024B1FF33CAE00C9325F /* LaunchScreen.storyboard in Resources */,
 				EE9402481FF33CAE00C9325F /* Assets.xcassets in Resources */,
 				EE9402481FF33CAE00C9325F /* Assets.xcassets in Resources */,
+				EE59F3C31FF81C1E006BCFE1 /* bootstrap.tgz in Resources */,
 				EE9402461FF33CAE00C9325F /* Main.storyboard in Resources */,
 				EE9402461FF33CAE00C9325F /* Main.storyboard in Resources */,
 			);
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			runOnlyForDeploymentPostprocessing = 0;

+ 30 - 14
g0blin/bootstrap.m

@@ -28,7 +28,7 @@ kern_return_t do_bootstrap() {
     if (f == f) { // ALWAYS INSTALL THE BOOTSTRAP FOR NOW.....
     if (f == f) { // ALWAYS INSTALL THE BOOTSTRAP FOR NOW.....
         LOG("bootstrap not yet installed");
         LOG("bootstrap not yet installed");
         
         
-        NSString* bootstrap = [execpath stringByAppendingPathComponent:@"bootstrap.tar"];
+        NSString* bootstrap = [execpath stringByAppendingPathComponent:@"bootstrap.tgz"];
         NSString* tar = [execpath stringByAppendingPathComponent:@"tar"];
         NSString* tar = [execpath stringByAppendingPathComponent:@"tar"];
         NSString* launchctl = [execpath stringByAppendingPathComponent:@"launchctl"];
         NSString* launchctl = [execpath stringByAppendingPathComponent:@"launchctl"];
         
         
@@ -54,6 +54,28 @@ kern_return_t do_bootstrap() {
         // disable Cydia filesystem stashing
         // disable Cydia filesystem stashing
         open("/.cydia_no_stash", O_RDWR|O_CREAT);
         open("/.cydia_no_stash", O_RDWR|O_CREAT);
         
         
+        
+        // do Cydia post installation ...
+        
+        LOG("running Cydia extrainst_ scripts");
+        
+        char *name = "/var/lib/dpkg/info/base.extrainst_";
+        posix_spawn(&pd, name, 0, 0, (char**)&(const char*[]){name, NULL}, NULL);
+        waitpid(pd, 0, 0);
+        
+        name = "/var/lib/dpkg/info/com.saurik.patcyh.extrainst_";
+        posix_spawn(&pd, name, 0, 0, (char**)&(const char*[]){name, NULL}, NULL);
+        waitpid(pd, 0, 0);
+        
+        name = "/var/lib/dpkg/info/firmware-sbin.extrainst_";
+        posix_spawn(&pd, name, 0, 0, (char**)&(const char*[]){name, NULL}, NULL);
+        waitpid(pd, 0, 0);
+        
+        name = "/var/lib/dpkg/info/uikittools.extrainst_";
+        posix_spawn(&pd, name, 0, 0, (char**)&(const char*[]){name, NULL}, NULL);
+        waitpid(pd, 0, 0);
+        
+        
         // block some Apple IPs
         // block some Apple IPs
         posix_spawn(&pd, "/bin/bash", 0, 0, (char**)&(const char*[]){"/bin/bash", "-c", """echo '127.0.0.1 iphonesubmissions.apple.com' >> /etc/hosts""", NULL}, NULL);
         posix_spawn(&pd, "/bin/bash", 0, 0, (char**)&(const char*[]){"/bin/bash", "-c", """echo '127.0.0.1 iphonesubmissions.apple.com' >> /etc/hosts""", NULL}, NULL);
         posix_spawn(&pd, "/bin/bash", 0, 0, (char**)&(const char*[]){"/bin/bash", "-c", """echo '127.0.0.1 radarsubmissions.apple.com' >> /etc/hosts""", NULL}, NULL);
         posix_spawn(&pd, "/bin/bash", 0, 0, (char**)&(const char*[]){"/bin/bash", "-c", """echo '127.0.0.1 radarsubmissions.apple.com' >> /etc/hosts""", NULL}, NULL);
@@ -61,18 +83,19 @@ kern_return_t do_bootstrap() {
         posix_spawn(&pd, "/bin/bash", 0, 0, (char**)&(const char*[]){"/bin/bash", "-c", """echo '127.0.0.1 appldnld.apple.com' >> /etc/hosts""", NULL}, NULL);
         posix_spawn(&pd, "/bin/bash", 0, 0, (char**)&(const char*[]){"/bin/bash", "-c", """echo '127.0.0.1 appldnld.apple.com' >> /etc/hosts""", NULL}, NULL);
         LOG("modified hosts file");
         LOG("modified hosts file");
         
         
-        // update icons
-        LOG("running uicache");
-        posix_spawn(&pd, "/usr/bin/uicache", 0, 0, (char**)&(const char*[]){"/usr/bin/uicache", NULL}, NULL);
-        
-        // set SBShowNonDefaultSystemApps
+        // set SBShowNonDefaultSystemApps = YES
         posix_spawn(&pd, "killall", 0, 0, (char**)&(const char*[]){"killall", "-SIGSTOP", "cfprefsd", NULL}, NULL);
         posix_spawn(&pd, "killall", 0, 0, (char**)&(const char*[]){"killall", "-SIGSTOP", "cfprefsd", NULL}, NULL);
         NSMutableDictionary *plist = [[NSMutableDictionary alloc] initWithContentsOfFile:@"/var/mobile/Library/Preferences/com.apple.springboard.plist"];
         NSMutableDictionary *plist = [[NSMutableDictionary alloc] initWithContentsOfFile:@"/var/mobile/Library/Preferences/com.apple.springboard.plist"];
         [plist setObject:[NSNumber numberWithBool:YES] forKey:@"SBShowNonDefaultSystemApps"];
         [plist setObject:[NSNumber numberWithBool:YES] forKey:@"SBShowNonDefaultSystemApps"];
         [plist writeToFile:@"/var/mobile/Library/Preferences/com.apple.springboard.plist" atomically:YES];
         [plist writeToFile:@"/var/mobile/Library/Preferences/com.apple.springboard.plist" atomically:YES];
         posix_spawn(&pd, "killall", 0, 0, (char**)&(const char*[]){"killall", "-9", "cfprefsd", NULL}, NULL);
         posix_spawn(&pd, "killall", 0, 0, (char**)&(const char*[]){"killall", "-9", "cfprefsd", NULL}, NULL);
+        
+        // update icons
+        LOG("running uicache");
+        posix_spawn(&pd, "/usr/bin/uicache", 0, 0, (char**)&(const char*[]){"/usr/bin/uicache", NULL}, NULL);
+        waitpid(pd, 0, 0);
     }
     }
-    LOG("bootstrap untarred");
+    LOG("bootstrapped!");
     
     
     
     
     // copy reload
     // copy reload
@@ -116,12 +139,5 @@ kern_return_t do_bootstrap() {
     LOG("killed OTA updater");
     LOG("killed OTA updater");
     
     
     
     
-    // reload launchdaemons
-//    LOG("reloading...");
-//    posix_spawn(&pid, "/bin/launchctl", 0, 0, (char**)&(const char*[]){"/bin/launchctl", "load", "/Library/LaunchDaemons/0.reload.plist", NULL}, NULL);
-    
-//    sleep(2);
-    
-    
     return KERN_SUCCESS;
     return KERN_SUCCESS;
 }
 }

BIN
g0blin/bootstrap.tar


BIN
g0blin/bootstrap.tgz