Undone changes for xenhtml update

This commit is contained in:
Micah Gomez 2020-02-25 17:23:34 -08:00
parent 0916512159
commit c51f4c2a0c
4 changed files with 21 additions and 18 deletions

View file

@ -17,7 +17,10 @@
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch. setuid(0);
setgid(0);
// Override point for customization after application launch.
[application _setBackgroundStyle:UIBackgroundStyleExtraDarkBlur]; [application _setBackgroundStyle:UIBackgroundStyleExtraDarkBlur];
UIColor *barBackground = [UIColor colorWithWhite:0 alpha:0.3]; UIColor *barBackground = [UIColor colorWithWhite:0 alpha:0.3];

View file

@ -126,14 +126,14 @@ NSString *backupNameSelected;
[killPrefsTask setLaunchPath:@"/bin/bash"]; [killPrefsTask setLaunchPath:@"/bin/bash"];
[killPrefsTask setArguments:@[ @"killall", @"cfprefsd"]]; [killPrefsTask setArguments:@[ @"killall", @"cfprefsd"]];
[killPrefsTask launch]; [killPrefsTask launch];
[killPrefsTask waitUntilExit];*/ [killPrefsTask waitUntilExit];
NSLog(@"time to respring"); NSLog(@"time to respring");
NSTask *respringTask = [[NSTask alloc] init]; NSTask *respringTask = [[NSTask alloc] init];
[respringTask setLaunchPath:@"/bin/bash"]; [respringTask setLaunchPath:@"/bin/"];
[respringTask setArguments:@[ @"killall", @"backboardd"]]; [respringTask setArguments:@[ @"killall", @"backboardd"]];
[respringTask launch]; [respringTask launch];
[respringTask waitUntilExit]; [respringTask waitUntilExit];*/
[restoreBackupAlert dismissViewControllerAnimated:YES completion:nil]; [restoreBackupAlert dismissViewControllerAnimated:YES completion:nil];

View file

@ -1,17 +1,12 @@
//
// main.m
// FlashBack
//
// Created by Micah Gomez on 3/27/19.
// Copyright © 2019 Micah Gomez. All rights reserved.
//
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
#import <dlfcn.h>
#import <sys/stat.h>
#import <unistd.h>
#import "AppDelegate.h" #import "AppDelegate.h"
#include <dlfcn.h>
#define FLAG_PLATFORMIZE (1 << 1) #define FLAG_PLATFORMIZE (1 << 1)
// Special thanks to PsychoTea (@IBSparkles) for getting root on kernel patch jailbreaks, as well as for both Electra's and Meridian's "kppless" jailbreakd daemon.
void platformize_me() { void platformize_me() {
void* handle = dlopen("/usr/lib/libjailbreak.dylib", RTLD_LAZY); void* handle = dlopen("/usr/lib/libjailbreak.dylib", RTLD_LAZY);
if (!handle) return; if (!handle) return;
@ -46,13 +41,18 @@ void patch_setuid() {
int main(int argc, char * argv[]) { int main(int argc, char * argv[]) {
@autoreleasepool { @autoreleasepool {
if ([[NSFileManager defaultManager] fileExistsAtPath:@"/usr/lib/libjailbreak.dylib"]){ setuid(0);
if (getuid() != 0) {
//Gets setuid on Electra
patch_setuid();
platformize_me(); platformize_me();
setuid(0); // electra requires you to call setuid again
}
//Gets setuid on Meridian
if (getuid() != 0) {
patch_setuid(); patch_setuid();
} }
setuid(0);
setgid(0);
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
} }
} }