Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
simplified the respring implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandra authored and Alexandra committed May 17, 2023
1 parent 9837bc4 commit 1efe9e2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
1 change: 1 addition & 0 deletions Preferences/Controllers/KayokoRootListController.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#import <Preferences/PSListController.h>
#import <Preferences/PSSpecifier.h>
#import "../../Manager/PasteboardManager.h"
#import <rootless.h>

@interface NSConcreteNotification : NSNotification
@end
Expand Down
13 changes: 4 additions & 9 deletions Preferences/Controllers/KayokoRootListController.m
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,10 @@ - (void)promptToRespring {
}

- (void)respring {
NSArray* launchPaths = @[@"/usr/bin/killall", @"/var/jb/usr/bin/killall"];
for (NSString* launchPath in launchPaths) {
if ([[NSFileManager defaultManager] fileExistsAtPath:launchPath]) {
NSTask* task = [[NSTask alloc] init];
[task setLaunchPath:launchPath];
[task setArguments:@[@"backboardd"]];
[task launch];
}
}
NSTask* task = [[NSTask alloc] init];
[task setLaunchPath:ROOT_PATH_NS(@"/usr/bin/killall")];
[task setArguments:@[@"backboardd"]];
[task launch];
}

- (void)resetPrompt {
Expand Down

0 comments on commit 1efe9e2

Please sign in to comment.