Skip to content

Commit d0d3c80

Browse files
committed
2.0 public beta7
1: Improved tweak compatibility 2: Enabled injection for more system apps/daesmon 3: Bootstrap will automatically re-inject tweaked system app after each update now. 4: Added watchdog hook to prevent corrupted tweaks from causing device hang to reboot 5: Implemented a full forkfix 6: Bootstrap app UI improvements 7: Fixed an issue where Bootstrap wouldn't work after certain VPNs were enabled 8: Fixed crashes in some system apps after injection 9: Fixed an issue where Sileo wouldn't work properly after updating with other packages on iOS15 10: Fixed an issue where 3rd apps were not properly restored after disabling tweaks for the apps in iOS15 11: Fixed the issue of being unable to access cellular network settings 12: Fixed an issue where TaskPortHaxx exploit did not work on low versions iOS16
1 parent 485983e commit d0d3c80

9 files changed

Lines changed: 235 additions & 111 deletions

File tree

Bootstrap.xcodeproj/project.pbxproj

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10+
841D7EE12F3F9B3C008615CE /* libdobby.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 841D7EE02F3F9B3C008615CE /* libdobby.a */; };
11+
841D7EE32F3F9B9D008615CE /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 841D7EE22F3F9B9D008615CE /* libc++.tbd */; };
1012
84364F3D2B323FB600E90B58 /* MBProgressHUD.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84364F3B2B323CE300E90B58 /* MBProgressHUD.framework */; };
1113
84364F3E2B323FB600E90B58 /* MBProgressHUD.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 84364F3B2B323CE300E90B58 /* MBProgressHUD.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
1214
84364F472B3C5D4600E90B58 /* libkrw0-dummy.deb in Resources */ = {isa = PBXBuildFile; fileRef = 84364F462B3C5D4600E90B58 /* libkrw0-dummy.deb */; };
@@ -32,7 +34,7 @@
3234
847099952B1D855E003FA4ED /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 847099932B1D855E003FA4ED /* LaunchScreen.storyboard */; };
3335
847099982B1D855E003FA4ED /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 847099972B1D855E003FA4ED /* main.m */; };
3436
847099A32B1D868F003FA4ED /* Makefile in Sources */ = {isa = PBXBuildFile; fileRef = 847099A02B1D868F003FA4ED /* Makefile */; };
35-
847099A52B1D9686003FA4ED /* Bootstrap.m in Sources */ = {isa = PBXBuildFile; fileRef = 847099A42B1D9686003FA4ED /* Bootstrap.m */; };
37+
847099A52B1D9686003FA4ED /* bootstrap.m in Sources */ = {isa = PBXBuildFile; fileRef = 847099A42B1D9686003FA4ED /* bootstrap.m */; };
3638
84A551A82DA47BCC0015CE66 /* roothideapp.deb in Frameworks */ = {isa = PBXBuildFile; fileRef = 84A551A72DA47BCC0015CE66 /* roothideapp.deb */; };
3739
84A551A92DA47BD00015CE66 /* roothideapp.deb in Resources */ = {isa = PBXBuildFile; fileRef = 84A551A72DA47BCC0015CE66 /* roothideapp.deb */; };
3840
84C3ECC02EFE72D300D1DC78 /* libcommon.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 84C3ECBF2EFE72D300D1DC78 /* libcommon.a */; };
@@ -65,6 +67,8 @@
6567
/* End PBXCopyFilesBuildPhase section */
6668

6769
/* Begin PBXFileReference section */
70+
841D7EE02F3F9B3C008615CE /* libdobby.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libdobby.a; path = basebin/common/lib/libdobby.a; sourceTree = "<group>"; };
71+
841D7EE22F3F9B9D008615CE /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; };
6872
843367522B59AD4800206A68 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/Localizable.strings; sourceTree = "<group>"; };
6973
84364F382B2E53BA00E90B58 /* seh.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = seh.h; sourceTree = "<group>"; };
7074
84364F392B3235A100E90B58 /* sources.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = sources.h; sourceTree = "<group>"; };
@@ -123,7 +127,7 @@
123127
8470999E2B1D868F003FA4ED /* control */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = control; sourceTree = "<group>"; };
124128
8470999F2B1D868F003FA4ED /* entitlements.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = entitlements.plist; sourceTree = "<group>"; };
125129
847099A02B1D868F003FA4ED /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
126-
847099A42B1D9686003FA4ED /* Bootstrap.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Bootstrap.m; sourceTree = "<group>"; };
130+
847099A42B1D9686003FA4ED /* bootstrap.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = bootstrap.m; sourceTree = "<group>"; };
127131
84A551A72DA47BCC0015CE66 /* roothideapp.deb */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = roothideapp.deb; sourceTree = "<group>"; };
128132
84C3ECBF2EFE72D300D1DC78 /* libcommon.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcommon.a; path = basebin/common/lib/libcommon.a; sourceTree = "<group>"; };
129133
84C3ECC12F01A2BA00D1DC78 /* prepare.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = prepare.a; path = basebin/common/lib/prepare.a; sourceTree = "<group>"; };
@@ -155,6 +159,8 @@
155159
84438D602B26546E00A1E407 /* MobileCoreServices.framework in Frameworks */,
156160
84438D502B260F8200A1E407 /* libzstd in Frameworks */,
157161
84C3ECC02EFE72D300D1DC78 /* libcommon.a in Frameworks */,
162+
841D7EE12F3F9B3C008615CE /* libdobby.a in Frameworks */,
163+
841D7EE32F3F9B9D008615CE /* libc++.tbd in Frameworks */,
158164
84C3ECC22F01A2BA00D1DC78 /* prepare.a in Frameworks */,
159165
);
160166
runOnlyForDeploymentPostprocessing = 0;
@@ -165,9 +171,11 @@
165171
84438D5E2B26546E00A1E407 /* Frameworks */ = {
166172
isa = PBXGroup;
167173
children = (
174+
841D7EE22F3F9B9D008615CE /* libc++.tbd */,
168175
84C3ECC52F01A3A000D1DC78 /* libarchive.2.tbd */,
169176
84C3ECC32F01A30900D1DC78 /* IOKit.framework */,
170177
84C3ECC12F01A2BA00D1DC78 /* prepare.a */,
178+
841D7EE02F3F9B3C008615CE /* libdobby.a */,
171179
84C3ECBF2EFE72D300D1DC78 /* libcommon.a */,
172180
84364F3B2B323CE300E90B58 /* MBProgressHUD.framework */,
173181
84438D612B2654EB00A1E407 /* MobileContainerManager.framework */,
@@ -230,7 +238,7 @@
230238
84364F402B32627200E90B58 /* credits.h */,
231239
84364F392B3235A100E90B58 /* sources.h */,
232240
84364F412B337BC000E90B58 /* bootstrap.h */,
233-
847099A42B1D9686003FA4ED /* Bootstrap.m */,
241+
847099A42B1D9686003FA4ED /* bootstrap.m */,
234242
84438D6E2B2CE5A300A1E407 /* AppEnabler.m */,
235243
84438D4D2B2609C600A1E407 /* utils.h */,
236244
84438D4B2B2609B200A1E407 /* utils.m */,
@@ -383,7 +391,7 @@
383391
FE895FE82B418FB900A16882 /* ContentView.swift in Sources */,
384392
FE0633AE2B41BCD900B94787 /* OptionsView.swift in Sources */,
385393
FE84597B2B44508300DCB44E /* AppViewControllerWrapper.swift in Sources */,
386-
847099A52B1D9686003FA4ED /* Bootstrap.m in Sources */,
394+
847099A52B1D9686003FA4ED /* bootstrap.m in Sources */,
387395
FE895FEC2B418FC800A16882 /* VisualEffectView.swift in Sources */,
388396
FE895FED2B418FC800A16882 /* Log.swift in Sources */,
389397
84438D4C2B2609B200A1E407 /* utils.m in Sources */,
@@ -593,7 +601,7 @@
593601
"$(PROJECT_DIR)",
594602
"$(PROJECT_DIR)/basebin/common/lib",
595603
);
596-
MARKETING_VERSION = "2.0-beta6";
604+
MARKETING_VERSION = "2.0-beta7";
597605
OTHER_LDFLAGS = "";
598606
PRODUCT_BUNDLE_IDENTIFIER = com.roothide.Bootstrap;
599607
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -639,7 +647,7 @@
639647
"$(PROJECT_DIR)",
640648
"$(PROJECT_DIR)/basebin/common/lib",
641649
);
642-
MARKETING_VERSION = "2.0-beta6";
650+
MARKETING_VERSION = "2.0-beta7";
643651
OTHER_LDFLAGS = "";
644652
PRODUCT_BUNDLE_IDENTIFIER = com.roothide.Bootstrap;
645653
PRODUCT_NAME = "$(TARGET_NAME)";

Bootstrap/AppEnabler.m

Lines changed: 39 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -209,20 +209,7 @@ int enableForApp(NSString* bundlePath)
209209
ABORT();
210210
}
211211
}
212-
else if([appInfo[@"CFBundleIdentifier"] hasPrefix:@"com.apple."] || hasTrollstoreMarker(bundlePath.fileSystemRepresentation))
213-
{
214-
ASSERT(backupApp(bundlePath) == 0);
215-
216-
ASSERT([fm createSymbolicLinkAtPath:[bundlePath stringByAppendingString:@"/.jbroot"] withDestinationPath:jbroot(@"/") error:nil]);
217-
218-
NSString* log=nil;
219-
NSString* err=nil;
220-
if(spawn_bootstrap_binary((char*[]){"/usr/bin/uicache","-s","-p", rootfsPrefix(bundlePath).fileSystemRepresentation, NULL}, &log, &err) != 0) {
221-
STRAPLOG("%@\nERR:%@", log, err);
222-
ABORT();
223-
}
224-
}
225-
else
212+
else if(isRemovableBundlePath(bundlePath.fileSystemRepresentation))
226213
{
227214
ASSERT(backupApp(bundlePath) == 0);
228215

@@ -235,6 +222,10 @@ int enableForApp(NSString* bundlePath)
235222
ABORT();
236223
}
237224
}
225+
else {
226+
STRAPLOG("unknown bundle path: %@", bundlePath);
227+
ABORT();
228+
}
238229

239230
return 0;
240231
}
@@ -265,27 +256,42 @@ int disableForApp(NSString* bundlePath)
265256
NSString* sysPath = [@"/Applications/" stringByAppendingString:bundlePath.lastPathComponent];
266257
ASSERT(spawn_bootstrap_binary((char*[]){"/usr/bin/uicache","-p", rootfsPrefix(sysPath).fileSystemRepresentation, NULL}, nil, nil) == 0);
267258
}
268-
else if([appInfo[@"CFBundleIdentifier"] hasPrefix:@"com.apple."] || hasTrollstoreMarker(bundlePath.fileSystemRepresentation))
259+
else if(isRemovableBundlePath(bundlePath.fileSystemRepresentation))
269260
{
270-
ASSERT(restoreApp(bundlePath) == 0);
271-
272-
ASSERT(spawn_bootstrap_binary((char*[]){"/usr/bin/uicache","-s","-p", rootfsPrefix(bundlePath).fileSystemRepresentation, NULL}, nil, nil) == 0);
261+
if([appInfo[@"CFBundleIdentifier"] hasPrefix:@"com.apple."] || hasTrollstoreMarker(bundlePath.fileSystemRepresentation))
262+
{
263+
//should be a system app
264+
265+
ASSERT(restoreApp(bundlePath) == 0);
266+
267+
ASSERT(spawn_bootstrap_binary((char*[]){"/usr/bin/uicache","-s","-p", rootfsPrefix(bundlePath).fileSystemRepresentation, NULL}, nil, nil) == 0);
268+
}
269+
else
270+
{
271+
//should be a user app
272+
273+
//read the backup file before restoreApp
274+
NSString* backupFlag = [bundlePath.stringByDeletingLastPathComponent stringByAppendingPathComponent:@".appbackup"];
275+
NSString* backupVersion = [NSString stringWithContentsOfFile:backupFlag encoding:NSASCIIStringEncoding error:nil];
276+
277+
ASSERT(restoreApp(bundlePath) == 0);
278+
279+
if(@available(iOS 16.0, *))
280+
{
281+
if(backupVersion.intValue >= 1) {
282+
return 0;
283+
}
284+
}
285+
286+
//unregister or respring to keep app's icon on home screen
287+
ASSERT(spawn_bootstrap_binary((char*[]){"/usr/bin/uicache","-u", rootfsPrefix(bundlePath).fileSystemRepresentation, NULL}, nil, nil) == 0);
288+
//come back
289+
ASSERT(spawn_bootstrap_binary((char*[]){"/usr/bin/uicache","-p", rootfsPrefix(bundlePath).fileSystemRepresentation, NULL}, nil, nil) == 0);
290+
}
273291
}
274-
else
275-
{
276-
//should be an appstored app
277-
278-
BOOL encryptedApp = [NSFileManager.defaultManager fileExistsAtPath:[bundlePath stringByAppendingPathComponent:@"SC_Info"]];
279-
NSString* backupVersion = [NSString stringWithContentsOfFile:[bundlePath stringByAppendingString:@"/../.appbackup"] encoding:NSASCIIStringEncoding error:nil];
280-
281-
ASSERT(restoreApp(bundlePath) == 0);
282-
283-
if(encryptedApp && backupVersion.intValue>=1) return 0;
284-
285-
//unregister or respring to keep app's icon on home screen
286-
ASSERT(spawn_bootstrap_binary((char*[]){"/usr/bin/uicache","-u", rootfsPrefix(bundlePath).fileSystemRepresentation, NULL}, nil, nil) == 0);
287-
//come back
288-
ASSERT(spawn_bootstrap_binary((char*[]){"/usr/bin/uicache","-p", rootfsPrefix(bundlePath).fileSystemRepresentation, NULL}, nil, nil) == 0);
292+
else {
293+
STRAPLOG("unknown bundle path: %@", bundlePath);
294+
ABORT();
289295
}
290296

291297
return 0;

Bootstrap/AppViewController.m

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,13 +198,19 @@ - (void)updateData:(BOOL)sort {
198198

199199
BOOL enabled1 = [self tweakEnabled:app1];
200200
BOOL enabled2 = [self tweakEnabled:app2];
201+
BOOL isApple1 = [app1.bundleIdentifier hasPrefix:@"com.apple."];
202+
BOOL isApple2 = [app2.bundleIdentifier hasPrefix:@"com.apple."];
201203

202-
if((enabled1&&!enabled2) || (!enabled1&&enabled2)) {
204+
if(enabled1 != enabled2) {
203205
return [@(enabled2) compare:@(enabled1)];
204206
}
205207

206-
if(app1.isHiddenApp || app2.isHiddenApp) {
207-
return (enabled1&&enabled2) ? [@(app2.isHiddenApp) compare:@(app1.isHiddenApp)] : [@(app1.isHiddenApp) compare:@(app2.isHiddenApp)];
208+
if(app1.isHiddenApp != app2.isHiddenApp) {
209+
return [@(app1.isHiddenApp) compare:@(app2.isHiddenApp)];
210+
}
211+
212+
if(isApple1 != isApple2) {
213+
return [@(isApple1) compare:@(isApple2)];
208214
}
209215

210216
return [app1.name localizedStandardCompare:app2.name];

0 commit comments

Comments
 (0)