diff --git a/Bootstrap/ViewController.m b/Bootstrap/ViewController.m index 1885f38e..aef6def3 100644 --- a/Bootstrap/ViewController.m +++ b/Bootstrap/ViewController.m @@ -422,7 +422,7 @@ void bootstrapAction() } NSString* launchdpath = getLaunchdPath(); - if(![launchdpath isEqualToString:@"/sbin/launchd"] && ![launchdpath hasPrefix:@"/var/containers/Bundle/Application/.jbroot-"]) + if(![launchdpath isEqualToString:@"/sbin/launchd"] && ![launchdpath hasPrefix:@"/private/var/containers/Bundle/Application/.jbroot-"]) { UIAlertController *alert = [UIAlertController alertControllerWithTitle:Localized(@"Error") message:Localized(@"Please reboot device first.") preferredStyle:UIAlertControllerStyleAlert]; @@ -438,6 +438,18 @@ void bootstrapAction() UIImpactFeedbackGenerator* generator = [[UIImpactFeedbackGenerator alloc] initWithStyle:UIImpactFeedbackStyleSoft]; [generator impactOccurred]; + int count=0; + NSArray *subItems = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:@"/var/containers/Bundle/Application/" error:nil]; + for (NSString *subItem in subItems) { + if (is_jbroot_name(subItem.UTF8String)) + count++; + } + + if(count > 1) { + [AppDelegate showMesage:Localized(@"There are multi jbroot in /var/containers/Bundle/Applicaton/") title:Localized(@"Error")]; + return; + } + if(find_jbroot(YES)) //make sure jbroot() function available { if([NSFileManager.defaultManager fileExistsAtPath:jbroot(@"/.installed_dopamine")]) { @@ -495,6 +507,22 @@ void bootstrapAction() if(gTweakEnabled && ![NSFileManager.defaultManager fileExistsAtPath:jbroot(@"/var/mobile/.tweakenabled")]) { ASSERT([[NSString new] writeToFile:jbroot(@"/var/mobile/.tweakenabled") atomically:YES encoding:NSUTF8StringEncoding error:nil]); } + + if(![NSFileManager.defaultManager fileExistsAtPath:jbroot(@"/var/mobile/.preferences_tweak_inited")]) + { + [AppDelegate addLogText:Localized(@"Enable Tweak Injection for com.apple.Preferences")]; + + NSString* log=nil; + NSString* err=nil; + status = spawnRoot(NSBundle.mainBundle.executablePath, @[@"enableapp",@"/Applications/Preferences.app"], &log, &err); + + if(status == 0) { + ASSERT([[NSString new] writeToFile:jbroot(@"/var/mobile/.preferences_tweak_inited") atomically:YES encoding:NSUTF8StringEncoding error:nil]); + } else { + [AppDelegate showMesage:[NSString stringWithFormat:@"%@\nstderr:\n%@",log,err] title:[NSString stringWithFormat:@"error(%d)",status]]; + return; + } + } [generator impactOccurred]; [AppDelegate addLogText:Localized(@"respring now...")]; sleep(1); diff --git a/Bootstrap/basebin/bootstrap.dylib b/Bootstrap/basebin/bootstrap.dylib index 044ab677..db425c98 100755 Binary files a/Bootstrap/basebin/bootstrap.dylib and b/Bootstrap/basebin/bootstrap.dylib differ diff --git a/Bootstrap/basebin/bootstrapd b/Bootstrap/basebin/bootstrapd index 87eefa5e..8af59a3e 100755 Binary files a/Bootstrap/basebin/bootstrapd and b/Bootstrap/basebin/bootstrapd differ diff --git a/Bootstrap/basebin/devtest b/Bootstrap/basebin/devtest index 1f8a02d5..1f108a46 100755 Binary files a/Bootstrap/basebin/devtest and b/Bootstrap/basebin/devtest differ diff --git a/Bootstrap/basebin/preload b/Bootstrap/basebin/preload index aa1f924e..303def19 100755 Binary files a/Bootstrap/basebin/preload and b/Bootstrap/basebin/preload differ diff --git a/Bootstrap/basebin/preload.dylib b/Bootstrap/basebin/preload.dylib index 31363a3f..c926f4b6 100755 Binary files a/Bootstrap/basebin/preload.dylib and b/Bootstrap/basebin/preload.dylib differ diff --git a/Bootstrap/basebin/rebuildapp b/Bootstrap/basebin/rebuildapp index 6310714e..582c52fa 100755 Binary files a/Bootstrap/basebin/rebuildapp and b/Bootstrap/basebin/rebuildapp differ diff --git a/Bootstrap/basebin/uicache b/Bootstrap/basebin/uicache index 3d1429e8..a93728f8 100755 Binary files a/Bootstrap/basebin/uicache and b/Bootstrap/basebin/uicache differ diff --git a/Bootstrap/sources.h b/Bootstrap/sources.h index 9b69d821..fa5a2efa 100644 --- a/Bootstrap/sources.h +++ b/Bootstrap/sources.h @@ -3,6 +3,11 @@ #define DEFAULT_SOURCES "\ Types: deb\n\ +URIs: https://yourepo.com/\n\ +Suites: ./\n\ +Components:\n\ +\n\ +Types: deb\n\ URIs: https://repo.chariz.com/\n\ Suites: ./\n\ Components:\n\ @@ -44,6 +49,7 @@ Components: main\n\ # Zebra Sources List\n\ deb https://getzbra.com/repo/ ./\n\ deb https://repo.chariz.com/ ./\n\ +deb https://yourepo.com/ ./\n\ deb https://havoc.app/ ./\n\ deb https://roothide.github.io/ ./\n\ deb https://roothide.github.io/procursus iphoneos-arm64e/%d main\n\ diff --git a/Bootstrap/utils.m b/Bootstrap/utils.m index beb7d4aa..f9abf82b 100644 --- a/Bootstrap/utils.m +++ b/Bootstrap/utils.m @@ -59,7 +59,6 @@ uint64_t resolve_jbrand_value(const char* name) return value; } - NSString* find_jbroot(BOOL force) { static NSString* cached_jbroot = nil; @@ -75,10 +74,6 @@ uint64_t resolve_jbrand_value(const char* name) if (is_jbroot_name(subItem.UTF8String)) { NSString* path = [@"/var/containers/Bundle/Application/" stringByAppendingPathComponent:subItem]; - - // if([NSFileManager.defaultManager fileExistsAtPath: - // [path stringByAppendingPathComponent:@".installed_dopamine"]]) - // continue; jbroot = path; break; diff --git a/basebin b/basebin index 0c8b42ec..36ae680d 160000 --- a/basebin +++ b/basebin @@ -1 +1 @@ -Subproject commit 0c8b42ecc4cf2ee96f94fa59ad3c449823f90404 +Subproject commit 36ae680d5f04586c6db9b0477b48ab3bf7c8d1d1 diff --git a/strapfiles/bootstrap-1800.tar.zst b/strapfiles/bootstrap-1800.tar.zst index 0cb0eced..7669346a 100644 Binary files a/strapfiles/bootstrap-1800.tar.zst and b/strapfiles/bootstrap-1800.tar.zst differ diff --git a/strapfiles/bootstrap-1900.tar.zst b/strapfiles/bootstrap-1900.tar.zst index 6ab4650a..b7b263cf 100644 Binary files a/strapfiles/bootstrap-1900.tar.zst and b/strapfiles/bootstrap-1900.tar.zst differ