This commit is contained in:
siritami
2023-05-01 16:02:27 +07:00
parent eb131e496b
commit 36d17ef76e
9 changed files with 304 additions and 8 deletions

View File

@@ -1,12 +1,23 @@
#!/bin/bash
DIR_TMP="$(mktemp -d)"
echo "⏬ Downloading Revanced resources..."
for repos in revanced-patches revanced-cli revanced-integrations; do
curl -s "https://api.github.com/repos/revanced/$repos/releases/latest" | jq -r '.assets[].browser_download_url' | xargs -n 1 curl -sL -O
done
echo "⚙️ Importing Patches..."
EXCLUDE_PATCHES=()
for word in $(cat src/messenger/exclude-patches.txt) ; do
EXCLUDE_PATCHES+=("-e $word")
done
curl --retry 10 --retry-max-time 60 -H "Cache-Control: no-cache" -fsSL github.com/EFForg/apkeep/releases/latest/download/apkeep-x86_64-unknown-linux-gnu -o ${DIR_TMP}/apkkeep
chmod +x ${DIR_TMP}/apkkeep && ${DIR_TMP}/apkkeep -a com.facebook.orca .
echo "⏬ Downloading apkeep resources..."
curl --retry 10 --retry-max-time 60 -H "Cache-Control: no-cache" -fsSL github.com/EFForg/apkeep/releases/latest/download/apkeep-x86_64-unknown-linux-gnu -o ${DIR_TMP}/apkeep
echo "⏬ Downloading Messenger..."
chmod +x ${DIR_TMP}/apkeep
${DIR_TMP}/apkeep -a com.facebook.orca -d google-play -o split_apk=false,locale=vi_VN -i ~/apkeep.ini .
echo "⚙️ Patching Messenger..."
java -jar revanced-cli*.jar -m revanced-integrations*.apk -b revanced-patches*.jar ${EXCLUDE_PATCHES[@]} -a com.facebook.orca.apk --keystore=ks.keystore -o Messenger.apk