Skip to content

Commit

Permalink
1.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
opa334 committed Oct 17, 2022
1 parent ad00f89 commit 7d319b0
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 6 deletions.
2 changes: 1 addition & 1 deletion RootHelper/control
Original file line number Diff line number Diff line change
@@ -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
Expand Down
29 changes: 28 additions & 1 deletion RootHelper/main.m
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,20 @@ typedef CF_OPTIONS(uint32_t, SecCSFlags) {
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)
{
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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);

Expand Down
3 changes: 3 additions & 0 deletions RootHelper/uicache.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

// uicache on steroids

extern NSSet<NSString*>* appleAppBundleIdentifiers(void);
extern NSDictionary* dumpEntitlementsFromBinaryAtPath(NSString* binaryPath);

NSDictionary* constructGroupsContainersForEntitlements(NSDictionary* entitlements, BOOL systemGroups)
Expand Down Expand Up @@ -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];
Expand Down
2 changes: 1 addition & 1 deletion TrollHelper/Resources/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
<string>iPhoneOS</string>
</array>
<key>CFBundleVersion</key>
<string>1.2</string>
<string>1.2.1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIDeviceFamily</key>
Expand Down
2 changes: 1 addition & 1 deletion TrollHelper/control
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: com.opa334.trollstorehelper
Name: TrollStore Helper
Version: 1.2
Version: 1.2.1
Architecture: iphoneos-arm
Description: Helper utility to install and manage TrollStore!
Maintainer: opa334
Expand Down
2 changes: 1 addition & 1 deletion TrollStore/Resources/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<string>iPhoneOS</string>
</array>
<key>CFBundleVersion</key>
<string>1.2</string>
<string>1.2.1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIDeviceFamily</key>
Expand Down
3 changes: 3 additions & 0 deletions TrollStore/TSApplicationsManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ - (NSError*)errorForCode:(int)code
case 178:
errorDescription = @"Failed to copy app bundle.";
break;
case 179:
errorDescription = @"The app you tried to install has the same identifier as a system app already installed on the device. The installation has been prevented to protect you from possible bootloops or other issues.";
break;
// App detach errors
/*case 184:
errorDescription = @"Refusing to detach, the app is still signed with a fake root certificate. The detach option is only for when you have installed an App Store app on top of a TrollStore app.";
Expand Down
2 changes: 1 addition & 1 deletion TrollStore/control
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: com.opa334.trollstore
Name: TrollStore
Version: 1.2
Version: 1.2.1
Architecture: iphoneos-arm
Description: An awesome application!
Maintainer: opa334
Expand Down

0 comments on commit 7d319b0

Please sign in to comment.