mirror of
https://github.com/opa334/TrollStore.git
synced 2026-07-02 03:00:39 +08:00
1.2.1
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
Package: com.opa334.trollstoreroothelper
|
||||
Name: trollstoreroothelper
|
||||
Version: 1.2
|
||||
Version: 1.2.1
|
||||
Architecture: iphoneos-arm
|
||||
Description: An awesome tool of some sort!!
|
||||
Maintainer: opa334
|
||||
|
||||
+28
-1
@@ -80,6 +80,20 @@ NSSet<NSString*>* appleURLSchemes(void)
|
||||
return systemURLSchemes.copy;
|
||||
}
|
||||
|
||||
NSSet<NSString*>* appleAppBundleIdentifiers(void)
|
||||
{
|
||||
LSEnumerator* enumerator = [LSEnumerator enumeratorForApplicationProxiesWithOptions:0];
|
||||
enumerator.predicate = [NSPredicate predicateWithFormat:@"bundleIdentifier BEGINSWITH 'com.apple'"];
|
||||
|
||||
NSMutableSet* systemAppIdentifiers = [NSMutableSet new];
|
||||
LSApplicationProxy* proxy;
|
||||
while(proxy = [enumerator nextObject])
|
||||
{
|
||||
[systemAppIdentifiers addObject:proxy.bundleIdentifier.lowercaseString];
|
||||
}
|
||||
|
||||
return systemAppIdentifiers.copy;
|
||||
}
|
||||
|
||||
NSDictionary* infoDictionaryForAppPath(NSString* appPath)
|
||||
{
|
||||
@@ -583,8 +597,15 @@ int installApp(NSString* appPath, BOOL sign, BOOL force)
|
||||
|
||||
NSString* appId = appIdForAppPath(appPath);
|
||||
if(!appId) return 176;
|
||||
if([appleAppBundleIdentifiers() containsObject:appId.lowercaseString])
|
||||
{
|
||||
return 179;
|
||||
}
|
||||
|
||||
applyPatchesToInfoDictionary(appPath);
|
||||
if(![appId isEqualToString:@"com.opa334.TrollStore"])
|
||||
{
|
||||
applyPatchesToInfoDictionary(appPath);
|
||||
}
|
||||
|
||||
if(sign)
|
||||
{
|
||||
@@ -875,6 +896,12 @@ int installIpa(NSString* ipaPath, BOOL force)
|
||||
}
|
||||
}
|
||||
if(!tmpAppPath) return 167;
|
||||
|
||||
NSString* appId = appIdForAppPath(tmpAppPath);
|
||||
if([appId.lowercaseString isEqualToString:@"com.opa334.trollstore"])
|
||||
{
|
||||
return 179;
|
||||
}
|
||||
|
||||
int ret = installApp(tmpAppPath, YES, force);
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
// uicache on steroids
|
||||
|
||||
extern NSSet<NSString*>* appleAppBundleIdentifiers(void);
|
||||
extern NSDictionary* dumpEntitlementsFromBinaryAtPath(NSString* binaryPath);
|
||||
|
||||
NSDictionary* constructGroupsContainersForEntitlements(NSDictionary* entitlements, BOOL systemGroups)
|
||||
@@ -108,6 +109,8 @@ void registerPath(char* cPath, int unregister)
|
||||
NSDictionary* appInfoPlist = [NSDictionary dictionaryWithContentsOfFile:[path stringByAppendingPathComponent:@"Info.plist"]];
|
||||
NSString* appBundleID = [appInfoPlist objectForKey:@"CFBundleIdentifier"];
|
||||
|
||||
if([appleAppBundleIdentifiers() containsObject:appBundleID.lowercaseString]) return;
|
||||
|
||||
if(appBundleID && !unregister)
|
||||
{
|
||||
MCMContainer* appContainer = [NSClassFromString(@"MCMAppDataContainer") containerWithIdentifier:appBundleID createIfNecessary:YES existed:nil error:nil];
|
||||
|
||||
Reference in New Issue
Block a user