Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions Bootstrap.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
843E87572B56E45300CB45C4 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 843E87592B56E45300CB45C4 /* Localizable.strings */; };
84438D472B26090D00A1E407 /* sileo.deb in Resources */ = {isa = PBXBuildFile; fileRef = 84438D432B26090D00A1E407 /* sileo.deb */; };
84438D482B26090D00A1E407 /* tar in Resources */ = {isa = PBXBuildFile; fileRef = 84438D442B26090D00A1E407 /* tar */; };
84438D4A2B26090D00A1E407 /* zebra.deb in Resources */ = {isa = PBXBuildFile; fileRef = 84438D462B26090D00A1E407 /* zebra.deb */; };
84438D4C2B2609B200A1E407 /* utils.m in Sources */ = {isa = PBXBuildFile; fileRef = 84438D4B2B2609B200A1E407 /* utils.m */; };
84438D502B260F8200A1E407 /* libzstd in Frameworks */ = {isa = PBXBuildFile; productRef = 84438D4F2B260F8200A1E407 /* libzstd */; };
84438D522B260FEB00A1E407 /* zstd_wrapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 84438D512B260FEB00A1E407 /* zstd_wrapper.m */; };
Expand Down Expand Up @@ -71,7 +70,6 @@
843E875B2B57BD5500CB45C4 /* ko */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ko; path = ko.lproj/Localizable.strings; sourceTree = "<group>"; };
84438D432B26090D00A1E407 /* sileo.deb */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = sileo.deb; sourceTree = "<group>"; };
84438D442B26090D00A1E407 /* tar */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = tar; sourceTree = "<group>"; };
84438D462B26090D00A1E407 /* zebra.deb */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = zebra.deb; sourceTree = "<group>"; };
84438D4B2B2609B200A1E407 /* utils.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = utils.m; sourceTree = "<group>"; };
84438D4D2B2609C600A1E407 /* utils.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = utils.h; sourceTree = "<group>"; };
84438D512B260FEB00A1E407 /* zstd_wrapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = zstd_wrapper.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -164,7 +162,6 @@
84438D582B261FBA00A1E407 /* basebin */,
84438D432B26090D00A1E407 /* sileo.deb */,
84438D442B26090D00A1E407 /* tar */,
84438D462B26090D00A1E407 /* zebra.deb */,
8470999E2B1D868F003FA4ED /* control */,
8470999F2B1D868F003FA4ED /* entitlements.plist */,
847099A02B1D868F003FA4ED /* Makefile */,
Expand Down Expand Up @@ -340,7 +337,6 @@
files = (
84438D592B261FBA00A1E407 /* basebin in Resources */,
84438D472B26090D00A1E407 /* sileo.deb in Resources */,
84438D4A2B26090D00A1E407 /* zebra.deb in Resources */,
84364F472B3C5D4600E90B58 /* libkrw0-dummy.deb in Resources */,
843E87572B56E45300CB45C4 /* Localizable.strings in Resources */,
84438D482B26090D00A1E407 /* tar in Resources */,
Expand Down
14 changes: 1 addition & 13 deletions Bootstrap/ViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -219,20 +219,8 @@ void reinstallPackageManager()
success = NO;
}

[AppDelegate addLogText:Localized(@"Status: Reinstalling Zebra")];
NSString* zebraDeb = [NSBundle.mainBundle.bundlePath stringByAppendingPathComponent:@"zebra.deb"];
if(spawnBootstrap((char*[]){"/usr/bin/dpkg", "-i", rootfsPrefix(zebraDeb).fileSystemRepresentation, NULL}, nil, nil) != 0) {
[AppDelegate addLogText:[NSString stringWithFormat:@"failed:%@\nERR:%@", log, err]];
success = NO;
}

if(spawnBootstrap((char*[]){"/usr/bin/uicache", "-p", "/Applications/Zebra.app", NULL}, &log, &err) != 0) {
[AppDelegate addLogText:[NSString stringWithFormat:@"failed:%@\nERR:%@", log, err]];
success = NO;
}

if(success) {
[AppDelegate showMesage:Localized(@"Sileo and Zebra reinstalled!") title:@""];
[AppDelegate showMesage:Localized(@"Sileo reinstalled!") title:@""];
}
[AppDelegate dismissHud];
});
Expand Down
2 changes: 1 addition & 1 deletion Bootstrap/Views/OptionsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ struct OptionsView: View {
reinstallPackageManager()
} label: {
Label(
title: { Text("Reinstall Sileo & Zebra") },
title: { Text("Reinstall Sileo") },
icon: { Image(systemName: "shippingbox") }
)
.frame(maxWidth: .infinity)
Expand Down
12 changes: 0 additions & 12 deletions Bootstrap/bootstrap.m
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,6 @@ int buildPackageSources()
ASSERT([[NSString stringWithFormat:@(ALT_SOURCES), getCFMajorVersion()] writeToFile:jbroot(@"/etc/apt/sources.list.d/sileo.sources") atomically:YES encoding:NSUTF8StringEncoding error:nil]);
}

if(![fm fileExistsAtPath:jbroot(@"/var/mobile/Library/Application Support/xyz.willy.Zebra")])
{
NSDictionary* attr = @{NSFilePosixPermissions:@(0755), NSFileOwnerAccountID:@(501), NSFileGroupOwnerAccountID:@(501)};
ASSERT([fm createDirectoryAtPath:jbroot(@"/var/mobile/Library/Application Support/xyz.willy.Zebra") withIntermediateDirectories:YES attributes:attr error:nil]);
}

ASSERT([[NSString stringWithFormat:@(ZEBRA_SOURCES), getCFMajorVersion()] writeToFile:jbroot(@"/var/mobile/Library/Application Support/xyz.willy.Zebra/sources.list") atomically:YES encoding:NSUTF8StringEncoding error:nil]);

return 0;
}

Expand Down Expand Up @@ -237,10 +229,6 @@ int InstallBootstrap(NSString* jbroot_path)
ASSERT(spawnBootstrap((char*[]){"/usr/bin/dpkg", "-i", rootfsPrefix(sileoDeb).fileSystemRepresentation, NULL}, nil, nil) == 0);
ASSERT(spawnBootstrap((char*[]){"/usr/bin/uicache", "-p", "/Applications/Sileo.app", NULL}, nil, nil) == 0);

NSString* zebraDeb = [NSBundle.mainBundle.bundlePath stringByAppendingPathComponent:@"zebra.deb"];
ASSERT(spawnBootstrap((char*[]){"/usr/bin/dpkg", "-i", rootfsPrefix(zebraDeb).fileSystemRepresentation, NULL}, nil, nil) == 0);
ASSERT(spawnBootstrap((char*[]){"/usr/bin/uicache", "-p", "/Applications/Zebra.app", NULL}, nil, nil) == 0);

ASSERT([[NSString stringWithFormat:@"%d",BOOTSTRAP_VERSION] writeToFile:jbroot(@"/.thebootstrapped") atomically:YES encoding:NSUTF8StringEncoding error:nil]);
ASSERT([fm copyItemAtPath:jbroot(@"/.thebootstrapped") toPath:[jbroot_secondary stringByAppendingPathComponent:@".thebootstrapped"] error:nil]);

Expand Down
10 changes: 0 additions & 10 deletions Bootstrap/sources.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,4 @@ Suites: iphoneos-arm64e/%d\n\
Components: main\n\
"

#define ZEBRA_SOURCES "\
# Zebra Sources List\n\
deb https://getzbra.com/repo/ ./\n\
deb https://repo.chariz.com/ ./\n\
deb https://havoc.app/ ./\n\
deb https://roothide.github.io/ ./\n\
deb https://roothide.github.io/procursus iphoneos-arm64e/%d main\n\
\n\
"

#endif /* sources_h */
Binary file removed zebra.deb
Binary file not shown.