Skip to content

Commit 624ee75

Browse files
committed
beta 1.2.6
1: fixed the forkfix syscall bug that caused some devices to fail to bootstrap/install packages 2: automatically fix broken roothidepatch files caused by old versions of Bootstrap 3: fixed an issue that could cause the Bootstrap app to crash during bootstrapping
1 parent 56cbfdb commit 624ee75

File tree

17 files changed

+149
-32
lines changed

17 files changed

+149
-32
lines changed

Bootstrap.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@
571571
"$(inherited)",
572572
"@executable_path/Frameworks",
573573
);
574-
MARKETING_VERSION = 1.2.5;
574+
MARKETING_VERSION = 1.2.6;
575575
OTHER_LDFLAGS = "";
576576
PRODUCT_BUNDLE_IDENTIFIER = com.roothide.Bootstrap;
577577
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -609,7 +609,7 @@
609609
"$(inherited)",
610610
"@executable_path/Frameworks",
611611
);
612-
MARKETING_VERSION = 1.2.5;
612+
MARKETING_VERSION = 1.2.6;
613613
OTHER_LDFLAGS = "";
614614
PRODUCT_BUNDLE_IDENTIFIER = com.roothide.Bootstrap;
615615
PRODUCT_NAME = "$(TARGET_NAME)";
Binary file not shown.

Bootstrap/ViewController.m

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,16 @@ BOOL checkServer()
9797
return ret;
9898
}
9999

100+
101+
#define PROC_PIDPATHINFO_MAXSIZE (1024)
102+
int proc_pidpath(pid_t pid, void *buffer, uint32_t buffersize);
103+
NSString* getLaunchdPath()
104+
{
105+
char pathbuf[PROC_PIDPATHINFO_MAXSIZE] = {0};
106+
ASSERT(proc_pidpath(1, pathbuf, sizeof(pathbuf)) > 0);
107+
return @(pathbuf);
108+
}
109+
100110
void initFromSwiftUI()
101111
{
102112
BOOL IconCacheRebuilding=NO;
@@ -410,11 +420,25 @@ void bootstrapAction()
410420
[AppDelegate showMesage:Localized(@"Your device does not seem to have developer mode enabled.\n\nPlease enable developer mode and reboot your device.") title:Localized(@"Error")];
411421
return;
412422
}
423+
424+
NSString* launchdpath = getLaunchdPath();
425+
if(![launchdpath isEqualToString:@"/sbin/launchd"] && ![launchdpath hasPrefix:@"/var/containers/Bundle/Application/.jbroot-"])
426+
{
427+
UIAlertController *alert = [UIAlertController alertControllerWithTitle:Localized(@"Error") message:Localized(@"Please reboot device first.") preferredStyle:UIAlertControllerStyleAlert];
428+
429+
[alert addAction:[UIAlertAction actionWithTitle:Localized(@"Cancel") style:UIAlertActionStyleDefault handler:nil]];
430+
[alert addAction:[UIAlertAction actionWithTitle:Localized(@"Reboot Device") style:UIAlertActionStyleDestructive handler:^(UIAlertAction *action) {
431+
ASSERT(spawnRoot(NSBundle.mainBundle.executablePath, @[@"reboot"], nil, nil)==0);
432+
}]];
433+
434+
[AppDelegate showAlert:alert];
435+
return;
436+
}
413437

414438
UIImpactFeedbackGenerator* generator = [[UIImpactFeedbackGenerator alloc] initWithStyle:UIImpactFeedbackStyleSoft];
415439
[generator impactOccurred];
416440

417-
if(find_jbroot()) //make sure jbroot() function available
441+
if(find_jbroot(YES)) //make sure jbroot() function available
418442
{
419443
if([NSFileManager.defaultManager fileExistsAtPath:jbroot(@"/.installed_dopamine")]) {
420444
[AppDelegate showMesage:Localized(@"roothide dopamine has been installed on this device, now install this bootstrap may break it!") title:Localized(@"Error")];

Bootstrap/Views/ContentView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ struct MainView: View {
2727
@State var currentBlobs: [Color] = []
2828
@State var currentHighlights: [Color] = []
2929

30-
@AppStorage("colorScheme", store: UserDefaults.app()) var colorScheme = 0
30+
@AppStorage("colorScheme", store: UserDefaults.app()) var colorScheme = 1
3131

3232
@State private var showOptions = false
3333
@State private var showCredits = false

Bootstrap/basebin/bootstrap.dylib

-16 Bytes
Binary file not shown.

Bootstrap/basebin/bootstrapd

0 Bytes
Binary file not shown.

Bootstrap/basebin/devtest

0 Bytes
Binary file not shown.

Bootstrap/basebin/preload

0 Bytes
Binary file not shown.

Bootstrap/basebin/preload.dylib

0 Bytes
Binary file not shown.

Bootstrap/basebin/rebuildapp

-48 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)