Skip to content

Commit 9d17f70

Browse files
committed
1.3.1
- Fixed an issue where some packages could not be installed/uninstalled correctly - Fixed an issue where apps installed via dpkg were not signed correctly - Fixed an issue where apple terminal/MTerminal might not work correctly - Fixed an issue that might cause abnormal battery consumption/device overheating - Fixed an issue where a "multi jbroot" error might occur on reboot - Fixed an issue where an "updatelinks" error might occur on reboot - Fixed an issue where fastPathSign might not handle some macho signatures - Update built-in uicache - Update built-in sileo package - Update built-in strapfiles
1 parent 098bf2d commit 9d17f70

24 files changed

+117
-82
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ packages/
55
*.xcuserstate
66
/Bootstrap.xcodeproj/project.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
77
*.xcuserstate
8+
.vscode/
9+

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.3;
574+
MARKETING_VERSION = 1.3.1;
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.3;
612+
MARKETING_VERSION = 1.3.1;
613613
OTHER_LDFLAGS = "";
614614
PRODUCT_BUNDLE_IDENTIFIER = com.roothide.Bootstrap;
615615
PRODUCT_NAME = "$(TARGET_NAME)";

Bootstrap/AppDelegate.m

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -51,25 +51,22 @@ + (void)showAlert:(UIAlertController*)alert {
5151
});
5252

5353
dispatch_async(alertQueue, ^{
54-
55-
__block UIViewController* availableVC=nil;
56-
while(!availableVC) {
57-
dispatch_async(dispatch_get_main_queue(), ^{
54+
__block BOOL presenting = NO;
55+
__block BOOL presented = NO;
56+
while(!presenting) {
57+
dispatch_sync(dispatch_get_main_queue(), ^{
5858
UIViewController* vc = UIApplication.sharedApplication.keyWindow.rootViewController;
5959
while(vc.presentedViewController){
6060
vc = vc.presentedViewController;
61-
if(vc.isBeingDismissed) return;
61+
if(vc.isBeingDismissed) {
62+
return;
63+
}
6264
}
63-
availableVC = vc;
65+
presenting = YES;
66+
[vc presentViewController:alert animated:YES completion:^{ presented=YES; }];
6467
});
65-
if(!availableVC) usleep(1000*100);
68+
if(!presenting) usleep(1000*100);
6669
}
67-
68-
__block BOOL presented = NO;
69-
dispatch_async(dispatch_get_main_queue(), ^{
70-
[availableVC presentViewController:alert animated:YES completion:^{ presented=YES; }];
71-
});
72-
7370
while(!presented) usleep(100*1000);
7471
});
7572
}

Bootstrap/AppEnabler.m

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,8 @@ int enableForApp(NSString* bundlePath)
210210
}
211211
}
212212
else if([appInfo[@"CFBundleIdentifier"] hasPrefix:@"com.apple."]
213-
|| [NSFileManager.defaultManager fileExistsAtPath:[bundlePath stringByAppendingString:@"/../_TrollStore"]])
213+
|| [NSFileManager.defaultManager fileExistsAtPath:[bundlePath stringByAppendingString:@"/../_TrollStore"]]
214+
|| [NSFileManager.defaultManager fileExistsAtPath:[bundlePath stringByAppendingString:@"/../_TrollStoreLite"]])
214215
{
215216
ASSERT(backupApp(bundlePath) == 0);
216217

@@ -257,7 +258,8 @@ int disableForApp(NSString* bundlePath)
257258
ASSERT(spawnBootstrap((char*[]){"/usr/bin/uicache","-p", rootfsPrefix(sysPath).UTF8String, NULL}, nil, nil) == 0);
258259
}
259260
else if([appInfo[@"CFBundleIdentifier"] hasPrefix:@"com.apple."]
260-
|| [NSFileManager.defaultManager fileExistsAtPath:[bundlePath stringByAppendingString:@"/../_TrollStore"]])
261+
|| [NSFileManager.defaultManager fileExistsAtPath:[bundlePath stringByAppendingString:@"/../_TrollStore"]]
262+
|| [NSFileManager.defaultManager fileExistsAtPath:[bundlePath stringByAppendingString:@"/../_TrollStoreLite"]])
261263
{
262264

263265
struct stat st;

Bootstrap/AppViewController.m

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -90,35 +90,33 @@ - (void)viewDidLoad {
9090

9191
UIRefreshControl *refreshControl = [[UIRefreshControl alloc] init];
9292
refreshControl.tintColor = [UIColor grayColor];
93-
[refreshControl addTarget:self action:@selector(startRefresh) forControlEvents:UIControlEventValueChanged];
93+
[refreshControl addTarget:self action:@selector(manualRefresh) forControlEvents:UIControlEventValueChanged];
9494
self.tableView.refreshControl = refreshControl;
9595

9696
[self updateData:YES];
9797

9898
[[NSNotificationCenter defaultCenter] addObserver:self
99-
selector:@selector(startRefresh2)
99+
selector:@selector(autoRefresh)
100100
name:UIApplicationWillEnterForegroundNotification
101101
object:nil];
102102
}
103103

104-
- (void)startRefresh {
104+
- (void)startRefresh:(BOOL)resort {
105105
[self.tableView.refreshControl beginRefreshing];
106106
dispatch_async(dispatch_get_global_queue(0, 0), ^{
107-
[self updateData:YES];
107+
[self updateData:resort];
108108
dispatch_async(dispatch_get_main_queue(), ^{
109109
[self.tableView.refreshControl endRefreshing];
110110
});
111111
});
112112
}
113113

114-
- (void)startRefresh2 {
115-
[self.tableView.refreshControl beginRefreshing];
116-
dispatch_async(dispatch_get_global_queue(0, 0), ^{
117-
[self updateData:NO];
118-
dispatch_async(dispatch_get_main_queue(), ^{
119-
[self.tableView.refreshControl endRefreshing];
120-
});
121-
});
114+
- (void)manualRefresh {
115+
[self startRefresh:YES];
116+
}
117+
118+
- (void)autoRefresh {
119+
[self startRefresh:NO];
122120
}
123121

124122
- (void)viewWillAppear:(BOOL)animated {

Bootstrap/ViewController.m

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -438,25 +438,34 @@ void bootstrapAction()
438438
UIImpactFeedbackGenerator* generator = [[UIImpactFeedbackGenerator alloc] initWithStyle:UIImpactFeedbackStyleSoft];
439439
[generator impactOccurred];
440440

441-
int count=0;
442-
NSArray *subItems = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:@"/var/containers/Bundle/Application/" error:nil];
443-
for (NSString *subItem in subItems) {
444-
if (is_jbroot_name(subItem.UTF8String))
445-
count++;
441+
int installedCount=0;
442+
NSString* dirpath = @"/var/containers/Bundle/Application/";
443+
NSArray *subItems = [NSFileManager.defaultManager contentsOfDirectoryAtPath:dirpath error:nil];
444+
for (NSString *subItem in subItems)
445+
{
446+
if (!is_jbroot_name(subItem.UTF8String)) continue;
447+
448+
NSString* jbroot_path = [dirpath stringByAppendingPathComponent:subItem];
449+
450+
if([NSFileManager.defaultManager fileExistsAtPath:[jbroot_path stringByAppendingPathComponent:@"/.installed_dopamine"]]) {
451+
[AppDelegate showMesage:Localized(@"roothide dopamine has been installed on this device, now install this bootstrap may break it!") title:Localized(@"Error")];
452+
return;
453+
}
454+
455+
if([NSFileManager.defaultManager fileExistsAtPath:[jbroot_path stringByAppendingPathComponent:@"/.bootstrapped"]]
456+
|| [NSFileManager.defaultManager fileExistsAtPath:[jbroot_path stringByAppendingPathComponent:@"/.thebootstrapped"]]) {
457+
installedCount++;
458+
continue;
459+
}
446460
}
447461

448-
if(count > 1) {
462+
if(installedCount > 1) {
449463
[AppDelegate showMesage:Localized(@"There are multi jbroot in /var/containers/Bundle/Applicaton/") title:Localized(@"Error")];
450464
return;
451465
}
452466

453467
if(find_jbroot(YES)) //make sure jbroot() function available
454468
{
455-
if([NSFileManager.defaultManager fileExistsAtPath:jbroot(@"/.installed_dopamine")]) {
456-
[AppDelegate showMesage:Localized(@"roothide dopamine has been installed on this device, now install this bootstrap may break it!") title:Localized(@"Error")];
457-
return;
458-
}
459-
460469
//check beta version
461470
if([NSFileManager.defaultManager fileExistsAtPath:jbroot(@"/.bootstrapped")]) {
462471
NSString* strappedVersion = [NSString stringWithContentsOfFile:jbroot(@"/.bootstrapped") encoding:NSUTF8StringEncoding error:nil];

Bootstrap/basebin/bootstrap.dylib

512 Bytes
Binary file not shown.

Bootstrap/basebin/bootstrapd

0 Bytes
Binary file not shown.

Bootstrap/basebin/devtest

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)