Skip to content

Instantly share code, notes, and snippets.

@seaque
Last active February 24, 2024 19:31
Show Gist options
  • Save seaque/27524408c94d3586e9dbc914d3ad210a to your computer and use it in GitHub Desktop.
Save seaque/27524408c94d3586e9dbc914d3ad210a to your computer and use it in GitHub Desktop.
ReVanced related scripts.
repos=( cli patches integrations )
for i in "${repos[@]}"
do
curl -s https://api.github.com/repos/revanced/revanced-"$i"/releases/latest \
| grep "browser_download_url" \
| cut -d : -f 2,3 \
| tr -d \" \
| wget -qi -
done
# Get the file name
$fileCli = Get-ChildItem -Filter "revanced-cli*.jar" | Select-Object -ExpandProperty Name
$filePatches = Get-ChildItem -Filter "revanced-patches*.jar" | Select-Object -ExpandProperty Name
$fileName = Read-Host 'File'
$file = Get-ChildItem -Filter "*$fileName*.apk" | Select-Object
# Extract the version part
$CliVersion = $fileCli -replace '.*-(\d+\.\d+\.\d+)', '$1'
$PatchesVersion = $filePatches -replace '.*-(\d+\.\d+\.\d+)', '$1'
# Concatenate the name and version
$cli = "revanced-cli-$CliVersion"
$patches = "revanced-patches-$PatchesVersion"
# Use $nameWithVersion as needed
Write-Host "$cli"
Write-Host "$patches"
java -jar "$cli" patch -b "$patches" -o revanced.apk "$file"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment