|
@@ -82,7 +82,7 @@ int makeShitHappen(ViewController *view) {
|
|
|
// Remove /meridian in the case of PB's
|
|
// Remove /meridian in the case of PB's
|
|
|
if (file_exists("/meridian") == 0 &&
|
|
if (file_exists("/meridian") == 0 &&
|
|
|
file_exists("/meridian/.bootstrap") != 0) {
|
|
file_exists("/meridian/.bootstrap") != 0) {
|
|
|
- [fileMgr removeItemAtPath:@"/meridian" error:nil];
|
|
|
|
|
|
|
+ [[NSFileManager defaultManager] removeItemAtPath:@"/meridian" error:nil];
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (file_exists("/Library/LaunchDaemons/._dropbear.plist") == 0) {
|
|
if (file_exists("/Library/LaunchDaemons/._dropbear.plist") == 0) {
|
|
@@ -322,7 +322,7 @@ int makeShitHappen(ViewController *view) {
|
|
|
|
|
|
|
|
// start jailbreakd
|
|
// start jailbreakd
|
|
|
|
|
|
|
|
- ret = inject_trust("/electra/inject_criticald");
|
|
|
|
|
|
|
+ ret = inject_trust("/meridian/inject_criticald");
|
|
|
//ret = inject_trust("/electra/amfid_payload.dylib");
|
|
//ret = inject_trust("/electra/amfid_payload.dylib");
|
|
|
//ret = inject_trust("/electra/pspawn_payload.dylib");
|
|
//ret = inject_trust("/electra/pspawn_payload.dylib");
|
|
|
//ret = inject_trust("/electra/libjailbreak.dylib");
|
|
//ret = inject_trust("/electra/libjailbreak.dylib");
|
|
@@ -469,16 +469,16 @@ void setUpSymLinks() {
|
|
|
if (file_exists("/Library/MobileSubstrate/DynamicLibraries") == 0 &&
|
|
if (file_exists("/Library/MobileSubstrate/DynamicLibraries") == 0 &&
|
|
|
file_exists("/usr/lib/tweaks") != 0) {
|
|
file_exists("/usr/lib/tweaks") != 0) {
|
|
|
// Move existing tweaks folder to /usr/lib/tweaks
|
|
// Move existing tweaks folder to /usr/lib/tweaks
|
|
|
- [fileMgr moveItemAtPath:@"/Library/MobileSubstrate/DynamicLibraries" toPath:@"/usr/lib/tweaks" error:nil];
|
|
|
|
|
|
|
+ [[NSFileManager defaultManager] moveItemAtPath:@"/Library/MobileSubstrate/DynamicLibraries" toPath:@"/usr/lib/tweaks" error:nil];
|
|
|
} else if (file_exists("/Library/MobileSubstrate/DynamicLibraries") == 0 &&
|
|
} else if (file_exists("/Library/MobileSubstrate/DynamicLibraries") == 0 &&
|
|
|
file_exists("/usr/lib/tweaks") == 0) {
|
|
file_exists("/usr/lib/tweaks") == 0) {
|
|
|
// Move existing tweaks to /usr/lib/tweaks and delete the MobSub folder
|
|
// Move existing tweaks to /usr/lib/tweaks and delete the MobSub folder
|
|
|
- NSArray *fileList = [fileMgr contentsOfDirectoryAtPath:@"/Library/MobileSubstrate/DynamicLibraries" error:nil];
|
|
|
|
|
|
|
+ NSArray *fileList = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:@"/Library/MobileSubstrate/DynamicLibraries" error:nil];
|
|
|
for (NSString *item in fileList) {
|
|
for (NSString *item in fileList) {
|
|
|
NSString *fullPath = [NSString stringWithFormat:@"/Library/MobileSubstrate/DynamicLibraries/%@", item];
|
|
NSString *fullPath = [NSString stringWithFormat:@"/Library/MobileSubstrate/DynamicLibraries/%@", item];
|
|
|
- [fileMgr moveItemAtPath:fullPath toPath:@"/usr/lib/tweaks" error:nil];
|
|
|
|
|
|
|
+ [[NSFileManager defaultManager] moveItemAtPath:fullPath toPath:@"/usr/lib/tweaks" error:nil];
|
|
|
}
|
|
}
|
|
|
- [fileMgr removeItemAtPath:@"/Library/MobileSubstrate/DynamicLibraries" error:nil];
|
|
|
|
|
|
|
+ [[NSFileManager defaultManager] removeItemAtPath:@"/Library/MobileSubstrate/DynamicLibraries" error:nil];
|
|
|
} else if (file_exists("/Library/MobileSubstrate/DynamicLibraries") != 0 &&
|
|
} else if (file_exists("/Library/MobileSubstrate/DynamicLibraries") != 0 &&
|
|
|
file_exists("/usr/lib/tweaks") != 0) {
|
|
file_exists("/usr/lib/tweaks") != 0) {
|
|
|
// Just create /usr/lib/tweaks - /Lib/MobSub/DynLibs doesn't exist
|
|
// Just create /usr/lib/tweaks - /Lib/MobSub/DynLibs doesn't exist
|
|
@@ -511,7 +511,7 @@ int extractBootstrap(int *exitCode) {
|
|
|
rv = extract_tar("/meridian/bootstrap.tar");
|
|
rv = extract_tar("/meridian/bootstrap.tar");
|
|
|
if (rv != 0) {
|
|
if (rv != 0) {
|
|
|
*exitCode = rv;
|
|
*exitCode = rv;
|
|
|
- return 1; //FIXME: make sure this is working later.
|
|
|
|
|
|
|
+ return 1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// rv = uicache();
|
|
// rv = uicache();
|
|
@@ -522,6 +522,8 @@ int extractBootstrap(int *exitCode) {
|
|
|
|
|
|
|
|
touch_file("/meridian/.bootstrap");
|
|
touch_file("/meridian/.bootstrap");
|
|
|
|
|
|
|
|
|
|
+ touch_file("/var/mobile/Library/Preferences/.kickstart");
|
|
|
|
|
+
|
|
|
return 0;
|
|
return 0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -653,7 +655,7 @@ int launchDropbear() {
|
|
|
void setUpSubstitute() {
|
|
void setUpSubstitute() {
|
|
|
// link CydiaSubstrate.framework -> /usr/lib/libsubstrate.dylib
|
|
// link CydiaSubstrate.framework -> /usr/lib/libsubstrate.dylib
|
|
|
if (file_exists("/Library/Frameworks/CydiaSubstrate.framework") == 0) {
|
|
if (file_exists("/Library/Frameworks/CydiaSubstrate.framework") == 0) {
|
|
|
- [fileMgr removeItemAtPath:@"/Library/Frameworks/CydiaSubstrate.framework" error:nil];
|
|
|
|
|
|
|
+ [[NSFileManager defaultManager] removeItemAtPath:@"/Library/Frameworks/CydiaSubstrate.framework" error:nil];
|
|
|
}
|
|
}
|
|
|
mkdir("/Library/Frameworks", 0755);
|
|
mkdir("/Library/Frameworks", 0755);
|
|
|
mkdir("/Library/Frameworks/CydiaSubstrate.framework", 0755);
|
|
mkdir("/Library/Frameworks/CydiaSubstrate.framework", 0755);
|
|
@@ -745,7 +747,7 @@ int startJailbreakd() {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
int loadLaunchDaemons() {
|
|
int loadLaunchDaemons() {
|
|
|
- NSArray *daemons = [fileMgr contentsOfDirectoryAtPath:@"/Library/LaunchDaemons" error:nil];
|
|
|
|
|
|
|
+ NSArray *daemons = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:@"/Library/LaunchDaemons" error:nil];
|
|
|
for (NSString *file in daemons) {
|
|
for (NSString *file in daemons) {
|
|
|
NSString *path = [NSString stringWithFormat:@"/Library/LaunchDaemons/%@", file];
|
|
NSString *path = [NSString stringWithFormat:@"/Library/LaunchDaemons/%@", file];
|
|
|
NSLog(@"found launchdaemon: %@", path);
|
|
NSLog(@"found launchdaemon: %@", path);
|