mirror of
https://github.com/opa334/TrollStore.git
synced 2026-07-02 11:17:51 +08:00
1.1.1
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
Package: com.opa334.trollstoreroothelper
|
||||
Name: trollstoreroothelper
|
||||
Version: 1.1
|
||||
Version: 1.1.1
|
||||
Architecture: iphoneos-arm
|
||||
Description: An awesome tool of some sort!!
|
||||
Maintainer: opa334
|
||||
|
||||
+32
-30
@@ -772,41 +772,44 @@ int installApp(NSString* appPath, BOOL sign, BOOL force)
|
||||
|
||||
int uninstallApp(NSString* appPath, NSString* appId)
|
||||
{
|
||||
BKSTerminateApplicationForReasonAndReportWithDescription(appId, 5, false, @"TrollStore - App uninstalled");
|
||||
|
||||
LSApplicationProxy* appProxy = [LSApplicationProxy applicationProxyForIdentifier:appId];
|
||||
MCMContainer *appContainer = [objc_getClass("MCMAppDataContainer") containerWithIdentifier:appId createIfNecessary:NO existed:nil error:nil];
|
||||
NSString *containerPath = [appContainer url].path;
|
||||
if(containerPath)
|
||||
if(appId)
|
||||
{
|
||||
NSLog(@"[uninstallApp] deleting %@", containerPath);
|
||||
// delete app container path
|
||||
[[NSFileManager defaultManager] removeItemAtPath:containerPath error:nil];
|
||||
}
|
||||
BKSTerminateApplicationForReasonAndReportWithDescription(appId, 5, false, @"TrollStore - App uninstalled");
|
||||
|
||||
// delete group container paths
|
||||
[[appProxy groupContainerURLs] enumerateKeysAndObjectsUsingBlock:^(NSString* groupId, NSURL* groupURL, BOOL* stop)
|
||||
{
|
||||
// If another app still has this group, don't delete it
|
||||
NSArray<LSApplicationProxy*>* appsWithGroup = applicationsWithGroupId(groupId);
|
||||
if(appsWithGroup.count > 1)
|
||||
LSApplicationProxy* appProxy = [LSApplicationProxy applicationProxyForIdentifier:appId];
|
||||
MCMContainer *appContainer = [objc_getClass("MCMAppDataContainer") containerWithIdentifier:appId createIfNecessary:NO existed:nil error:nil];
|
||||
NSString *containerPath = [appContainer url].path;
|
||||
if(containerPath)
|
||||
{
|
||||
NSLog(@"[uninstallApp] not deleting %@, appsWithGroup.count:%lu", groupURL, appsWithGroup.count);
|
||||
return;
|
||||
NSLog(@"[uninstallApp] deleting %@", containerPath);
|
||||
// delete app container path
|
||||
[[NSFileManager defaultManager] removeItemAtPath:containerPath error:nil];
|
||||
}
|
||||
|
||||
NSLog(@"[uninstallApp] deleting %@", groupURL);
|
||||
[[NSFileManager defaultManager] removeItemAtURL:groupURL error:nil];
|
||||
}];
|
||||
|
||||
// delete app plugin paths
|
||||
for(LSPlugInKitProxy* pluginProxy in appProxy.plugInKitPlugins)
|
||||
{
|
||||
NSURL* pluginURL = pluginProxy.dataContainerURL;
|
||||
if(pluginURL)
|
||||
// delete group container paths
|
||||
[[appProxy groupContainerURLs] enumerateKeysAndObjectsUsingBlock:^(NSString* groupId, NSURL* groupURL, BOOL* stop)
|
||||
{
|
||||
NSLog(@"[uninstallApp] deleting %@", pluginURL);
|
||||
[[NSFileManager defaultManager] removeItemAtURL:pluginURL error:nil];
|
||||
// If another app still has this group, don't delete it
|
||||
NSArray<LSApplicationProxy*>* appsWithGroup = applicationsWithGroupId(groupId);
|
||||
if(appsWithGroup.count > 1)
|
||||
{
|
||||
NSLog(@"[uninstallApp] not deleting %@, appsWithGroup.count:%lu", groupURL, appsWithGroup.count);
|
||||
return;
|
||||
}
|
||||
|
||||
NSLog(@"[uninstallApp] deleting %@", groupURL);
|
||||
[[NSFileManager defaultManager] removeItemAtURL:groupURL error:nil];
|
||||
}];
|
||||
|
||||
// delete app plugin paths
|
||||
for(LSPlugInKitProxy* pluginProxy in appProxy.plugInKitPlugins)
|
||||
{
|
||||
NSURL* pluginURL = pluginProxy.dataContainerURL;
|
||||
if(pluginURL)
|
||||
{
|
||||
NSLog(@"[uninstallApp] deleting %@", pluginURL);
|
||||
[[NSFileManager defaultManager] removeItemAtURL:pluginURL error:nil];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -855,7 +858,6 @@ int uninstallAppByPath(NSString* appPath)
|
||||
{
|
||||
if(!appPath) return 1;
|
||||
NSString* appId = appIdForAppPath(appPath);
|
||||
if(!appId) return 1;
|
||||
return uninstallApp(appPath, appId);
|
||||
}
|
||||
|
||||
|
||||
@@ -52,6 +52,7 @@ BOOL constructContainerizationForEntitlements(NSDictionary* entitlements)
|
||||
{
|
||||
if(noContainer.boolValue)
|
||||
{
|
||||
NSLog(@"constructContainerizationForEntitlements NO com.apple.private.security.no-container");
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
@@ -61,10 +62,12 @@ BOOL constructContainerizationForEntitlements(NSDictionary* entitlements)
|
||||
{
|
||||
if(!containerRequired.boolValue)
|
||||
{
|
||||
NSLog(@"constructContainerizationForEntitlements NO com.apple.private.security.container-required");
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
|
||||
NSLog(@"constructContainerizationForEntitlements YES");
|
||||
return YES;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user