diff --git a/ChOma b/ChOma index defd14b0..964023dd 160000 --- a/ChOma +++ b/ChOma @@ -1 +1 @@ -Subproject commit defd14b0a3303aea7f345b6305619dd390176098 +Subproject commit 964023ddac2286ef8e843f90df64d44ac6a673df diff --git a/Makefile b/Makefile index 7b62de60..e548f156 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ TOPTARGETS := all clean update -$(TOPTARGETS): pre_build make_fastPathSign make_roothelper make_trollstore make_trollhelper_embedded make_trollhelper_package assemble_trollstore build_installer15 build_installer64e +$(TOPTARGETS): pre_build make_fastPathSign make_roothelper make_trollstore make_trollhelper_embedded make_trollhelper_package assemble_trollstore build_installer15 build_installer64e make_trollstore_lite pre_build: @rm -rf ./_build 2>/dev/null || true @@ -10,7 +10,7 @@ make_fastPathSign: @$(MAKE) -C ./Exploits/fastPathSign $(MAKECMDGOALS) make_roothelper: - @$(MAKE) -C ./RootHelper FINALPACKAGE=1 $(MAKECMDGOALS) + @$(MAKE) -C ./RootHelper DEBUG=0 $(MAKECMDGOALS) make_trollstore: @$(MAKE) -C ./TrollStore FINALPACKAGE=1 $(MAKECMDGOALS) @@ -73,6 +73,21 @@ build_installer64e: popd @rm -rf ./_build/tmp64e +make_trollstore_lite: + @$(MAKE) -C ./RootHelper DEBUG=0 TROLLSTORE_LITE=1 + @rm -rf ./TrollStoreLite/Resources/trollstorehelper + @cp ./RootHelper/.theos/obj/trollstorehelper_lite ./TrollStoreLite/Resources/trollstorehelper + @$(MAKE) -C ./TrollStoreLite package FINALPACKAGE=1 + @$(MAKE) -C ./RootHelper TROLLSTORE_LITE=1 clean + @$(MAKE) -C ./TrollStoreLite clean + @$(MAKE) -C ./RootHelper DEBUG=0 TROLLSTORE_LITE=1 THEOS_PACKAGE_SCHEME=rootless + @rm -rf ./TrollStoreLite/Resources/trollstorehelper + @cp ./RootHelper/.theos/obj/trollstorehelper_lite ./TrollStoreLite/Resources/trollstorehelper + @$(MAKE) -C ./TrollStoreLite package FINALPACKAGE=1 THEOS_PACKAGE_SCHEME=rootless + +else +make_trollstore_lite: + @$(MAKE) -C ./TrollStoreLite $(MAKECMDGOALS) endif .PHONY: $(TOPTARGETS) pre_build assemble_trollstore make_trollhelper_package make_trollhelper_embedded build_installer15 build_installer64e \ No newline at end of file diff --git a/RootHelper/Makefile b/RootHelper/Makefile index 4a61650c..720c8f6f 100644 --- a/RootHelper/Makefile +++ b/RootHelper/Makefile @@ -1,19 +1,36 @@ TARGET := iphone:clang:16.5:14.0 ARCHS = arm64 +ifdef TROLLSTORE_LITE +HELPER_NAME = trollstorehelper_lite +else +HELPER_NAME = trollstorehelper TARGET_CODESIGN = ../Exploits/fastPathSign/fastPathSign +endif include $(THEOS)/makefiles/common.mk -TOOL_NAME = trollstorehelper +TOOL_NAME = $(HELPER_NAME) -trollstorehelper_FILES = $(wildcard *.m) $(wildcard ../Shared/*.m) $(wildcard ../ChOma/src/*.c) ../Exploits/fastPathSign/src/coretrust_bug.c ../Exploits/fastPathSign/src/codesign.m -trollstorehelper_CFLAGS = -fobjc-arc -I../Shared $(shell pkg-config --cflags libcrypto) -I../ChOma/src -I../Exploits/fastPathSign/src -I$(shell brew --prefix)/opt/libarchive/include -trollstorehelper_LDFLAGS = -L../ChOma/external/ios -lcrypto -trollstorehelper_CODESIGN_FLAGS = --entitlements entitlements.plist -trollstorehelper_INSTALL_PATH = /usr/local/bin -trollstorehelper_LIBRARIES = archive -trollstorehelper_FRAMEWORKS = CoreTelephony -trollstorehelper_PRIVATE_FRAMEWORKS = SpringBoardServices BackBoardServices MobileContainerManager FrontBoardServices RunningBoardServices +$(HELPER_NAME)_FILES = $(wildcard *.m) $(wildcard ../Shared/*.m) $(wildcard ../ChOma/src/*.c) + +ifndef TROLLSTORE_LITE +$(HELPER_NAME)_FILES += ../Exploits/fastPathSign/src/coretrust_bug.c ../Exploits/fastPathSign/src/codesign.m +$(HELPER_NAME)_CODESIGN_FLAGS = --entitlements entitlements.plist +$(HELPER_NAME)_LDFLAGS = -L../ChOma/external/ios -lcrypto +else +$(HELPER_NAME)_CODESIGN_FLAGS = -Sentitlements.plist +endif + +$(HELPER_NAME)_CFLAGS = -fobjc-arc -I../Shared $(shell pkg-config --cflags libcrypto) -I../ChOma/src -I../Exploits/fastPathSign/src -I$(shell brew --prefix)/opt/libarchive/include + +$(HELPER_NAME)_INSTALL_PATH = /usr/local/bin +$(HELPER_NAME)_LIBRARIES = archive +$(HELPER_NAME)_FRAMEWORKS = CoreTelephony +$(HELPER_NAME)_PRIVATE_FRAMEWORKS = SpringBoardServices BackBoardServices MobileContainerManager FrontBoardServices RunningBoardServices + +ifdef TROLLSTORE_LITE +$(HELPER_NAME)_CFLAGS += -DTROLLSTORE_LITE -DDISABLE_SIGNING=1 +endif include $(THEOS_MAKE_PATH)/tool.mk diff --git a/RootHelper/control b/RootHelper/control index 57991868..52288b18 100644 --- a/RootHelper/control +++ b/RootHelper/control @@ -1,6 +1,6 @@ Package: com.opa334.trollstoreroothelper Name: trollstoreroothelper -Version: 2.0.15 +Version: 2.1 Architecture: iphoneos-arm Description: An awesome tool of some sort!! Maintainer: opa334 diff --git a/RootHelper/main.m b/RootHelper/main.m index 8e3e6daf..9160b78c 100644 --- a/RootHelper/main.m +++ b/RootHelper/main.m @@ -24,6 +24,7 @@ #import #import #import +#import #ifdef EMBEDDED_ROOT_HELPER #define MAIN_NAME rootHelperMain @@ -243,6 +244,21 @@ void setTSURLSchemeState(BOOL newState, NSString* customAppPath) } } +#ifdef TROLLSTORE_LITE + +BOOL isLdidInstalled(void) +{ + // Since TrollStore Lite depends on ldid, we assume it exists + return YES; +} + +NSString *getLdidPath(void) +{ + return JBROOT_PATH(@"/usr/bin/ldid"); +} + +#else + void installLdid(NSString* ldidToCopyPath, NSString* ldidVersion) { if(![[NSFileManager defaultManager] fileExistsAtPath:ldidToCopyPath]) return; @@ -270,9 +286,16 @@ BOOL isLdidInstalled(void) return [[NSFileManager defaultManager] fileExistsAtPath:ldidPath]; } +NSString *getLdidPath(void) +{ + return [trollStoreAppPath() stringByAppendingPathComponent:@"ldid"]; +} + +#endif + int runLdid(NSArray* args, NSString** output, NSString** errorOutput) { - NSString* ldidPath = [trollStoreAppPath() stringByAppendingPathComponent:@"ldid"]; + NSString* ldidPath = getLdidPath(); NSMutableArray* argsM = args.mutableCopy ?: [NSMutableArray new]; [argsM insertObject:ldidPath.lastPathComponent atIndex:0]; @@ -300,6 +323,7 @@ int runLdid(NSArray* args, NSString** output, NSString** errorOutput) pid_t task_pid; int status = -200; + NSLog(@"About to spawn ldid (%@) with args %@", ldidPath, args); int spawnError = posix_spawn(&task_pid, [ldidPath fileSystemRepresentation], &action, NULL, (char* const*)argsC, NULL); for (NSUInteger i = 0; i < argCount; i++) { @@ -309,7 +333,7 @@ int runLdid(NSArray* args, NSString** output, NSString** errorOutput) if(spawnError != 0) { - NSLog(@"posix_spawn error %d\n", spawnError); + NSLog(@"ldid failed to spawn with error %d (%s)\n", spawnError, strerror(spawnError)); return spawnError; } @@ -535,6 +559,7 @@ int signApp(NSString* appPath) if(![[NSFileManager defaultManager] fileExistsAtPath:mainExecutablePath]) return 174; +#ifndef TROLLSTORE_LITE // Check if the bundle has had a supported exploit pre-applied EXPLOIT_TYPE declaredPreAppliedExploitType = getDeclaredExploitTypeFromInfoDictionary(appInfoDict); if(isPlatformVulnerableToExploitType(declaredPreAppliedExploitType)) @@ -570,6 +595,7 @@ int signApp(NSString* appPath) // On iOS 16+, binaries with certain entitlements requires developer mode to be enabled, so we'll check // while we're fixing entitlements BOOL requiresDevMode = NO; +#endif // The majority of IPA decryption utilities only decrypt the main executable of the app bundle // As a result, we cannot bail on the entire app if an additional binary is encrypted (e.g. app extensions) @@ -592,6 +618,7 @@ int signApp(NSString* appPath) NSString *bundleId = infoDict[@"CFBundleIdentifier"]; NSString *bundleExecutable = infoDict[@"CFBundleExecutable"]; if (!bundleId || !bundleExecutable) continue; + if ([bundleId isEqualToString:@""] || [bundleExecutable isEqualToString:@""]) continue; NSString *bundleMainExecutablePath = [[filePath stringByDeletingLastPathComponent] stringByAppendingPathComponent:bundleExecutable]; if (![[NSFileManager defaultManager] fileExistsAtPath:bundleMainExecutablePath]) continue; @@ -620,6 +647,7 @@ int signApp(NSString* appPath) if (!entitlementsToUse) entitlementsToUse = [NSMutableDictionary new]; +#ifndef TROLLSTORE_LITE // Developer mode does not exist before iOS 16 if (@available(iOS 16, *)){ if (!requiresDevMode) { @@ -664,15 +692,25 @@ int signApp(NSString* appPath) entitlementsToUse[@"com.apple.private.security.container-required"] = bundleId; } } - signAdhoc(bundleMainExecutablePath, entitlementsToUse); +#else + // Since TrollStore Lite adhoc signs stuff, this means that on PMAP_CS devices, it will run with "PMAP_CS_IN_LOADED_TRUST_CACHE" trust level + // We need to overwrite it so that the app runs as expected (Dopamine 2.1.5+ feature) + entitlementsToUse[@"jb.pmap_cs_custom_trust"] = @"PMAP_CS_APP_STORE"; +#endif + + int r = signAdhoc(bundleMainExecutablePath, entitlementsToUse); + if (r != 0) return r; } } // All entitlement related issues should be fixed at this point, so all we need to do is sign the entire bundle // And then apply the CoreTrust bypass to all executables // XXX: This only works because we're using ldid at the moment and that recursively signs everything - signAdhoc(appPath, nil); + int r = signAdhoc(appPath, nil); + if (r != 0) return r; +#ifndef TROLLSTORE_LITE + // Apply CoreTrust bypass enumerator = [[NSFileManager defaultManager] enumeratorAtURL:[NSURL fileURLWithPath:appPath] includingPropertiesForKeys:nil options:0 errorHandler:nil]; while(fileURL = [enumerator nextObject]) { @@ -731,6 +769,35 @@ int signApp(NSString* appPath) // Postpone trying to enable dev mode until after the app is (successfully) installed return 182; } +#else // TROLLSTORE_LITE + // Just check for whether anything is fairplay encrypted + enumerator = [[NSFileManager defaultManager] enumeratorAtURL:[NSURL fileURLWithPath:appPath] includingPropertiesForKeys:nil options:0 errorHandler:nil]; + while(fileURL = [enumerator nextObject]) + { + NSString *filePath = fileURL.path; + FAT *fat = fat_init_from_path(filePath.fileSystemRepresentation); + if (fat) { + NSLog(@"%@ is binary", filePath); + MachO *macho = fat_find_preferred_slice(fat); + if (macho) { + if (macho_is_encrypted(macho)) { + NSLog(@"[%@] Cannot apply CoreTrust bypass on an encrypted binary!", filePath); + if (isSameFile(filePath, mainExecutablePath)) { + // If this is the main binary, this error is fatal + NSLog(@"[%@] Main binary is encrypted, cannot continue!", filePath); + fat_free(fat); + return 180; + } + else { + // If not, we can continue but want to show a warning after the app is installed + hasAdditionalEncryptedBinaries = YES; + } + } + } + fat_free(fat); + } + } +#endif if (hasAdditionalEncryptedBinaries) { return 184; @@ -852,12 +919,19 @@ int installApp(NSString* appPackagePath, BOOL sign, BOOL force, BOOL isTSUpdate, NSURL* appBundleURL = findAppURLInBundleURL(bundleContainerURL); // Make sure the installed app is a TrollStore app or the container is empty (or the force flag is set) - NSURL* trollStoreMarkURL = [bundleContainerURL URLByAppendingPathComponent:@"_TrollStore"]; + NSURL* trollStoreMarkURL = [bundleContainerURL URLByAppendingPathComponent:TS_ACTIVE_MARKER]; if(appBundleURL && ![trollStoreMarkURL checkResourceIsReachableAndReturnError:nil] && !force) { NSLog(@"[installApp] already installed and not a TrollStore app... bailing out"); return 171; } + else if (appBundleURL) { + // When overwriting an app that has been installed with a different TrollStore flavor, make sure to remove the marker of said flavor + NSURL *otherMarkerURL = [bundleContainerURL URLByAppendingPathComponent:TS_INACTIVE_MARKER]; + if ([otherMarkerURL checkResourceIsReachableAndReturnError:nil]) { + [[NSFileManager defaultManager] removeItemAtURL:otherMarkerURL error:nil]; + } + } // Terminate app if it's still running if(!isTSUpdate) @@ -963,7 +1037,7 @@ int installApp(NSString* appPackagePath, BOOL sign, BOOL force, BOOL isTSUpdate, appContainer = [MCMAppContainer containerWithIdentifier:appId createIfNecessary:NO existed:nil error:nil]; // Mark app as TrollStore app - NSURL* trollStoreMarkURL = [appContainer.url URLByAppendingPathComponent:@"_TrollStore"]; + NSURL* trollStoreMarkURL = [appContainer.url URLByAppendingPathComponent:TS_ACTIVE_MARKER]; if(![[NSFileManager defaultManager] fileExistsAtPath:trollStoreMarkURL.path]) { NSError* creationError; @@ -981,7 +1055,7 @@ int installApp(NSString* appPackagePath, BOOL sign, BOOL force, BOOL isTSUpdate, NSURL* updatedAppURL = findAppURLInBundleURL(appContainer.url); fixPermissionsOfAppBundle(updatedAppURL.path); if (!skipUICache) { - if (!registerPath(updatedAppURL.path, 0, YES)) { + if (!registerPath(updatedAppURL.path, 0, !shouldRegisterAsUserByDefault())) { [[NSFileManager defaultManager] removeItemAtURL:appContainer.url error:nil]; return 181; } @@ -1492,6 +1566,105 @@ int MAIN_NAME(int argc, char *argv[], char *envp[]) NSString* appPath = args.lastObject; ret = uninstallAppByPath(appPath, useCustomMethod); } + else if([cmd isEqualToString:@"refresh"]) + { + refreshAppRegistrations(!shouldRegisterAsUserByDefault()); + } + else if([cmd isEqualToString:@"refresh-all"]) + { + cleanRestrictions(); + //refreshAppRegistrations(NO); // <- fixes app permissions resetting, causes apps to move around on home screen, so I had to disable it + [[NSFileManager defaultManager] removeItemAtPath:@"/var/containers/Shared/SystemGroup/systemgroup.com.apple.lsd.iconscache/Library/Caches/com.apple.IconsCache" error:nil]; + [[LSApplicationWorkspace defaultWorkspace] _LSPrivateRebuildApplicationDatabasesForSystemApps:YES internal:YES user:YES]; + if (!shouldRegisterAsUserByDefault()) refreshAppRegistrations(YES); + killall(@"backboardd", YES); + } + else if([cmd isEqualToString:@"url-scheme"]) + { + if(args.count < 2) return -3; + NSString* modifyArg = args.lastObject; + BOOL newState = [modifyArg isEqualToString:@"enable"]; + if(newState == YES || [modifyArg isEqualToString:@"disable"]) + { + setTSURLSchemeState(newState, nil); + } + } + else if([cmd isEqualToString:@"reboot"]) + { + [[FBSSystemService sharedService] reboot]; + // Give the system some time to reboot + sleep(1); + } + else if([cmd isEqualToString:@"enable-jit"]) + { + if(args.count < 2) return -3; + NSString* userAppId = args.lastObject; + ret = enableJIT(userAppId); + } + else if([cmd isEqualToString:@"modify-registration"]) + { + if(args.count < 3) return -3; + NSString* appPath = args[1]; + NSString* newRegistration = args[2]; + + NSString* trollStoreMark = [[appPath stringByDeletingLastPathComponent] stringByAppendingPathComponent:TS_ACTIVE_MARKER]; + if([[NSFileManager defaultManager] fileExistsAtPath:trollStoreMark]) + { + registerPath(appPath, NO, [newRegistration isEqualToString:@"System"]); + } + } + else if ([cmd isEqualToString:@"transfer-apps"]) + { + bool oneFailed = false; + for (NSString *appBundlePath in trollStoreInactiveInstalledAppBundlePaths()) { + NSLog(@"Transfering %@...", appBundlePath); + + // Ldid lacks the entitlement to sign in place + // So copy to /tmp, resign, then replace >.< + NSString *tmpPath = [NSTemporaryDirectory() stringByAppendingPathComponent:[NSUUID UUID].UUIDString]; + if (![[NSFileManager defaultManager] createDirectoryAtPath:tmpPath withIntermediateDirectories:YES attributes:nil error:nil]) return -3; + + NSString *tmpAppPath = [tmpPath stringByAppendingPathComponent:appBundlePath.lastPathComponent]; + if (![[NSFileManager defaultManager] copyItemAtPath:appBundlePath toPath:tmpAppPath error:nil]) { + [[NSFileManager defaultManager] removeItemAtPath:tmpPath error:nil]; + oneFailed = true; + continue; + } + + NSLog(@"Copied %@ to %@", appBundlePath, tmpAppPath); + + int signRet = signApp(tmpAppPath); + NSLog(@"Signing %@ returned %d", tmpAppPath, signRet); + + if (signRet == 0 || signRet == 182 || signRet == 184) { // Either 0 or non fatal error codes are fine + [[NSFileManager defaultManager] removeItemAtPath:appBundlePath error:nil]; + [[NSFileManager defaultManager] moveItemAtPath:tmpAppPath toPath:appBundlePath error:nil]; + [[NSFileManager defaultManager] removeItemAtPath:tmpPath error:nil]; + } + else { + [[NSFileManager defaultManager] removeItemAtPath:tmpPath error:nil]; + oneFailed = true; + continue; + } + + fixPermissionsOfAppBundle(appBundlePath); + + NSString *containerPath = [appBundlePath stringByDeletingLastPathComponent]; + NSString *activeMarkerPath = [containerPath stringByAppendingPathComponent:TS_ACTIVE_MARKER]; + NSString *inactiveMarkerPath = [containerPath stringByAppendingPathComponent:TS_INACTIVE_MARKER]; + + NSData* emptyData = [NSData data]; + [emptyData writeToFile:activeMarkerPath options:0 error:nil]; + + [[NSFileManager defaultManager] removeItemAtPath:inactiveMarkerPath error:nil]; + + registerPath(appBundlePath, 0, !shouldRegisterAsUserByDefault()); + + NSLog(@"Transfered %@!", appBundlePath); + } + if (oneFailed) ret = -1; + } +#ifndef TROLLSTORE_LITE else if([cmd isEqualToString:@"install-trollstore"]) { if(args.count < 2) return -3; @@ -1516,19 +1689,6 @@ int MAIN_NAME(int argc, char *argv[], char *envp[]) installLdid(ldidPath, ldidVersion); //} } - else if([cmd isEqualToString:@"refresh"]) - { - refreshAppRegistrations(YES); - } - else if([cmd isEqualToString:@"refresh-all"]) - { - cleanRestrictions(); - //refreshAppRegistrations(NO); // <- fixes app permissions resetting, causes apps to move around on home screen, so I had to disable it - [[NSFileManager defaultManager] removeItemAtPath:@"/var/containers/Shared/SystemGroup/systemgroup.com.apple.lsd.iconscache/Library/Caches/com.apple.IconsCache" error:nil]; - [[LSApplicationWorkspace defaultWorkspace] _LSPrivateRebuildApplicationDatabasesForSystemApps:YES internal:YES user:YES]; - refreshAppRegistrations(YES); - killall(@"backboardd", YES); - } else if([cmd isEqualToString:@"install-persistence-helper"]) { if(args.count < 2) return -3; @@ -1552,28 +1712,6 @@ int MAIN_NAME(int argc, char *argv[], char *envp[]) NSString* userAppId = args.lastObject; registerUserPersistenceHelper(userAppId); } - else if([cmd isEqualToString:@"modify-registration"]) - { - if(args.count < 3) return -3; - NSString* appPath = args[1]; - NSString* newRegistration = args[2]; - - NSString* trollStoreMark = [[appPath stringByDeletingLastPathComponent] stringByAppendingPathComponent:@"_TrollStore"]; - if([[NSFileManager defaultManager] fileExistsAtPath:trollStoreMark]) - { - registerPath(appPath, NO, [newRegistration isEqualToString:@"System"]); - } - } - else if([cmd isEqualToString:@"url-scheme"]) - { - if(args.count < 2) return -3; - NSString* modifyArg = args.lastObject; - BOOL newState = [modifyArg isEqualToString:@"enable"]; - if(newState == YES || [modifyArg isEqualToString:@"disable"]) - { - setTSURLSchemeState(newState, nil); - } - } else if([cmd isEqualToString:@"check-dev-mode"]) { // switch the result, so 0 is enabled, and 1 is disabled/error @@ -1584,18 +1722,7 @@ int MAIN_NAME(int argc, char *argv[], char *envp[]) // assumes that checkDeveloperMode() has already been called ret = !armDeveloperMode(NULL); } - else if([cmd isEqualToString:@"reboot"]) - { - [[FBSSystemService sharedService] reboot]; - // Give the system some time to reboot - sleep(1); - } - else if([cmd isEqualToString:@"enable-jit"]) - { - if(args.count < 2) return -3; - NSString* userAppId = args.lastObject; - ret = enableJIT(userAppId); - } +#endif NSLog(@"trollstorehelper returning %d", ret); return ret; diff --git a/Shared/TSUtil.h b/Shared/TSUtil.h index d3c1195f..8da49aef 100644 --- a/Shared/TSUtil.h +++ b/Shared/TSUtil.h @@ -3,8 +3,28 @@ #define TrollStoreErrorDomain @"TrollStoreErrorDomain" +#define TS_MARKER @"_TrollStore" +#define TS_LITE_MARKER @"_TrollStoreLite" +#define TS_NAME @"TrollStore" +#define TS_LITE_NAME @"Trollstore Lite" + +#ifdef TROLLSTORE_LITE +#define TS_ACTIVE_MARKER TS_LITE_MARKER +#define TS_INACTIVE_MARKER TS_MARKER +#define APP_ID @"com.opa334.TrollStoreLite" +#define APP_NAME TS_LITE_NAME +#define OTHER_APP_NAME TS_NAME +#else +#define TS_ACTIVE_MARKER TS_MARKER +#define TS_INACTIVE_MARKER TS_LITE_MARKER +#define APP_ID @"com.opa334.TrollStore" +#define APP_NAME TS_NAME +#define OTHER_APP_NAME TS_LITE_NAME +#endif + extern void chineseWifiFixup(void); extern NSString *getExecutablePath(void); +extern BOOL shouldRegisterAsUserByDefault(void); extern NSString* rootHelperPath(void); extern NSString* getNSStringFromFile(int fd); extern void printMultilineNSString(NSString* stringToPrint); @@ -14,10 +34,11 @@ extern void respring(void); extern void fetchLatestTrollStoreVersion(void (^completionHandler)(NSString* latestVersion)); extern void fetchLatestLdidVersion(void (^completionHandler)(NSString* latestVersion)); -extern NSArray* trollStoreInstalledAppBundlePaths(); -extern NSArray* trollStoreInstalledAppContainerPaths(); -extern NSString* trollStorePath(); -extern NSString* trollStoreAppPath(); +extern NSArray* trollStoreInstalledAppBundlePaths(void); +extern NSArray* trollStoreInactiveInstalledAppBundlePaths(void); +extern NSArray* trollStoreInstalledAppContainerPaths(void); +extern NSString* trollStorePath(void); +extern NSString* trollStoreAppPath(void); extern BOOL isRemovableSystemApp(NSString* appId); diff --git a/Shared/TSUtil.m b/Shared/TSUtil.m index d4eb2c02..7ef755c8 100644 --- a/Shared/TSUtil.m +++ b/Shared/TSUtil.m @@ -4,6 +4,7 @@ #import #import #import +#import static EXPLOIT_TYPE gPlatformVulnerabilities; @@ -35,6 +36,25 @@ void chineseWifiFixup(void) return [NSString stringWithUTF8String:selfPath]; } +#ifdef TROLLSTORE_LITE + +BOOL shouldRegisterAsUserByDefault(void) +{ + if ([[NSFileManager defaultManager] fileExistsAtPath:JBROOT_PATH(@"/Library/MobileSubstrate/DynamicLibraries/AppSyncUnified-FrontBoard.dylib")]) { + return YES; + } + return NO; +} + +#else + +BOOL shouldRegisterAsUserByDefault(void) +{ + return NO; +} + +#endif + #ifdef EMBEDDED_ROOT_HELPER NSString* rootHelperPath(void) { @@ -315,7 +335,7 @@ void fetchLatestLdidVersion(void (^completionHandler)(NSString* latestVersion)) github_fetchLatestVersion(@"opa334/ldid", completionHandler); } -NSArray* trollStoreInstalledAppContainerPaths() +NSArray* trollStoreInstalledAppContainerPathsInternal(NSString *marker) { NSMutableArray* appContainerPaths = [NSMutableArray new]; @@ -336,11 +356,12 @@ void fetchLatestLdidVersion(void (^completionHandler)(NSString* latestVersion)) BOOL exists = [[NSFileManager defaultManager] fileExistsAtPath:containerPath isDirectory:&isDirectory]; if(exists && isDirectory) { - NSString* trollStoreMark = [containerPath stringByAppendingPathComponent:@"_TrollStore"]; + NSString* trollStoreMark = [containerPath stringByAppendingPathComponent:marker]; if([[NSFileManager defaultManager] fileExistsAtPath:trollStoreMark]) { NSString* trollStoreApp = [containerPath stringByAppendingPathComponent:@"TrollStore.app"]; - if(![[NSFileManager defaultManager] fileExistsAtPath:trollStoreApp]) + NSString* trollStoreLiteApp = [containerPath stringByAppendingPathComponent:@"TrollStoreLite.app"]; + if(![[NSFileManager defaultManager] fileExistsAtPath:trollStoreApp] && ![[NSFileManager defaultManager] fileExistsAtPath:trollStoreLiteApp]) { [appContainerPaths addObject:containerPath]; } @@ -351,10 +372,15 @@ void fetchLatestLdidVersion(void (^completionHandler)(NSString* latestVersion)) return appContainerPaths.copy; } -NSArray* trollStoreInstalledAppBundlePaths() +NSArray *trollStoreInstalledAppContainerPaths(void) +{ + return trollStoreInstalledAppContainerPathsInternal(TS_ACTIVE_MARKER); +} + +NSArray* trollStoreInstalledAppBundlePathsInternal(NSString *marker) { NSMutableArray* appPaths = [NSMutableArray new]; - for(NSString* containerPath in trollStoreInstalledAppContainerPaths()) + for(NSString* containerPath in trollStoreInstalledAppContainerPathsInternal(marker)) { NSArray* items = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:containerPath error:nil]; if(!items) return nil; @@ -370,10 +396,20 @@ void fetchLatestLdidVersion(void (^completionHandler)(NSString* latestVersion)) return appPaths.copy; } +NSArray *trollStoreInstalledAppBundlePaths(void) +{ + return trollStoreInstalledAppBundlePathsInternal(TS_ACTIVE_MARKER); +} + +NSArray *trollStoreInactiveInstalledAppBundlePaths(void) +{ + return trollStoreInstalledAppBundlePathsInternal(TS_INACTIVE_MARKER); +} + NSString* trollStorePath() { NSError* mcmError; - MCMAppContainer* appContainer = [MCMAppContainer containerWithIdentifier:@"com.opa334.TrollStore" createIfNecessary:NO existed:NULL error:&mcmError]; + MCMAppContainer* appContainer = [MCMAppContainer containerWithIdentifier:APP_ID createIfNecessary:NO existed:NULL error:&mcmError]; if(!appContainer) return nil; return appContainer.url.path; } diff --git a/TrollHelper/Resources/Info.plist b/TrollHelper/Resources/Info.plist index ceac008c..01f59de4 100644 --- a/TrollHelper/Resources/Info.plist +++ b/TrollHelper/Resources/Info.plist @@ -52,7 +52,7 @@ iPhoneOS CFBundleVersion - 2.0.15 + 2.1 LSRequiresIPhoneOS UIDeviceFamily diff --git a/TrollHelper/control b/TrollHelper/control index 12a6565f..3f5df205 100644 --- a/TrollHelper/control +++ b/TrollHelper/control @@ -1,6 +1,6 @@ Package: com.opa334.trollstorehelper Name: TrollStore Helper -Version: 2.0.15 +Version: 2.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 53b89ed5..b0e7ea91 100644 --- a/TrollStore/Resources/Info.plist +++ b/TrollStore/Resources/Info.plist @@ -50,7 +50,7 @@ iPhoneOS CFBundleVersion - 2.0.15 + 2.1 LSRequiresIPhoneOS UIDeviceFamily diff --git a/TrollStore/TSApplicationsManager.m b/TrollStore/TSApplicationsManager.m index 8dba589e..f873e377 100644 --- a/TrollStore/TSApplicationsManager.m +++ b/TrollStore/TSApplicationsManager.m @@ -42,7 +42,7 @@ - (NSError*)errorForCode:(int)code errorDescription = @"Failed to create container for app bundle."; break; case 171: - errorDescription = @"A non-TrollStore app with the same identifier is already installed. If you are absolutely sure it is not, you can force install it."; + errorDescription = @"A non "APP_NAME@" or a "OTHER_APP_NAME@" app with the same identifier is already installed. If you are absolutely sure it is not, you can force install it."; break; case 172: errorDescription = @"The app does not contain an Info.plist file."; diff --git a/TrollStore/TSSceneDelegate.m b/TrollStore/TSSceneDelegate.m index b5090faf..e86b456d 100644 --- a/TrollStore/TSSceneDelegate.m +++ b/TrollStore/TSSceneDelegate.m @@ -130,6 +130,7 @@ - (void)handleEnableJITForBundleID:(NSString *)appId // or if it's the one from an old TrollStore version that's no longer supported - (void)handleLdidCheck { +#ifndef TROLLSTORE_LITE //if (@available(iOS 16, *)) {} else { NSString* tsAppPath = [NSBundle mainBundle].bundlePath; @@ -141,6 +142,7 @@ - (void)handleLdidCheck [TSInstallationController installLdid]; } //} +#endif } - (void)scene:(UIScene *)scene willConnectToSession:(UISceneSession *)session options:(UISceneConnectionOptions *)connectionOptions { diff --git a/TrollStore/TSSettingsAdvancedListController.m b/TrollStore/TSSettingsAdvancedListController.m index 8bdc1b9e..5f779822 100644 --- a/TrollStore/TSSettingsAdvancedListController.m +++ b/TrollStore/TSSettingsAdvancedListController.m @@ -1,4 +1,5 @@ #import "TSSettingsAdvancedListController.h" +#import "TSUtil.h" #import extern NSUserDefaults* trollStoreUserDefaults(); @@ -39,7 +40,7 @@ - (NSMutableArray*)specifiers edit:nil]; [installationMethodSegmentSpecifier setProperty:@YES forKey:@"enabled"]; installationMethodSegmentSpecifier.identifier = @"installationMethodSegment"; - [installationMethodSegmentSpecifier setProperty:@"com.opa334.TrollStore" forKey:@"defaults"]; + [installationMethodSegmentSpecifier setProperty:APP_ID forKey:@"defaults"]; [installationMethodSegmentSpecifier setProperty:@"installationMethod" forKey:@"key"]; installationMethodSegmentSpecifier.values = @[@0, @1]; installationMethodSegmentSpecifier.titleDictionary = @{@0 : @"installd", @1 : @"Custom"}; @@ -71,7 +72,7 @@ - (NSMutableArray*)specifiers edit:nil]; [uninstallationMethodSegmentSpecifier setProperty:@YES forKey:@"enabled"]; uninstallationMethodSegmentSpecifier.identifier = @"uninstallationMethodSegment"; - [uninstallationMethodSegmentSpecifier setProperty:@"com.opa334.TrollStore" forKey:@"defaults"]; + [uninstallationMethodSegmentSpecifier setProperty:APP_ID forKey:@"defaults"]; [uninstallationMethodSegmentSpecifier setProperty:@"uninstallationMethod" forKey:@"key"]; uninstallationMethodSegmentSpecifier.values = @[@0, @1]; uninstallationMethodSegmentSpecifier.titleDictionary = @{@0 : @"installd", @1 : @"Custom"}; diff --git a/TrollStore/TSSettingsListController.m b/TrollStore/TSSettingsListController.m index 61fb1e76..27c80eab 100644 --- a/TrollStore/TSSettingsListController.m +++ b/TrollStore/TSSettingsListController.m @@ -20,6 +20,7 @@ - (void)viewDidLoad [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(reloadSpecifiers) name:UIApplicationWillEnterForegroundNotification object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(reloadSpecifiers) name:@"TrollStoreReloadSettingsNotification" object:nil]; +#ifndef TROLLSTORE_LITE fetchLatestTrollStoreVersion(^(NSString* latestVersion) { NSString* currentVersion = [self getTrollStoreVersion]; @@ -64,6 +65,7 @@ - (void)viewDidLoad { _devModeEnabled = YES; } +#endif [self reloadSpecifiers]; } @@ -73,6 +75,7 @@ - (NSMutableArray*)specifiers { _specifiers = [NSMutableArray new]; +#ifndef TROLLSTORE_LITE if(_newerVersion) { PSSpecifier* updateTrollStoreGroupSpecifier = [PSSpecifier emptyGroupSpecifier]; @@ -111,10 +114,23 @@ - (NSMutableArray*)specifiers enableDevModeSpecifier.buttonAction = @selector(enableDevModePressed); [_specifiers addObject:enableDevModeSpecifier]; } +#endif PSSpecifier* utilitiesGroupSpecifier = [PSSpecifier emptyGroupSpecifier]; utilitiesGroupSpecifier.name = @"Utilities"; - [utilitiesGroupSpecifier setProperty:@"If an app does not immediately appear after installation, respring here and it should appear afterwards." forKey:@"footerText"]; + + NSString *utilitiesDescription = @""; +#ifdef TROLLSTORE_LITE + if (shouldRegisterAsUserByDefault()) { + utilitiesDescription = @"Apps will be registered as User by default since AppSync Unified is installed.\n\n"; + } + else { + utilitiesDescription = @"Apps will be registered as System by default since AppSync Unified is not installed. When apps loose their System registration and stop working, press \"Refresh App Registrations\" here to fix them.\n\n"; + } +#endif + utilitiesDescription = [utilitiesDescription stringByAppendingString:@"If an app does not immediately appear after installation, respring here and it should appear afterwards."]; + + [utilitiesGroupSpecifier setProperty:utilitiesDescription forKey:@"footerText"]; [_specifiers addObject:utilitiesGroupSpecifier]; PSSpecifier* respringButtonSpecifier = [PSSpecifier preferenceSpecifierNamed:@"Respring" @@ -130,6 +146,19 @@ - (NSMutableArray*)specifiers [_specifiers addObject:respringButtonSpecifier]; + PSSpecifier* refreshAppRegistrationsSpecifier = [PSSpecifier preferenceSpecifierNamed:@"Refresh App Registrations" + target:self + set:nil + get:nil + detail:nil + cell:PSButtonCell + edit:nil]; + refreshAppRegistrationsSpecifier.identifier = @"refreshAppRegistrations"; + [refreshAppRegistrationsSpecifier setProperty:@YES forKey:@"enabled"]; + refreshAppRegistrationsSpecifier.buttonAction = @selector(refreshAppRegistrationsPressed); + + [_specifiers addObject:refreshAppRegistrationsSpecifier]; + PSSpecifier* rebuildIconCacheSpecifier = [PSSpecifier preferenceSpecifierNamed:@"Rebuild Icon Cache" target:self set:nil @@ -143,6 +172,23 @@ - (NSMutableArray*)specifiers [_specifiers addObject:rebuildIconCacheSpecifier]; + NSArray *inactiveBundlePaths = trollStoreInactiveInstalledAppBundlePaths(); + if (inactiveBundlePaths.count > 0) { + PSSpecifier* transferAppsSpecifier = [PSSpecifier preferenceSpecifierNamed:[NSString stringWithFormat:@"Transfer %zu "OTHER_APP_NAME@" %@", inactiveBundlePaths.count, inactiveBundlePaths.count > 1 ? @"Apps" : @"App"] + target:self + set:nil + get:nil + detail:nil + cell:PSButtonCell + edit:nil]; + transferAppsSpecifier.identifier = @"transferApps"; + [transferAppsSpecifier setProperty:@YES forKey:@"enabled"]; + transferAppsSpecifier.buttonAction = @selector(transferAppsPressed); + + [_specifiers addObject:transferAppsSpecifier]; + } + +#ifndef TROLLSTORE_LITE //if (@available(iOS 16, *)) { } else { NSString* ldidPath = [NSBundle.mainBundle.bundlePath stringByAppendingPathComponent:@"ldid"]; NSString* ldidVersionPath = [NSBundle.mainBundle.bundlePath stringByAppendingPathComponent:@"ldid.version"]; @@ -288,6 +334,7 @@ - (NSMutableArray*)specifiers [_specifiers addObject:_installPersistenceHelperSpecifier]; } } +#endif PSSpecifier* installationSettingsGroupSpecifier = [PSSpecifier emptyGroupSpecifier]; installationSettingsGroupSpecifier.name = @"Security"; @@ -316,14 +363,14 @@ - (NSMutableArray*)specifiers installAlertConfigurationSpecifier.detailControllerClass = [PSListItemsController class]; [installAlertConfigurationSpecifier setProperty:@"installationConfirmationValues" forKey:@"valuesDataSource"]; [installAlertConfigurationSpecifier setProperty:@"installationConfirmationNames" forKey:@"titlesDataSource"]; - [installAlertConfigurationSpecifier setProperty:@"com.opa334.TrollStore" forKey:@"defaults"]; + [installAlertConfigurationSpecifier setProperty:APP_ID forKey:@"defaults"]; [installAlertConfigurationSpecifier setProperty:@"installAlertConfiguration" forKey:@"key"]; [installAlertConfigurationSpecifier setProperty:@0 forKey:@"default"]; [_specifiers addObject:installAlertConfigurationSpecifier]; PSSpecifier* otherGroupSpecifier = [PSSpecifier emptyGroupSpecifier]; - [otherGroupSpecifier setProperty:[NSString stringWithFormat:@"TrollStore %@\n\n© 2022-2024 Lars Fröder (opa334)\n\nTrollStore is NOT for piracy!\n\nCredits:\nGoogle TAG, @alfiecg_dev: CoreTrust bug\n@lunotech11, @SerenaKit, @tylinux, @TheRealClarity, @dhinakg, @khanhduytran0: Various contributions\n@ProcursusTeam: uicache, ldid\n@cstar_ow: uicache\n@saurik: ldid", [self getTrollStoreVersion]] forKey:@"footerText"]; + [otherGroupSpecifier setProperty:[NSString stringWithFormat:@"%@ %@\n\n© 2022-2024 Lars Fröder (opa334)\n\nTrollStore is NOT for piracy!\n\nCredits:\nGoogle TAG, @alfiecg_dev: CoreTrust bug\n@lunotech11, @SerenaKit, @tylinux, @TheRealClarity, @dhinakg, @khanhduytran0: Various contributions\n@ProcursusTeam: uicache, ldid\n@cstar_ow: uicache\n@saurik: ldid", APP_NAME, [self getTrollStoreVersion]] forKey:@"footerText"]; [_specifiers addObject:otherGroupSpecifier]; PSSpecifier* advancedLinkSpecifier = [PSSpecifier preferenceSpecifierNamed:@"Advanced" @@ -348,6 +395,7 @@ - (NSMutableArray*)specifiers [donateSpecifier setProperty:@YES forKey:@"enabled"]; [_specifiers addObject:donateSpecifier]; +#ifndef TROLLSTORE_LITE // Uninstall TrollStore PSSpecifier* uninstallTrollStoreSpecifier = [PSSpecifier preferenceSpecifierNamed:@"Uninstall TrollStore" target:self @@ -361,7 +409,7 @@ - (NSMutableArray*)specifiers [uninstallTrollStoreSpecifier setProperty:NSClassFromString(@"PSDeleteButtonCell") forKey:@"cellClass"]; uninstallTrollStoreSpecifier.buttonAction = @selector(uninstallTrollStorePressed); [_specifiers addObject:uninstallTrollStoreSpecifier]; - +#endif /*PSSpecifier* doTheDashSpecifier = [PSSpecifier preferenceSpecifierNamed:@"Do the Dash" target:self set:nil @@ -439,7 +487,7 @@ - (void)installPersistenceHelperPressed { if([[NSFileManager defaultManager] fileExistsAtPath:[@"/System/Library/AppSignatures" stringByAppendingPathComponent:appProxy.bundleIdentifier]]) { - NSURL* trollStoreMarkURL = [appProxy.bundleURL.URLByDeletingLastPathComponent URLByAppendingPathComponent:@"_TrollStore"]; + NSURL* trollStoreMarkURL = [appProxy.bundleURL.URLByDeletingLastPathComponent URLByAppendingPathComponent:TS_ACTIVE_MARKER]; if(![trollStoreMarkURL checkResourceIsReachableAndReturnError:nil]) { [appCandidates addObject:appProxy]; @@ -471,6 +519,52 @@ - (void)installPersistenceHelperPressed [TSPresentationDelegate presentViewController:selectAppAlert animated:YES completion:nil]; } +- (void)transferAppsPressed +{ + UIAlertController *confirmationAlert = [UIAlertController alertControllerWithTitle:@"Transfer Apps" message:[NSString stringWithFormat:@"This option will transfer %zu apps from "OTHER_APP_NAME@" to "APP_NAME@". Continue?", trollStoreInactiveInstalledAppBundlePaths().count] preferredStyle:UIAlertControllerStyleAlert]; + + UIAlertAction* transferAction = [UIAlertAction actionWithTitle:@"Transfer" style:UIAlertActionStyleDefault handler:^(UIAlertAction* action) + { + [TSPresentationDelegate startActivity:@"Transfering"]; + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^ + { + NSString *log; + int transferRet = spawnRoot(rootHelperPath(), @[@"transfer-apps"], nil, &log); + + dispatch_async(dispatch_get_main_queue(), ^ + { + [TSPresentationDelegate stopActivityWithCompletion:^ + { + [self reloadSpecifiers]; + + if (transferRet != 0) { + NSArray *remainingApps = trollStoreInactiveInstalledAppBundlePaths(); + UIAlertController *errorAlert = [UIAlertController alertControllerWithTitle:@"Transfer Failed" message:[NSString stringWithFormat:@"Failed to transfer %zu %@", remainingApps.count, remainingApps.count > 1 ? @"apps" : @"app"] preferredStyle:UIAlertControllerStyleAlert]; + + UIAlertAction* copyLogAction = [UIAlertAction actionWithTitle:@"Copy Debug Log" style:UIAlertActionStyleDefault handler:^(UIAlertAction* action) + { + UIPasteboard* pasteboard = [UIPasteboard generalPasteboard]; + pasteboard.string = log; + }]; + [errorAlert addAction:copyLogAction]; + + UIAlertAction* closeAction = [UIAlertAction actionWithTitle:@"Close" style:UIAlertActionStyleDefault handler:nil]; + [errorAlert addAction:closeAction]; + + [TSPresentationDelegate presentViewController:errorAlert animated:YES completion:nil]; + } + }]; + }); + }); + }]; + [confirmationAlert addAction:transferAction]; + + UIAlertAction* cancelAction = [UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:nil]; + [confirmationAlert addAction:cancelAction]; + + [TSPresentationDelegate presentViewController:confirmationAlert animated:YES completion:nil]; +} + - (id)getURLSchemeEnabledForSpecifier:(PSSpecifier*)specifier { BOOL URLSchemeActive = (BOOL)[NSBundle.mainBundle objectForInfoDictionaryKey:@"CFBundleURLTypes"]; diff --git a/TrollStore/control b/TrollStore/control index bce7e395..808bf556 100644 --- a/TrollStore/control +++ b/TrollStore/control @@ -1,6 +1,6 @@ Package: com.opa334.trollstore Name: TrollStore -Version: 2.0.15 +Version: 2.1 Architecture: iphoneos-arm Description: An awesome application! Maintainer: opa334 diff --git a/TrollStore/main.m b/TrollStore/main.m index 99cf0a00..ba87d0a0 100644 --- a/TrollStore/main.m +++ b/TrollStore/main.m @@ -4,7 +4,7 @@ NSUserDefaults* trollStoreUserDefaults(void) { - return [[NSUserDefaults alloc] initWithSuiteName:[NSHomeDirectory() stringByAppendingPathComponent:@"Library/Preferences/com.opa334.TrollStore.plist"]]; + return [[NSUserDefaults alloc] initWithSuiteName:[NSHomeDirectory() stringByAppendingPathComponent:[NSString stringWithFormat:@"Library/Preferences/%@.plist", APP_ID]]]; } int main(int argc, char *argv[]) { diff --git a/TrollStoreLite/.gitignore b/TrollStoreLite/.gitignore new file mode 100644 index 00000000..8fb7de93 --- /dev/null +++ b/TrollStoreLite/.gitignore @@ -0,0 +1 @@ +Resources/trollstorehelper \ No newline at end of file diff --git a/TrollStoreLite/Makefile b/TrollStoreLite/Makefile new file mode 100644 index 00000000..c2cfa0c3 --- /dev/null +++ b/TrollStoreLite/Makefile @@ -0,0 +1,16 @@ +TARGET := iphone:clang:16.5:14.0 +INSTALL_TARGET_PROCESSES = TrollStoreLite +ARCHS = arm64 + +include $(THEOS)/makefiles/common.mk + +APPLICATION_NAME = TrollStoreLite + +TrollStoreLite_FILES = $(wildcard ../TrollStore/*.m) $(wildcard ../Shared/*.m) +TrollStoreLite_FRAMEWORKS = UIKit CoreGraphics CoreServices CoreTelephony +TrollStoreLite_PRIVATE_FRAMEWORKS = Preferences MobileIcons MobileContainerManager +TrollStoreLite_LIBRARIES = archive +TrollStoreLite_CFLAGS = -fobjc-arc -I../Shared -I$(shell brew --prefix)/opt/libarchive/include -DTROLLSTORE_LITE +TrollStoreLite_CODESIGN_FLAGS = -Sentitlements.plist + +include $(THEOS_MAKE_PATH)/application.mk diff --git a/TrollStoreLite/Resources/AppIcon29x29.png b/TrollStoreLite/Resources/AppIcon29x29.png new file mode 100644 index 00000000..22f75955 Binary files /dev/null and b/TrollStoreLite/Resources/AppIcon29x29.png differ diff --git a/TrollStoreLite/Resources/AppIcon29x29@2x.png b/TrollStoreLite/Resources/AppIcon29x29@2x.png new file mode 100644 index 00000000..abb5d545 Binary files /dev/null and b/TrollStoreLite/Resources/AppIcon29x29@2x.png differ diff --git a/TrollStoreLite/Resources/AppIcon29x29@3x.png b/TrollStoreLite/Resources/AppIcon29x29@3x.png new file mode 100644 index 00000000..dc8dc678 Binary files /dev/null and b/TrollStoreLite/Resources/AppIcon29x29@3x.png differ diff --git a/TrollStoreLite/Resources/AppIcon40x40.png b/TrollStoreLite/Resources/AppIcon40x40.png new file mode 100644 index 00000000..f749f8a2 Binary files /dev/null and b/TrollStoreLite/Resources/AppIcon40x40.png differ diff --git a/TrollStoreLite/Resources/AppIcon40x40@2x.png b/TrollStoreLite/Resources/AppIcon40x40@2x.png new file mode 100644 index 00000000..2e2bca8b Binary files /dev/null and b/TrollStoreLite/Resources/AppIcon40x40@2x.png differ diff --git a/TrollStoreLite/Resources/AppIcon40x40@3x.png b/TrollStoreLite/Resources/AppIcon40x40@3x.png new file mode 100644 index 00000000..8b89b68e Binary files /dev/null and b/TrollStoreLite/Resources/AppIcon40x40@3x.png differ diff --git a/TrollStoreLite/Resources/AppIcon50x50.png b/TrollStoreLite/Resources/AppIcon50x50.png new file mode 100644 index 00000000..46827064 Binary files /dev/null and b/TrollStoreLite/Resources/AppIcon50x50.png differ diff --git a/TrollStoreLite/Resources/AppIcon50x50@2x.png b/TrollStoreLite/Resources/AppIcon50x50@2x.png new file mode 100644 index 00000000..aee7c639 Binary files /dev/null and b/TrollStoreLite/Resources/AppIcon50x50@2x.png differ diff --git a/TrollStoreLite/Resources/AppIcon57x57.png b/TrollStoreLite/Resources/AppIcon57x57.png new file mode 100644 index 00000000..95707be5 Binary files /dev/null and b/TrollStoreLite/Resources/AppIcon57x57.png differ diff --git a/TrollStoreLite/Resources/AppIcon57x57@2x.png b/TrollStoreLite/Resources/AppIcon57x57@2x.png new file mode 100644 index 00000000..9749ae9b Binary files /dev/null and b/TrollStoreLite/Resources/AppIcon57x57@2x.png differ diff --git a/TrollStoreLite/Resources/AppIcon57x57@3x.png b/TrollStoreLite/Resources/AppIcon57x57@3x.png new file mode 100644 index 00000000..86254d41 Binary files /dev/null and b/TrollStoreLite/Resources/AppIcon57x57@3x.png differ diff --git a/TrollStoreLite/Resources/AppIcon60x60.png b/TrollStoreLite/Resources/AppIcon60x60.png new file mode 100644 index 00000000..fb2d41ba Binary files /dev/null and b/TrollStoreLite/Resources/AppIcon60x60.png differ diff --git a/TrollStoreLite/Resources/AppIcon60x60@2x.png b/TrollStoreLite/Resources/AppIcon60x60@2x.png new file mode 100644 index 00000000..8b89b68e Binary files /dev/null and b/TrollStoreLite/Resources/AppIcon60x60@2x.png differ diff --git a/TrollStoreLite/Resources/AppIcon60x60@3x.png b/TrollStoreLite/Resources/AppIcon60x60@3x.png new file mode 100644 index 00000000..f804ab9f Binary files /dev/null and b/TrollStoreLite/Resources/AppIcon60x60@3x.png differ diff --git a/TrollStoreLite/Resources/AppIcon72x72.png b/TrollStoreLite/Resources/AppIcon72x72.png new file mode 100644 index 00000000..1f166813 Binary files /dev/null and b/TrollStoreLite/Resources/AppIcon72x72.png differ diff --git a/TrollStoreLite/Resources/AppIcon72x72@2x.png b/TrollStoreLite/Resources/AppIcon72x72@2x.png new file mode 100644 index 00000000..c4f4aac4 Binary files /dev/null and b/TrollStoreLite/Resources/AppIcon72x72@2x.png differ diff --git a/TrollStoreLite/Resources/AppIcon76x76.png b/TrollStoreLite/Resources/AppIcon76x76.png new file mode 100644 index 00000000..7fc98723 Binary files /dev/null and b/TrollStoreLite/Resources/AppIcon76x76.png differ diff --git a/TrollStoreLite/Resources/AppIcon76x76@2x.png b/TrollStoreLite/Resources/AppIcon76x76@2x.png new file mode 100644 index 00000000..3e658ed8 Binary files /dev/null and b/TrollStoreLite/Resources/AppIcon76x76@2x.png differ diff --git a/TrollStoreLite/Resources/Base.lproj/LaunchScreen.storyboardc/Info.plist b/TrollStoreLite/Resources/Base.lproj/LaunchScreen.storyboardc/Info.plist new file mode 100644 index 00000000..101b217b Binary files /dev/null and b/TrollStoreLite/Resources/Base.lproj/LaunchScreen.storyboardc/Info.plist differ diff --git a/TrollStoreLite/Resources/Base.lproj/LaunchScreen.storyboardc/Kx4-55-vNS-view-9BB-B5-Vbi.nib b/TrollStoreLite/Resources/Base.lproj/LaunchScreen.storyboardc/Kx4-55-vNS-view-9BB-B5-Vbi.nib new file mode 100644 index 00000000..465c1341 Binary files /dev/null and b/TrollStoreLite/Resources/Base.lproj/LaunchScreen.storyboardc/Kx4-55-vNS-view-9BB-B5-Vbi.nib differ diff --git a/TrollStoreLite/Resources/Base.lproj/LaunchScreen.storyboardc/UITabBarController-9el-pn-lH0.nib b/TrollStoreLite/Resources/Base.lproj/LaunchScreen.storyboardc/UITabBarController-9el-pn-lH0.nib new file mode 100644 index 00000000..41dbebdd Binary files /dev/null and b/TrollStoreLite/Resources/Base.lproj/LaunchScreen.storyboardc/UITabBarController-9el-pn-lH0.nib differ diff --git a/TrollStoreLite/Resources/Base.lproj/LaunchScreen.storyboardc/X3T-Aa-nEE-view-vAu-RC-m7d.nib b/TrollStoreLite/Resources/Base.lproj/LaunchScreen.storyboardc/X3T-Aa-nEE-view-vAu-RC-m7d.nib new file mode 100644 index 00000000..465c1341 Binary files /dev/null and b/TrollStoreLite/Resources/Base.lproj/LaunchScreen.storyboardc/X3T-Aa-nEE-view-vAu-RC-m7d.nib differ diff --git a/TrollStoreLite/Resources/Info.plist b/TrollStoreLite/Resources/Info.plist new file mode 100644 index 00000000..d8d9c38b --- /dev/null +++ b/TrollStoreLite/Resources/Info.plist @@ -0,0 +1,188 @@ + + + + + CFBundleExecutable + TrollStoreLite + CFBundleDisplayName + TrollStore Lite + CFBundleIcons + + CFBundlePrimaryIcon + + CFBundleIconFiles + + AppIcon29x29 + AppIcon40x40 + AppIcon57x57 + AppIcon60x60 + + UIPrerenderedIcon + + + + CFBundleIcons~ipad + + CFBundlePrimaryIcon + + CFBundleIconFiles + + AppIcon29x29 + AppIcon40x40 + AppIcon57x57 + AppIcon60x60 + AppIcon50x50 + AppIcon72x72 + AppIcon76x76 + + UIPrerenderedIcon + + + + CFBundleIdentifier + com.opa334.TrollStoreLite + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleSupportedPlatforms + + iPhoneOS + + CFBundleVersion + 2.1 + LSRequiresIPhoneOS + + UIDeviceFamily + + 1 + 2 + + UIRequiredDeviceCapabilities + + armv7 + + UILaunchStoryboardName + LaunchScreen + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + TSSceneDelegate + + + + + UTImportedTypeDeclarations + + + UTTypeConformsTo + + public.data + + UTTypeDescription + iOS App + UTTypeIconFiles + + UTTypeIdentifier + com.apple.itunes.ipa + UTTypeTagSpecification + + public.filename-extension + + ipa + + public.mime-type + + + + + CFBundleDocumentTypes + + + CFBundleTypeName + iOS App + LSHandlerRank + Default + LSItemContentTypes + + com.apple.itunes.ipa + + + + CFBundleTypeName + AirDrop friendly iOS app + CFBundleTypeRole + Viewer + LSHandlerRank + Owner + LSItemContentTypes + + com.opa334.trollstore.tipa + + + + UTExportedTypeDeclarations + + + UTTypeIdentifier + com.opa334.trollstore.tipa + UTTypeDescription + AirDrop friendly iOS app + UTTypeConformsTo + + public.data + + UTTypeTagSpecification + + public.filename-extension + + tipa + + public.mime-type + application/trollstore-ipa + + + + CFBundleURLTypes + + + CFBundleURLName + com.apple.Magnifier + CFBundleURLSchemes + + apple-magnifier + + + + LSSupportsOpeningDocumentsInPlace + + TSRootBinaries + + trollstorehelper + + + diff --git a/TrollStoreLite/control b/TrollStoreLite/control new file mode 100644 index 00000000..4f7c3310 --- /dev/null +++ b/TrollStoreLite/control @@ -0,0 +1,9 @@ +Package: com.opa334.trollstorelite +Name: TrollStore Lite +Version: 2.1 +Architecture: iphoneos-arm +Description: TrollStore for jailbroken iOS +Depends: ldid +Maintainer: opa334 +Author: opa334 +Section: Applications diff --git a/TrollStoreLite/entitlements.plist b/TrollStoreLite/entitlements.plist new file mode 100644 index 00000000..abc5d7b3 --- /dev/null +++ b/TrollStoreLite/entitlements.plist @@ -0,0 +1,45 @@ + + + + + application-identifier + com.opa334.TrollStore + platform-application + + com.apple.security.exception.files.absolute-path.read-write + + / + + com.apple.security.exception.iokit-user-client-class + + AGXDeviceUserClient + IOSurfaceRootUserClient + + com.apple.private.security.no-sandbox + + com.apple.private.persona-mgmt + + com.apple.private.security.container-manager + + com.apple.private.coreservices.canmaplsdatabase + + com.apple.lsapplicationworkspace.rebuildappdatabases + + com.apple.private.MobileContainerManager.allowed + + com.apple.private.MobileInstallationHelperService.InstallDaemonOpsEnabled + + com.apple.private.MobileInstallationHelperService.allowed + + com.apple.private.uninstall.deletion + + com.apple.private.security.storage.MobileDocuments + + com.apple.CommCenter.fine-grained + + data-allowed-write + + com.apple.springboard.opensensitiveurl + + + \ No newline at end of file