diff --git a/.gitignore b/.gitignore index 5605203..713f32a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,6 @@ .DS_Store -Build.md \ No newline at end of file +Build.md +/RedditPatch +/PineHeartsUnlock +/App +/GoodnotesPro diff --git a/Infuse/Infuse-iOS/Tweak.x b/Infuse/Infuse-iOS/Tweak.x index 59f10fc..41d242b 100644 --- a/Infuse/Infuse-iOS/Tweak.x +++ b/Infuse/Infuse-iOS/Tweak.x @@ -78,4 +78,46 @@ + (id)containerWithIdentifier:(id)arg1 { return nil; } +%end + +%hook NSFileManager +- (NSURL *)containerURLForSecurityApplicationGroupIdentifier:(NSString *)groupIdentifier { + NSString *homeDirectory = NSHomeDirectory(); + NSString *containerBasePath = [homeDirectory stringByAppendingPathComponent:@"Documents/ApplicationGroupContainers"]; + NSURL *baseURL = [NSURL fileURLWithPath:containerBasePath isDirectory:YES]; + NSURL *containerURL = [baseURL URLByAppendingPathComponent:groupIdentifier]; + + NSFileManager *fileManager = [NSFileManager defaultManager]; + NSString *containerPath = [containerURL path]; + BOOL containerExists = [fileManager fileExistsAtPath:containerPath]; + + if (!containerExists) { + NSError *error = nil; + + [fileManager createDirectoryAtURL:containerURL + withIntermediateDirectories:YES + attributes:nil + error:&error]; + + NSURL *appSupportURL = [containerURL URLByAppendingPathComponent:@"Library/Application Support"]; + [fileManager createDirectoryAtURL:appSupportURL + withIntermediateDirectories:YES + attributes:nil + error:&error]; + + NSURL *cachesURL = [containerURL URLByAppendingPathComponent:@"Library/Caches"]; + [fileManager createDirectoryAtURL:cachesURL + withIntermediateDirectories:YES + attributes:nil + error:&error]; + + NSURL *preferencesURL = [containerURL URLByAppendingPathComponent:@"Library/Preferences"]; + [fileManager createDirectoryAtURL:preferencesURL + withIntermediateDirectories:YES + attributes:nil + error:&error]; + } + + return containerURL; +} %end \ No newline at end of file diff --git a/Infuse/Infuse-tvOS/Tweak.x b/Infuse/Infuse-tvOS/Tweak.x index c097049..5d00df0 100644 --- a/Infuse/Infuse-tvOS/Tweak.x +++ b/Infuse/Infuse-tvOS/Tweak.x @@ -94,4 +94,42 @@ + (id)containerWithIdentifier:(id)arg1 { return nil; } +%end + +%hook NSPersistentCloudKitContainerOptions +- (id)initWithContainerIdentifier:(id)arg1 { + return nil; +} +%end + +%hook CKRecordID +- (id)initWithRecordName:(id)arg1 { + return nil; +} +- (id)initWithRecordName:(id)arg1 zoneID:(id)arg2 { + return nil; +} +%end + +%hook CKSystemSharingUIObserver +- (id)initWithContainer:(id)arg1 { + return nil; +} +%end + +%hook NSFileManager +- (id)ubiquityIdentityToken { + return nil; +} +- (NSURL *)containerURLForSecurityApplicationGroupIdentifier:(NSString *)groupIdentifier { + NSString *docPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) firstObject]; + NSString *path = [docPath stringByAppendingPathComponent:groupIdentifier]; + NSURL *url = [NSURL fileURLWithPath:path]; + + if (![[NSFileManager defaultManager] fileExistsAtPath:[url path]]) { + [[NSFileManager defaultManager] createDirectoryAtURL:url withIntermediateDirectories:YES attributes:nil error:nil]; + } + + return url; +} %end \ No newline at end of file diff --git a/Infuse/Infuse-tvOS/control b/Infuse/Infuse-tvOS/control index e0bc60b..1501efa 100644 --- a/Infuse/Infuse-tvOS/control +++ b/Infuse/Infuse-tvOS/control @@ -1,6 +1,6 @@ Package: io.infuseteam.infuserootless Name: Infuse (Rootless) -Version: 2.2 +Version: 2.3 Architecture: appletvos-arm64 Description: Unlock the full potential of Infuse Maintainer: Infuse Team diff --git a/scripts/patch-tvos.sh b/scripts/patch-tvos.sh new file mode 100755 index 0000000..ef87e09 --- /dev/null +++ b/scripts/patch-tvos.sh @@ -0,0 +1,50 @@ +#!/bin/bash + +set -e + +if [ "$#" -ne 2 ]; then + echo "Usage: $0 " + exit 1 +fi + +IPA="" +DEB="" + +for arg in "$@"; do + case "$arg" in + *.ipa) + IPA="$arg" + ;; + *.deb) + DEB="$arg" + ;; + *) + echo "Unknown file type: $arg" + exit 1 + ;; + esac +done + +if [ -z "$IPA" ] || [ -z "$DEB" ]; then + echo "You must provide one .ipa and one .deb file." + exit 1 +fi + +# ---- Prepare output folder ---- +OUT_DIR="/tmp/ipa_patched" +mkdir -p "$OUT_DIR" + +IPA_NAME=$(basename "$IPA") +OUTPUT_IPA="$OUT_DIR/$IPA_NAME" + +echo "[+] Patching IPA with cyan..." +# cyan -i "$IPA" -o "$OUTPUT_IPA" -f "$DEB" -u --overwrite -c 0 +cyan -i "$IPA" -o "$OUTPUT_IPA" -f "$DEB" -u --overwrite -c 9 --tv +echo "[+] Patch complete." + +# Copy patched IPA next to the original with _patched suffix +ORIG_DIR=$(dirname "$IPA") +ORIG_BASENAME=$(basename "$IPA" .ipa) +PATCHED_IPA="$ORIG_DIR/${ORIG_BASENAME}_patched.ipa" +cp "$OUTPUT_IPA" "$PATCHED_IPA" +echo "[+] Patched IPA saved as: $PATCHED_IPA" \ No newline at end of file diff --git a/scripts/patch.sh b/scripts/patch.sh new file mode 100755 index 0000000..1e154ba --- /dev/null +++ b/scripts/patch.sh @@ -0,0 +1,50 @@ +#!/bin/bash + +set -e + +if [ "$#" -ne 2 ]; then + echo "Usage: $0 " + exit 1 +fi + +IPA="" +DEB="" + +for arg in "$@"; do + case "$arg" in + *.ipa) + IPA="$arg" + ;; + *.deb) + DEB="$arg" + ;; + *) + echo "Unknown file type: $arg" + exit 1 + ;; + esac +done + +if [ -z "$IPA" ] || [ -z "$DEB" ]; then + echo "You must provide one .ipa and one .deb file." + exit 1 +fi + +# ---- Prepare output folder ---- +OUT_DIR="/tmp/ipa_patched" +mkdir -p "$OUT_DIR" + +IPA_NAME=$(basename "$IPA") +OUTPUT_IPA="$OUT_DIR/$IPA_NAME" + +echo "[+] Patching IPA with cyan..." +# cyan -i "$IPA" -o "$OUTPUT_IPA" -f "$DEB" -u --overwrite -c 0 +cyan -i "$IPA" -o "$OUTPUT_IPA" -f "$DEB" -u --overwrite -c 9 +echo "[+] Patch complete." + +# Copy patched IPA next to the original with _patched suffix +ORIG_DIR=$(dirname "$IPA") +ORIG_BASENAME=$(basename "$IPA" .ipa) +PATCHED_IPA="$ORIG_DIR/${ORIG_BASENAME}_patched.ipa" +cp "$OUTPUT_IPA" "$PATCHED_IPA" +echo "[+] Patched IPA saved as: $PATCHED_IPA" \ No newline at end of file diff --git a/scripts/patch_and_serve.sh b/scripts/patch_and_serve.sh index 7792111..9239bca 100755 --- a/scripts/patch_and_serve.sh +++ b/scripts/patch_and_serve.sh @@ -38,7 +38,8 @@ IPA_NAME=$(basename "$IPA") OUTPUT_IPA="$OUT_DIR/$IPA_NAME" echo "[+] Patching IPA with cyan..." -cyan -i "$IPA" -o "$OUTPUT_IPA" -f "$DEB" -u --overwrite +# cyan -i "$IPA" -o "$OUTPUT_IPA" -f "$DEB" -u --overwrite -c 0 +cyan -i "$IPA" -o "$OUTPUT_IPA" -f "$DEB" -u --overwrite -c 9 echo "[+] Patch complete." LOCAL_IP=$(ipconfig getifaddr en0 2>/dev/null)