diff --git a/RootHelper/control b/RootHelper/control index dc13dd4..866bf85 100644 --- a/RootHelper/control +++ b/RootHelper/control @@ -1,6 +1,6 @@ Package: com.opa334.trollstoreroothelper Name: trollstoreroothelper -Version: 1.4 +Version: 1.4.1 Architecture: iphoneos-arm Description: An awesome tool of some sort!! Maintainer: opa334 diff --git a/RootHelper/main.m b/RootHelper/main.m index 403c866..1787505 100644 --- a/RootHelper/main.m +++ b/RootHelper/main.m @@ -20,6 +20,8 @@ #define MAIN_NAME main #endif +void cleanRestrictions(void); + extern mach_msg_return_t SBReloadIconForIdentifier(mach_port_t machport, const char* identifier); @interface SBSHomeScreenService : NSObject - (void)reloadIcons; @@ -717,6 +719,7 @@ int uninstallApp(NSString* appPath, NSString* appId) // (Hopefully this never happens) deleteSuc = [[NSFileManager defaultManager] removeItemAtPath:[appPath stringByDeletingLastPathComponent] error:nil]; registerPath((char*)appPath.fileSystemRepresentation, 1, YES); + return 0; } if(appId) @@ -726,6 +729,7 @@ int uninstallApp(NSString* appPath, NSString* appId) if(deleteSuc) { + cleanRestrictions(); return 0; } else @@ -762,6 +766,8 @@ int uninstallAppById(NSString* appId) int installIpa(NSString* ipaPath, BOOL force) { + cleanRestrictions(); + if(![[NSFileManager defaultManager] fileExistsAtPath:ipaPath]) return 166; BOOL suc = NO; @@ -1055,6 +1061,8 @@ void cleanRestrictions(void) clientTruthDictionaryM[@"com.apple.lsd.appremoval"][@"clientRestrictions"][@"union"][@"removedSystemAppBundleIDs"][@"values"] = valuesArrM; [clientTruthDictionaryM writeToURL:clientTruthURL error:nil]; + + killall(@"profiled", NO); // profiled needs to restart for the changes to apply } int MAIN_NAME(int argc, char *argv[], char *envp[]) @@ -1116,7 +1124,7 @@ int MAIN_NAME(int argc, char *argv[], char *envp[]) cleanRestrictions(); [[LSApplicationWorkspace defaultWorkspace] _LSPrivateRebuildApplicationDatabasesForSystemApps:YES internal:YES user:YES]; refreshAppRegistrations(); - killall(@"backboardd"); + killall(@"backboardd", YES); } else if([cmd isEqualToString:@"install-persistence-helper"]) { if(argc <= 2) return -3; diff --git a/RootHelper/uicache.m b/RootHelper/uicache.m index e7a149c..9b53d1e 100644 --- a/RootHelper/uicache.m +++ b/RootHelper/uicache.m @@ -138,7 +138,7 @@ void registerPath(char* cPath, int unregister, BOOL system) dictToRegister[@"Container"] = containerPath; dictToRegister[@"EnvironmentVariables"] = constructEnvironmentVariablesForContainerPath(containerPath); } - dictToRegister[@"IsDeletable"] = @(![appBundleID isEqualToString:@"com.opa334.TrollStore"]); + dictToRegister[@"IsDeletable"] = @NO; dictToRegister[@"Path"] = path; dictToRegister[@"IsContainerized"] = @(constructContainerizationForEntitlements(entitlements)); dictToRegister[@"SignerOrganization"] = @"Apple Inc."; diff --git a/Shared/TSUtil.h b/Shared/TSUtil.h index 1fc0bcc..b52d6e7 100644 --- a/Shared/TSUtil.h +++ b/Shared/TSUtil.h @@ -10,7 +10,7 @@ extern NSString* rootHelperPath(void); extern NSString* getNSStringFromFile(int fd); extern void printMultilineNSString(NSString* stringToPrint); extern int spawnRoot(NSString* path, NSArray* args, NSString** stdOut, NSString** stdErr); -extern void killall(NSString* processName); +extern void killall(NSString* processName, BOOL softly); extern void respring(void); extern void fetchLatestTrollStoreVersion(void (^completionHandler)(NSString* latestVersion)); diff --git a/Shared/TSUtil.m b/Shared/TSUtil.m index a6617e4..85c115a 100644 --- a/Shared/TSUtil.m +++ b/Shared/TSUtil.m @@ -204,20 +204,27 @@ void enumerateProcessesUsingBlock(void (^enumerator)(pid_t pid, NSString* execut free(info); } -void killall(NSString* processName) +void killall(NSString* processName, BOOL softly) { enumerateProcessesUsingBlock(^(pid_t pid, NSString* executablePath, BOOL* stop) { if([executablePath.lastPathComponent isEqualToString:processName]) { - kill(pid, SIGTERM); + if(softly) + { + kill(pid, SIGTERM); + } + else + { + kill(pid, SIGKILL); + } } }); } void respring(void) { - killall(@"SpringBoard"); + killall(@"SpringBoard", YES); exit(0); } diff --git a/TrollHelper/Resources/Info.plist b/TrollHelper/Resources/Info.plist index 13e385b..c041a83 100644 --- a/TrollHelper/Resources/Info.plist +++ b/TrollHelper/Resources/Info.plist @@ -52,7 +52,7 @@ iPhoneOS CFBundleVersion - 1.4 + 1.4.1 LSRequiresIPhoneOS UIDeviceFamily diff --git a/TrollHelper/control b/TrollHelper/control index 54b263f..6e2a07f 100644 --- a/TrollHelper/control +++ b/TrollHelper/control @@ -1,6 +1,6 @@ Package: com.opa334.trollstorehelper Name: TrollStore Helper -Version: 1.4 +Version: 1.4.1 Architecture: iphoneos-arm Description: Helper utility to install and manage TrollStore! Maintainer: opa334 diff --git a/TrollStore/Resources/Info.plist b/TrollStore/Resources/Info.plist index e26a445..7ef32f2 100644 --- a/TrollStore/Resources/Info.plist +++ b/TrollStore/Resources/Info.plist @@ -50,7 +50,7 @@ iPhoneOS CFBundleVersion - 1.4 + 1.4.1 LSRequiresIPhoneOS UIDeviceFamily diff --git a/TrollStore/control b/TrollStore/control index 264d020..d37db42 100644 --- a/TrollStore/control +++ b/TrollStore/control @@ -1,6 +1,6 @@ Package: com.opa334.trollstore Name: TrollStore -Version: 1.4 +Version: 1.4.1 Architecture: iphoneos-arm Description: An awesome application! Maintainer: opa334