mirror of
https://github.com/NohamR/Tweaks.git
synced 2026-08-26 02:39:42 +00:00
Unify patch scripts and add output options
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -4,3 +4,4 @@ Build.md
|
|||||||
/PineHeartsUnlock
|
/PineHeartsUnlock
|
||||||
/App
|
/App
|
||||||
/GoodnotesPro
|
/GoodnotesPro
|
||||||
|
/StravaPremium
|
||||||
|
|||||||
27
README.md
27
README.md
@@ -4,18 +4,21 @@ iOS tweaks built with [Theos](https://theos.dev), injected into IPAs via [cyan](
|
|||||||
|
|
||||||
## Tweaks
|
## Tweaks
|
||||||
|
|
||||||
| Tweak | App | Target |
|
| Tweak | App | Target |
|
||||||
| ------------------------------------------------------- | ---------------- | ---------- |
|
| -------------------------------------------------- | ------------------------ | ----------- |
|
||||||
| [ServerCatPremium](ServerCatPremium/index.md) | ServerCat 1.30.0 / 1.6.4 | iOS 15+ |
|
| [ServerCatPremium](ServerCatPremium/index.md) | ServerCat 1.30.0 / 1.6.4 | iOS 15+ |
|
||||||
| [TextasticPro](TextasticPro/index.md) | Textastic 10.9.2 | iOS 18+ |
|
| [TextasticPro](TextasticPro/index.md) | Textastic 10.9.2 | iOS 18+ |
|
||||||
| [BusinessJB](BusinessJB/index.md) | Business 2.3.000 | iOS 15 |
|
| [BusinessJB](BusinessJB/index.md) | Business 2.3.000 | iOS 15 |
|
||||||
| [CreditAgricoleJB](CreditAgricoleJB/index.md) | Ma Banque 47.0.0 | iOS 15.8.6 |
|
| [CreditAgricoleJB](CreditAgricoleJB/index.md) | Ma Banque 47.0.0 | iOS 15.8.6 |
|
||||||
| [Infuse](Infuse/Infuse-tvOS/index.md) | Infuse 8.2.4 | tvOS 18.3 |
|
| [Infuse](Infuse/Infuse-tvOS/index.md) | Infuse 8.2.4 | tvOS 18.3 |
|
||||||
| [Infuse (iOS)](Infuse/Infuse-iOS/index.md) | Infuse 8.4.2 | iOS 18+ |
|
| [Infuse (iOS)](Infuse/Infuse-iOS/index.md) | Infuse 8.4.2 | iOS 18+ |
|
||||||
| [TF1+ (tvOS)](TF1Plus/TF1Plus-tvOS/index.md) | TF1+ 11.36.0 | tvOS |
|
| [TF1+ (tvOS)](TF1Plus/TF1Plus-tvOS/index.md) | TF1+ 11.36.0 | tvOS |
|
||||||
| [TF1+ (iOS)](TF1Plus/TF1Plus-iOS/index.md) | TF1+ 11.36.0 | iOS 14+ |
|
| [TF1+ (iOS)](TF1Plus/TF1Plus-iOS/index.md) | TF1+ 11.36.0 | iOS 14+ |
|
||||||
| [OqeePlus (tvOS)](OqeePlus/OqeePlus-tvOS/index.md) | Oqee 2.40 | tvOS 18.3 |
|
| [OqeePlus (tvOS)](OqeePlus/OqeePlus-tvOS/index.md) | Oqee 2.40 | tvOS 18.3 |
|
||||||
| [OqeePlus (iOS)](OqeePlus/OqeePlus-iOS/index.md) | Oqee 2.40 | iOS 18+ |
|
| [OqeePlus (iOS)](OqeePlus/OqeePlus-iOS/index.md) | Oqee 2.40 | iOS 18+ |
|
||||||
|
| [VolkswagenJB](VolkswagenJB/index.md) | Volkswagen 2.72.0 | iOS 16.7.15 |
|
||||||
|
| [GPXViewer2](GPXViewer2) | GPXViewer 2 | iOS 14+ |
|
||||||
|
| [RMHook](RMHook/index.md) | reMarkable | iOS |
|
||||||
|
|
||||||
## Build
|
## Build
|
||||||
|
|
||||||
|
|||||||
@@ -2,49 +2,5 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
if [ "$#" -ne 2 ]; then
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||||
echo "Usage: $0 <file.ipa> <file.deb>"
|
"$SCRIPT_DIR/patch.sh" --tv "$@"
|
||||||
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"
|
|
||||||
|
|||||||
@@ -2,25 +2,48 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
if [ "$#" -ne 2 ]; then
|
usage() {
|
||||||
echo "Usage: $0 <file.ipa> <file.deb>"
|
echo "Usage: $0 [--tv] [-o <output.ipa> | --output <output.ipa>] <file.ipa> <file.deb>"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
}
|
||||||
|
|
||||||
|
TV=0
|
||||||
IPA=""
|
IPA=""
|
||||||
DEB=""
|
DEB=""
|
||||||
|
OUTPUT_IPA=""
|
||||||
|
OUTPUT_SPECIFIED=0
|
||||||
|
|
||||||
for arg in "$@"; do
|
while [ "$#" -gt 0 ]; do
|
||||||
case "$arg" in
|
case "$1" in
|
||||||
|
-o|--output)
|
||||||
|
if [ -z "$2" ]; then
|
||||||
|
echo "Error: $1 requires an argument."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
OUTPUT_IPA="$2"
|
||||||
|
OUTPUT_SPECIFIED=1
|
||||||
|
shift 2
|
||||||
|
;;
|
||||||
|
-o=*|--output=*)
|
||||||
|
OUTPUT_IPA="${1#*=}"
|
||||||
|
OUTPUT_SPECIFIED=1
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
--tv)
|
||||||
|
TV=1
|
||||||
|
shift
|
||||||
|
;;
|
||||||
*.ipa)
|
*.ipa)
|
||||||
IPA="$arg"
|
IPA="$1"
|
||||||
|
shift
|
||||||
;;
|
;;
|
||||||
*.deb)
|
*.deb)
|
||||||
DEB="$arg"
|
DEB="$1"
|
||||||
|
shift
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Unknown file type: $arg"
|
echo "Unknown argument: $1"
|
||||||
exit 1
|
usage
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
@@ -30,21 +53,22 @@ if [ -z "$IPA" ] || [ -z "$DEB" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ---- Prepare output folder ----
|
if [ -z "$OUTPUT_IPA" ]; then
|
||||||
OUT_DIR="/tmp/ipa_patched"
|
OUTPUT_IPA="/tmp/ipa_patched/$(basename "$IPA")"
|
||||||
mkdir -p "$OUT_DIR"
|
mkdir -p "$(dirname "$OUTPUT_IPA")"
|
||||||
|
fi
|
||||||
|
|
||||||
IPA_NAME=$(basename "$IPA")
|
CYAN_ARGS=(-i "$IPA" -o "$OUTPUT_IPA" -f "$DEB" -u --overwrite -c 9)
|
||||||
OUTPUT_IPA="$OUT_DIR/$IPA_NAME"
|
if [ "$TV" -eq 1 ]; then
|
||||||
|
CYAN_ARGS+=(--tv)
|
||||||
|
fi
|
||||||
|
|
||||||
echo "[+] Patching IPA with cyan..."
|
echo "[+] Patching IPA with cyan..."
|
||||||
# cyan -i "$IPA" -o "$OUTPUT_IPA" -f "$DEB" -u --overwrite -c 0
|
cyan "${CYAN_ARGS[@]}"
|
||||||
cyan -i "$IPA" -o "$OUTPUT_IPA" -f "$DEB" -u --overwrite -c 9
|
|
||||||
echo "[+] Patch complete."
|
echo "[+] Patch complete."
|
||||||
|
|
||||||
# Copy patched IPA next to the original with _patched suffix
|
if [ "$OUTPUT_SPECIFIED" -eq 0 ]; then
|
||||||
ORIG_DIR=$(dirname "$IPA")
|
PATCHED_IPA="$(dirname "$IPA")/$(basename "$IPA" .ipa)_patched.ipa"
|
||||||
ORIG_BASENAME=$(basename "$IPA" .ipa)
|
cp "$OUTPUT_IPA" "$PATCHED_IPA"
|
||||||
PATCHED_IPA="$ORIG_DIR/${ORIG_BASENAME}_patched.ipa"
|
echo "[+] Patched IPA saved as: $PATCHED_IPA"
|
||||||
cp "$OUTPUT_IPA" "$PATCHED_IPA"
|
fi
|
||||||
echo "[+] Patched IPA saved as: $PATCHED_IPA"
|
|
||||||
|
|||||||
Reference in New Issue
Block a user