|
|
@@ -38,34 +38,6 @@ BOOL dpkgInvalid = NO; |
|
|
|
} |
|
|
|
%end |
|
|
|
%ctor { |
|
|
|
if (![NSProcessInfo processInfo]) return; |
|
|
|
NSString *processName = [NSProcessInfo processInfo].processName; |
|
|
|
bool isSpringboard = [@"SpringBoard" isEqualToString:processName]; |
|
|
|
|
|
|
|
// Someone smarter than Nepeta invented this. |
|
|
|
// https://www.reddit.com/r/jailbreak/comments/4yz5v5/questionremote_messages_not_enabling/d6rlh88/ |
|
|
|
bool shouldLoad = NO; |
|
|
|
NSArray *args = [[NSClassFromString(@"NSProcessInfo") processInfo] arguments]; |
|
|
|
NSUInteger count = args.count; |
|
|
|
if (count != 0) { |
|
|
|
NSString *executablePath = args[0]; |
|
|
|
if (executablePath) { |
|
|
|
NSString *processName = [executablePath lastPathComponent]; |
|
|
|
BOOL isApplication = [executablePath rangeOfString:@"/Application/"].location != NSNotFound || [executablePath rangeOfString:@"/Applications/"].location != NSNotFound; |
|
|
|
BOOL isFileProvider = [[processName lowercaseString] rangeOfString:@"fileprovider"].location != NSNotFound; |
|
|
|
BOOL skip = [processName isEqualToString:@"AdSheet"] |
|
|
|
|| [processName isEqualToString:@"CoreAuthUI"] |
|
|
|
|| [processName isEqualToString:@"InCallService"] |
|
|
|
|| [processName isEqualToString:@"MessagesNotificationViewService"] |
|
|
|
|| [executablePath rangeOfString:@".appex/"].location != NSNotFound; |
|
|
|
if ((!isFileProvider && isApplication && !skip) || isSpringboard) { |
|
|
|
shouldLoad = YES; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (!shouldLoad) return; |
|
|
|
|
|
|
|
dpkgInvalid = ![[NSFileManager defaultManager] fileExistsAtPath:@"/var/lib/dpkg/info/com.burritoz.4x3folders.list"]; |
|
|
|
if (!dpkgInvalid) dpkgInvalid = ![[NSFileManager defaultManager] fileExistsAtPath:@"/var/lib/dpkg/info/com.burritoz.4x3folders.md5sums"]; |
|
|
|
} |