Skip to content

Commit

Permalink
move to basebin to prevent users from accidentally deleting in sileo
Browse files Browse the repository at this point in the history
  • Loading branch information
roothider committed Jun 1, 2024
1 parent af5ab14 commit f1fb583
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
7 changes: 2 additions & 5 deletions Application/Dopamine.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@
04DD0B442B7CBE2E0055DE4F /* DOThemeManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 04DD0B432B7CBE2E0055DE4F /* DOThemeManager.m */; };
04DD0B472B7CBEEA0055DE4F /* DOTheme.m in Sources */ = {isa = PBXBuildFile; fileRef = 04DD0B462B7CBEEA0055DE4F /* DOTheme.m */; };
04DD0B592B7D19E60055DE4F /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 04DD0B5B2B7D19E60055DE4F /* Localizable.strings */; };
51F19D052BBF456200896361 /* libpartial.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 51AB98D92BBF44390042EA7B /* libpartial.a */; };
8415E3B32BE40011001F31A8 /* Dopamine.roothide in Resources */ = {isa = PBXBuildFile; fileRef = 8415E3B22BE40011001F31A8 /* Dopamine.roothide */; };
84F267EA2BB7292C00DD3323 /* roothideapp.deb in Resources */ = {isa = PBXBuildFile; fileRef = 84F267E92BB7292C00DD3323 /* roothideapp.deb */; };
51F19D052BBF456200896361 /* libpartial.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 51AB98D92BBF44390042EA7B /* libpartial.a */; };
8C029F432B4DFD5D0071DE58 /* DOExploitManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C029F422B4DFD5D0071DE58 /* DOExploitManager.m */; };
8C029F462B4DFD910071DE58 /* DOBootstrapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C029F452B4DFD910071DE58 /* DOBootstrapper.m */; };
8C029F4E2B4E1FF30071DE58 /* DOExploit.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C029F4D2B4E1FF30071DE58 /* DOExploit.m */; };
Expand Down Expand Up @@ -187,7 +187,6 @@
8CC139832B53E05300230143 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8CDD08372B4F682500A32B61 /* IOKit.framework */; };
8CCD2FC42B77AAA000F9C5DA /* basebin-link.deb in Resources */ = {isa = PBXBuildFile; fileRef = 8CCD2FC32B77AA9200F9C5DA /* basebin-link.deb */; };
8CCD8A872B6F16CC004B72B0 /* libkrw-plugin.deb in Resources */ = {isa = PBXBuildFile; fileRef = 8CCD8A852B6F1662004B72B0 /* libkrw-plugin.deb */; };
8CCD8A882B6F16D0004B72B0 /* libroot.deb in Resources */ = {isa = PBXBuildFile; fileRef = 8CCD8A832B6F165A004B72B0 /* libroot.deb */; };
8CDD07AA2B4F619000A32B61 /* kfd.h in Headers */ = {isa = PBXBuildFile; fileRef = 8CDD07A92B4F619000A32B61 /* kfd.h */; settings = {ATTRIBUTES = (Public, ); }; };
8CDD07AF2B4F619000A32B61 /* kfd.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 8CDD07A72B4F619000A32B61 /* kfd.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
8CDD08342B4F63E100A32B61 /* kfd.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CDD07B32B4F639100A32B61 /* kfd.m */; };
Expand Down Expand Up @@ -370,12 +369,11 @@
04DD0B452B7CBEEA0055DE4F /* DOTheme.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DOTheme.h; sourceTree = "<group>"; };
04DD0B462B7CBEEA0055DE4F /* DOTheme.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DOTheme.m; sourceTree = "<group>"; };
04DD0B5A2B7D19E60055DE4F /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
04DD0B5D2B7D1A210055DE4F /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/Localizable.strings; sourceTree = "<group>"; };
04DD0B5C2B7D1A210055DE4F /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Localizable.strings; sourceTree = "<group>"; };
04DD0B5D2B7D1A210055DE4F /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/Localizable.strings; sourceTree = "<group>"; };
51AB98D92BBF44390042EA7B /* libpartial.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libpartial.a; path = Dopamine/Dependencies/libpartial.a; sourceTree = "<group>"; };
8415E3B22BE40011001F31A8 /* Dopamine.roothide */ = {isa = PBXFileReference; lastKnownFileType = text; path = Dopamine.roothide; sourceTree = "<group>"; };
84F267E92BB7292C00DD3323 /* roothideapp.deb */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = roothideapp.deb; sourceTree = "<group>"; };
51AB98D92BBF44390042EA7B /* libpartial.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libpartial.a; path = Dopamine/Dependencies/libpartial.a; sourceTree = "<group>"; };
8C029F412B4DFD5D0071DE58 /* DOExploitManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DOExploitManager.h; sourceTree = "<group>"; };
8C029F422B4DFD5D0071DE58 /* DOExploitManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DOExploitManager.m; sourceTree = "<group>"; };
8C029F442B4DFD910071DE58 /* DOBootstrapper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DOBootstrapper.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1500,7 +1498,6 @@
8C512B912B5C9F9100C6F14A /* sileo.deb in Resources */,
8C512B922B5C9F9400C6F14A /* zebra.deb in Resources */,
8CCD8A872B6F16CC004B72B0 /* libkrw-plugin.deb in Resources */,
8CCD8A882B6F16D0004B72B0 /* libroot.deb in Resources */,
8C296BAE2BE05914007C2AD1 /* LICENSE_plooshinit.md in Resources */,
8C5FA9712BDD81EF008C246F /* LICENSE_weightBufs.md in Resources */,
8CB94F052B59E17A0098BAFD /* basebin.tar in Resources */,
Expand Down
17 changes: 8 additions & 9 deletions Application/Dopamine/Jailbreak/DOBootstrapper.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#import <sys/stat.h>

#define LIBKRW_DOPAMINE_BUNDLED_VERSION @"2.0.1"
#define LIBROOT_DOPAMINE_BUNDLED_VERSION @"1.0.1"
#define BASEBIN_LINK_BUNDLED_VERSION @"1.0.0"

struct hfs_mount_args {
Expand Down Expand Up @@ -799,19 +798,19 @@ - (NSError *)finalizeBootstrap
}
}

NSString *librootInstalledVersion = [self installedVersionForPackageWithIdentifier:@"libroot-dopamine"];
NSString *libkrwDopamineInstalledVersion = [self installedVersionForPackageWithIdentifier:@"libkrw0-dopamine"];
NSString *basebinLinkInstalledVersion = [self installedVersionForPackageWithIdentifier:@"dopamine-basebin-link"];

if (!librootInstalledVersion || ![librootInstalledVersion isEqualToString:LIBROOT_DOPAMINE_BUNDLED_VERSION] ||

if ([self fileOrSymlinkExistsAtPath:NSJBRootPath(@"/usr/lib/libroot.dylib")]) {
[[NSFileManager defaultManager] removeItemAtPath:NSJBRootPath(@"/usr/lib/libroot.dylib") error:nil];
}
[[NSFileManager defaultManager] createSymbolicLinkAtPath:NSJBRootPath(@"/usr/lib/libroot.dylib") withDestinationPath:NSJBRootPath(@"/basebin/libroot.dylib") error:nil];

if (
!libkrwDopamineInstalledVersion || ![libkrwDopamineInstalledVersion isEqualToString:LIBKRW_DOPAMINE_BUNDLED_VERSION] ||
!basebinLinkInstalledVersion || ![basebinLinkInstalledVersion isEqualToString:BASEBIN_LINK_BUNDLED_VERSION]) {
[[DOUIManager sharedInstance] sendLog:@"Updating Bundled Packages" debug:NO];
if (!librootInstalledVersion || ![librootInstalledVersion isEqualToString:LIBROOT_DOPAMINE_BUNDLED_VERSION]) {
NSString *librootPath = [[NSBundle mainBundle].bundlePath stringByAppendingPathComponent:@"libroot.deb"];
int r = [self installPackage:librootPath];
if (r != 0) return [NSError errorWithDomain:bootstrapErrorDomain code:BootstrapErrorCodeFailedFinalising userInfo:@{NSLocalizedDescriptionKey : [NSString stringWithFormat:@"Failed to install libroot: %d\n", r]}];
}


if (!libkrwDopamineInstalledVersion || ![libkrwDopamineInstalledVersion isEqualToString:LIBKRW_DOPAMINE_BUNDLED_VERSION]) {
NSString *libkrwPath = [[NSBundle mainBundle].bundlePath stringByAppendingPathComponent:@"libkrw-plugin.deb"];
Expand Down
10 changes: 8 additions & 2 deletions BaseBin/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

all: basebin.tar

subprojects: ChOma XPF opainject libjailbreak systemhook forkfix launchdhook boomerang jbctl idownloadd watchdoghook rootlesshooks
subprojects: ChOma XPF opainject libjailbreak systemhook forkfix launchdhook boomerang jbctl idownloadd watchdoghook rootlesshooks libroot

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

libroot:
@$(MAKE) -C ../Packages/libroot all
@cp ../Packages/libroot/libroot.dylib .build


.build:
rm -rf .build
mkdir -p .build
Expand Down Expand Up @@ -102,9 +107,10 @@ clean:
@$(MAKE) -C idownloadd $@
@$(MAKE) -C watchdoghook $@
@$(MAKE) -C rootlesshooks $@
@$(MAKE) -C ../Packages/libroot clean
@rm -rf .build
@rm -rf .include
@rm -rf basebin.tar
@rm -rf basebin.tc

.PHONY: clean .build .include ChOma XPF opainject libjailbreak systemhook forkfix launchdhook boomerang jbctl idownloadd watchdoghook rootlesshooks basebin.tc basebin.tar
.PHONY: clean .build .include ChOma XPF opainject libjailbreak systemhook forkfix launchdhook boomerang jbctl idownloadd watchdoghook rootlesshooks libroot basebin.tc basebin.tar
2 changes: 0 additions & 2 deletions Packages/Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
all:
@$(MAKE) -C libkrw-provider package
@$(MAKE) -C libroot package
@$(MAKE) -C basebin-link package

clean:
@$(MAKE) -C libkrw-provider clean
@$(MAKE) -C libroot clean
@$(MAKE) -C basebin-link clean

.PHONY: clean

0 comments on commit f1fb583

Please sign in to comment.