Browse Source

should be 1.2.2 RC

Kevin Bradley 5 years ago
parent
commit
d9bad89565

+ 1 - 1
Meridian/Meridian/build_time

@@ -1 +1 @@
-Mon, 19 Nov 2018 01:24:01 -0700
+Sun, 17 Feb 2019 13:17:45 -0700

+ 65 - 5
Meridian/Meridian/jailbreak.m

@@ -67,11 +67,56 @@ int bypassKPP() {
     return 0;
 }
 
+void tvosRepairs(ViewController *view) {
+    
+    
+    [view writeTextPlain:@"Performing bootstrap tweaks..."];
+    NSString *ti = @"/usr/lib/TweakInject";
+    NSString *dl = @"/Library/MobileSubstrate/DynamicLibraries";
+    NSString *bash = @"/bin/bash";
+    NSString *usrBash = @"/usr/bin/bash";
+    NSFileManager *man = [NSFileManager defaultManager];
+    NSError *error = nil;
+    //NSString *dlFileType = [man attributesOfItemAtPath:dl error:&error][NSFileType];
+    //NSString *tiFileType = [man attributesOfItemAtPath:ti error:&error][NSFileType];
+    BOOL tiExists = [man fileExistsAtPath:ti];
+    BOOL msExists = [man fileExistsAtPath:dl];
+    BOOL bashExists = [man fileExistsAtPath:bash];
+    //BOOL msSymbolic = [dlFileType isEqualToString:NSFileTypeSymbolicLink];
+    
+    if (!tiExists & msExists) {
+        
+        [view writeTextPlain:@"Moving %@ to %@...", dl, ti];
+        [man moveItemAtPath:dl toPath:ti error:&error];
+        execprog("/usr/bin/ln", (const char **)&(const char*[]) {
+            "/usr/bin/ln",
+            "-s",
+            [ti UTF8String],
+            [dl UTF8String],
+            NULL
+        });
+    }
+    
+    if (!bashExists){
+        
+        [view writeTextPlain:@"Fixing missing bash.."];
+        [man copyItemAtPath:usrBash toPath:bash error:&error];
+        execprog("/usr/bin/ln", (const char **)&(const char*[]) {
+            "/usr/bin/ln",
+            "-s",
+            [bash UTF8String],
+            "/bin/sh",
+            NULL
+        });
+        
+    }
+ 
+}
 
 int makeShitHappen(ViewController *view, BOOL kppless) {
     int ret;
     
-    isKppless = kppless;
+    isKppless = FALSE;
     fileMgr = [NSFileManager defaultManager];
 
     // run v0rtex
@@ -156,6 +201,7 @@ int makeShitHappen(ViewController *view, BOOL kppless) {
         unlink("/Library/LaunchDaemons/._dropbear.plist");
     }
    
+    /*
     
     
     if (file_exists("/meridian/.bootstrap") == 0) {
@@ -163,7 +209,7 @@ int makeShitHappen(ViewController *view, BOOL kppless) {
         unlink("/meridian/.bootstrap");
         
     }
-    
+    */
    /*
     
     //take these out later, just so i can update the plists as i tweak the payload
@@ -336,7 +382,7 @@ int makeShitHappen(ViewController *view, BOOL kppless) {
             return 1;
         }
         
-        
+        tvosRepairs(view);
         
         [view writeText:@"done!"];
     }
@@ -344,6 +390,9 @@ int makeShitHappen(ViewController *view, BOOL kppless) {
     //unlink("/usr/lib/libjailbreak.dylib");
     //cp("/usr/lib/libjailbreak.dylib","/electra/libjailbreak.dylib");
     
+    //check to make sure /usr/lib/TweakInject exists and /Library/MobileSubstrate/DynamicLibraries is a symbolic link there
+    
+    
     /*
     // add the midnight repo 
     if (file_exists("/etc/apt/sources.list.d/meridian.list") != 0) {
@@ -375,7 +424,7 @@ int makeShitHappen(ViewController *view, BOOL kppless) {
         [view writeTextPlain:@"exit code: %d", ret];
         return 1;
     }
-     */
+    */
     
     //launch openssh
     
@@ -466,6 +515,14 @@ void fixPerms() {
         NULL
     });
     
+    rv = execprog("/usr/bin/chown", (const char **)&(const char*[]) {
+        "/usr/bin/chown",
+        "-R",
+        "root:wheel",
+        "/private/etc",
+        NULL
+    });
+    
     
 }
 
@@ -750,7 +807,10 @@ int defecateAmfi() {
 }
 
 int launchDropbear() {
-    return start_launchdaemon("/Library/LaunchDaemons/dropbear.plist");
+    chmod("/meridian/dropbear/dropbear.plist", 0600);
+    chown("/meridian/dropbear/dropbear.plist", 0, 0);
+    chmod("/etc/dropbear", 0700);
+    return start_launchdaemon("/meridian/dropbear/dropbear.plist");
 }
 
 void setUpSubstitute() {

BIN
Meridian/amfid/bin/amfid_payload.dylib


+ 4 - 0
Meridian/meridian.xcodeproj/project.pbxproj

@@ -235,6 +235,8 @@
 		325A25A020E8952E001D1BAD /* utils.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = utils.c; sourceTree = "<group>"; };
 		325A25A120E8952E001D1BAD /* utils.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = utils.h; sourceTree = "<group>"; };
 		328CC34620EE91BE0071849C /* tar.gz */ = {isa = PBXFileReference; lastKnownFileType = archive.gzip; name = tar.gz; path = meridianTV/electra/bootstrap/tar.gz; sourceTree = "<group>"; };
+		3294A6C021A314C500DD708A /* UIDownloadBar.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = UIDownloadBar.h; path = meridianTV/UIDownloadBar.h; sourceTree = SOURCE_ROOT; };
+		3294A6C121A314C500DD708A /* UIDownloadBar.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = UIDownloadBar.m; path = meridianTV/UIDownloadBar.m; sourceTree = SOURCE_ROOT; };
 		32A431A421018C2200DC223C /* nonce.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = nonce.c; sourceTree = "<group>"; };
 		32A431A521018C2200DC223C /* nonce.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = nonce.h; sourceTree = "<group>"; };
 		32A431A721018C8900DC223C /* debug.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = debug.h; sourceTree = "<group>"; };
@@ -403,6 +405,8 @@
 		325263A120E0B2C4003BD42A /* PureLayout */ = {
 			isa = PBXGroup;
 			children = (
+				3294A6C021A314C500DD708A /* UIDownloadBar.h */,
+				3294A6C121A314C500DD708A /* UIDownloadBar.m */,
 				32517C1D21A28F11008515BB /* Reachability */,
 				325263A220E0B2C4003BD42A /* ALView+PureLayout.h */,
 				325263A320E0B2C4003BD42A /* ALView+PureLayout.m */,

BIN
Meridian/meridian.xcodeproj/project.xcworkspace/xcuserdata/kevinbradley.xcuserdatad/UserInterfaceState.xcuserstate


+ 2 - 2
Meridian/meridian.xcodeproj/xcuserdata/kevinbradley.xcuserdatad/xcschemes/xcschememanagement.plist

@@ -12,7 +12,7 @@
 		<key>amfid.xcscheme</key>
 		<dict>
 			<key>orderHint</key>
-			<integer>2</integer>
+			<integer>1</integer>
 		</dict>
 		<key>jailbreakd.xcscheme</key>
 		<dict>
@@ -27,7 +27,7 @@
 		<key>pspawn_hook.xcscheme</key>
 		<dict>
 			<key>orderHint</key>
-			<integer>1</integer>
+			<integer>2</integer>
 		</dict>
 	</dict>
 </dict>

+ 1 - 1
Meridian/meridianTV/Info.plist

@@ -17,7 +17,7 @@
 	<key>CFBundlePackageType</key>
 	<string>APPL</string>
 	<key>CFBundleShortVersionString</key>
-	<string>1.2.1</string>
+	<string>1.2.2</string>
 	<key>CFBundleVersion</key>
 	<string>1</string>
 	<key>LSRequiresIPhoneOS</key>

+ 15 - 3
Meridian/meridianTV/ViewController.m

@@ -57,7 +57,7 @@ typedef NS_ENUM(NSInteger, BSInstallType) {
 @property (strong, nonatomic) UILabel *versionLabel;
 @end
 
-NSString *Version = @"backr00m: 1.2.1";
+NSString *Version = @"backr00m: 1.2.2";
 NSOperatingSystemVersion osVersion;
 
 id thisClass;
@@ -501,7 +501,7 @@ bool jailbreak_has_run = false;
     
     [self writeTextPlain:[NSString stringWithFormat:@"> %@", Version]];
     
-    [self writeTextPlain:@"> Includes software / explots by Ian Beer, CoolStar, Jaywalker, nitoTV, nullpixel, PsychoTea, pwn20wnd, Siguza, stek29 and tihmstar" ];
+    [self writeTextPlain:@"> Includes software / explots by Ian Beer, CoolStar, Jaywalker, nitoTV, nullpixel, PsychoTea, pwn20wnd, Siguza, stek29 and xerub" ];
     
     if (self.installMode == BSInstallTypeUnsupported) {
         
@@ -747,13 +747,25 @@ bool jailbreak_has_run = false;
         NULL
     });
     
+    execprog("/usr/sbin/sshd", (const char **)&(const char *[]) {
+        NULL
+    });
+    
+    
+    
+    
     execprog("/usr/bin/ls", (const char **)&(const char *[]) {
         "/usr/bin/ls",
         "-alR",
-        "/usr",
+        "/private",
         NULL
     });
     
+    execprog("/bin/bash", (const char **)&(const char *[]) {
+               "/bin/bash",
+                NULL
+    });
+    
     /*
     execprog("/bin/bash", (const char **)&(const char *[]) {
         "/bin/bash",

BIN
Meridian/meridianTV/bootstrap.tar.gz


+ 5 - 5
Meridian/meridianTV/electra/the fun part/bootstrap.c

@@ -175,14 +175,14 @@ void post_bootstrap(const bool runUICache) {
     posix_spawn(&pd, "/bin/launchctl", NULL, NULL, (char **)&(const char*[]){ "launchctl", "load", "/Library/LaunchDaemons/com.openssh.sshd.plist", NULL }, NULL);
     waitpid(pd, NULL, 0);
     
-    /*
-    chmod("/Library/LaunchDaemons/dropbear.plist", 0600);
-    chown("/Library/LaunchDaemons/dropbear.plist", 0, 0);
+    
+    chmod("/meridian/dropbear/dropbear.plist", 0600);
+    chown("/meridian/dropbear/dropbear.plist", 0, 0);
     chmod("/etc/dropbear", 0700);
     //chmod 700 /etc/dropbear
-    posix_spawn(&pd, "/bin/launchctl", NULL, NULL, (char **)&(const char*[]){ "launchctl", "load", "/Library/LaunchDaemons/dropbear.plist", NULL }, NULL);
+    posix_spawn(&pd, "/bin/launchctl", NULL, NULL, (char **)&(const char*[]){ "launchctl", "load", "/meridian/dropbear/dropbear.plist", NULL }, NULL);
     waitpid(pd, NULL, 0);
-    */
+    
     //we wont have his lists... on the meridian side in 'needed' to install nitoTV like this, but dont need to here
     //maybe the dpkg after step is no longer necessary.
    

BIN
Meridian/meridianTV/meridian-bootstrap.tar