Skip to content

Commit f1fb583

Browse files
committed
move to basebin to prevent users from accidentally deleting in sileo
1 parent af5ab14 commit f1fb583

File tree

4 files changed

+18
-18
lines changed

4 files changed

+18
-18
lines changed

Application/Dopamine.xcodeproj/project.pbxproj

+2-5
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@
4848
04DD0B442B7CBE2E0055DE4F /* DOThemeManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 04DD0B432B7CBE2E0055DE4F /* DOThemeManager.m */; };
4949
04DD0B472B7CBEEA0055DE4F /* DOTheme.m in Sources */ = {isa = PBXBuildFile; fileRef = 04DD0B462B7CBEEA0055DE4F /* DOTheme.m */; };
5050
04DD0B592B7D19E60055DE4F /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 04DD0B5B2B7D19E60055DE4F /* Localizable.strings */; };
51+
51F19D052BBF456200896361 /* libpartial.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 51AB98D92BBF44390042EA7B /* libpartial.a */; };
5152
8415E3B32BE40011001F31A8 /* Dopamine.roothide in Resources */ = {isa = PBXBuildFile; fileRef = 8415E3B22BE40011001F31A8 /* Dopamine.roothide */; };
5253
84F267EA2BB7292C00DD3323 /* roothideapp.deb in Resources */ = {isa = PBXBuildFile; fileRef = 84F267E92BB7292C00DD3323 /* roothideapp.deb */; };
53-
51F19D052BBF456200896361 /* libpartial.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 51AB98D92BBF44390042EA7B /* libpartial.a */; };
5454
8C029F432B4DFD5D0071DE58 /* DOExploitManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C029F422B4DFD5D0071DE58 /* DOExploitManager.m */; };
5555
8C029F462B4DFD910071DE58 /* DOBootstrapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C029F452B4DFD910071DE58 /* DOBootstrapper.m */; };
5656
8C029F4E2B4E1FF30071DE58 /* DOExploit.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C029F4D2B4E1FF30071DE58 /* DOExploit.m */; };
@@ -187,7 +187,6 @@
187187
8CC139832B53E05300230143 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8CDD08372B4F682500A32B61 /* IOKit.framework */; };
188188
8CCD2FC42B77AAA000F9C5DA /* basebin-link.deb in Resources */ = {isa = PBXBuildFile; fileRef = 8CCD2FC32B77AA9200F9C5DA /* basebin-link.deb */; };
189189
8CCD8A872B6F16CC004B72B0 /* libkrw-plugin.deb in Resources */ = {isa = PBXBuildFile; fileRef = 8CCD8A852B6F1662004B72B0 /* libkrw-plugin.deb */; };
190-
8CCD8A882B6F16D0004B72B0 /* libroot.deb in Resources */ = {isa = PBXBuildFile; fileRef = 8CCD8A832B6F165A004B72B0 /* libroot.deb */; };
191190
8CDD07AA2B4F619000A32B61 /* kfd.h in Headers */ = {isa = PBXBuildFile; fileRef = 8CDD07A92B4F619000A32B61 /* kfd.h */; settings = {ATTRIBUTES = (Public, ); }; };
192191
8CDD07AF2B4F619000A32B61 /* kfd.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 8CDD07A72B4F619000A32B61 /* kfd.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
193192
8CDD08342B4F63E100A32B61 /* kfd.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CDD07B32B4F639100A32B61 /* kfd.m */; };
@@ -370,12 +369,11 @@
370369
04DD0B452B7CBEEA0055DE4F /* DOTheme.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DOTheme.h; sourceTree = "<group>"; };
371370
04DD0B462B7CBEEA0055DE4F /* DOTheme.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DOTheme.m; sourceTree = "<group>"; };
372371
04DD0B5A2B7D19E60055DE4F /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
373-
04DD0B5D2B7D1A210055DE4F /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/Localizable.strings; sourceTree = "<group>"; };
374372
04DD0B5C2B7D1A210055DE4F /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Localizable.strings; sourceTree = "<group>"; };
375373
04DD0B5D2B7D1A210055DE4F /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/Localizable.strings; sourceTree = "<group>"; };
374+
51AB98D92BBF44390042EA7B /* libpartial.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libpartial.a; path = Dopamine/Dependencies/libpartial.a; sourceTree = "<group>"; };
376375
8415E3B22BE40011001F31A8 /* Dopamine.roothide */ = {isa = PBXFileReference; lastKnownFileType = text; path = Dopamine.roothide; sourceTree = "<group>"; };
377376
84F267E92BB7292C00DD3323 /* roothideapp.deb */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = roothideapp.deb; sourceTree = "<group>"; };
378-
51AB98D92BBF44390042EA7B /* libpartial.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libpartial.a; path = Dopamine/Dependencies/libpartial.a; sourceTree = "<group>"; };
379377
8C029F412B4DFD5D0071DE58 /* DOExploitManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DOExploitManager.h; sourceTree = "<group>"; };
380378
8C029F422B4DFD5D0071DE58 /* DOExploitManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DOExploitManager.m; sourceTree = "<group>"; };
381379
8C029F442B4DFD910071DE58 /* DOBootstrapper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DOBootstrapper.h; sourceTree = "<group>"; };
@@ -1500,7 +1498,6 @@
15001498
8C512B912B5C9F9100C6F14A /* sileo.deb in Resources */,
15011499
8C512B922B5C9F9400C6F14A /* zebra.deb in Resources */,
15021500
8CCD8A872B6F16CC004B72B0 /* libkrw-plugin.deb in Resources */,
1503-
8CCD8A882B6F16D0004B72B0 /* libroot.deb in Resources */,
15041501
8C296BAE2BE05914007C2AD1 /* LICENSE_plooshinit.md in Resources */,
15051502
8C5FA9712BDD81EF008C246F /* LICENSE_weightBufs.md in Resources */,
15061503
8CB94F052B59E17A0098BAFD /* basebin.tar in Resources */,

Application/Dopamine/Jailbreak/DOBootstrapper.m

+8-9
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#import <sys/stat.h>
1818

1919
#define LIBKRW_DOPAMINE_BUNDLED_VERSION @"2.0.1"
20-
#define LIBROOT_DOPAMINE_BUNDLED_VERSION @"1.0.1"
2120
#define BASEBIN_LINK_BUNDLED_VERSION @"1.0.0"
2221

2322
struct hfs_mount_args {
@@ -799,19 +798,19 @@ - (NSError *)finalizeBootstrap
799798
}
800799
}
801800

802-
NSString *librootInstalledVersion = [self installedVersionForPackageWithIdentifier:@"libroot-dopamine"];
803801
NSString *libkrwDopamineInstalledVersion = [self installedVersionForPackageWithIdentifier:@"libkrw0-dopamine"];
804802
NSString *basebinLinkInstalledVersion = [self installedVersionForPackageWithIdentifier:@"dopamine-basebin-link"];
805-
806-
if (!librootInstalledVersion || ![librootInstalledVersion isEqualToString:LIBROOT_DOPAMINE_BUNDLED_VERSION] ||
803+
804+
if ([self fileOrSymlinkExistsAtPath:NSJBRootPath(@"/usr/lib/libroot.dylib")]) {
805+
[[NSFileManager defaultManager] removeItemAtPath:NSJBRootPath(@"/usr/lib/libroot.dylib") error:nil];
806+
}
807+
[[NSFileManager defaultManager] createSymbolicLinkAtPath:NSJBRootPath(@"/usr/lib/libroot.dylib") withDestinationPath:NSJBRootPath(@"/basebin/libroot.dylib") error:nil];
808+
809+
if (
807810
!libkrwDopamineInstalledVersion || ![libkrwDopamineInstalledVersion isEqualToString:LIBKRW_DOPAMINE_BUNDLED_VERSION] ||
808811
!basebinLinkInstalledVersion || ![basebinLinkInstalledVersion isEqualToString:BASEBIN_LINK_BUNDLED_VERSION]) {
809812
[[DOUIManager sharedInstance] sendLog:@"Updating Bundled Packages" debug:NO];
810-
if (!librootInstalledVersion || ![librootInstalledVersion isEqualToString:LIBROOT_DOPAMINE_BUNDLED_VERSION]) {
811-
NSString *librootPath = [[NSBundle mainBundle].bundlePath stringByAppendingPathComponent:@"libroot.deb"];
812-
int r = [self installPackage:librootPath];
813-
if (r != 0) return [NSError errorWithDomain:bootstrapErrorDomain code:BootstrapErrorCodeFailedFinalising userInfo:@{NSLocalizedDescriptionKey : [NSString stringWithFormat:@"Failed to install libroot: %d\n", r]}];
814-
}
813+
815814

816815
if (!libkrwDopamineInstalledVersion || ![libkrwDopamineInstalledVersion isEqualToString:LIBKRW_DOPAMINE_BUNDLED_VERSION]) {
817816
NSString *libkrwPath = [[NSBundle mainBundle].bundlePath stringByAppendingPathComponent:@"libkrw-plugin.deb"];

BaseBin/Makefile

+8-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
all: basebin.tar
1111

12-
subprojects: ChOma XPF opainject libjailbreak systemhook forkfix launchdhook boomerang jbctl idownloadd watchdoghook rootlesshooks
12+
subprojects: ChOma XPF opainject libjailbreak systemhook forkfix launchdhook boomerang jbctl idownloadd watchdoghook rootlesshooks libroot
1313

1414
ChOma: .build .include
1515
@$(MAKE) -C ChOma TARGET=ios DISABLE_SIGNING=1 DISABLE_TESTS=1 DYLIB_LDFLAGS="-install_name @loader_path/libchoma.dylib"
@@ -64,6 +64,11 @@ rootlesshooks: .build .include libjailbreak
6464
$(MAKE) -C rootlesshooks
6565
@cp rootlesshooks/.theos/obj/rootlesshooks.dylib .build
6666

67+
libroot:
68+
@$(MAKE) -C ../Packages/libroot all
69+
@cp ../Packages/libroot/libroot.dylib .build
70+
71+
6772
.build:
6873
rm -rf .build
6974
mkdir -p .build
@@ -102,9 +107,10 @@ clean:
102107
@$(MAKE) -C idownloadd $@
103108
@$(MAKE) -C watchdoghook $@
104109
@$(MAKE) -C rootlesshooks $@
110+
@$(MAKE) -C ../Packages/libroot clean
105111
@rm -rf .build
106112
@rm -rf .include
107113
@rm -rf basebin.tar
108114
@rm -rf basebin.tc
109115

110-
.PHONY: clean .build .include ChOma XPF opainject libjailbreak systemhook forkfix launchdhook boomerang jbctl idownloadd watchdoghook rootlesshooks basebin.tc basebin.tar
116+
.PHONY: clean .build .include ChOma XPF opainject libjailbreak systemhook forkfix launchdhook boomerang jbctl idownloadd watchdoghook rootlesshooks libroot basebin.tc basebin.tar

Packages/Makefile

-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
all:
22
@$(MAKE) -C libkrw-provider package
3-
@$(MAKE) -C libroot package
43
@$(MAKE) -C basebin-link package
54

65
clean:
76
@$(MAKE) -C libkrw-provider clean
8-
@$(MAKE) -C libroot clean
97
@$(MAKE) -C basebin-link clean
108

119
.PHONY: clean

0 commit comments

Comments
 (0)