Last active
February 24, 2024 19:31
-
-
Save seaque/27524408c94d3586e9dbc914d3ad210a to your computer and use it in GitHub Desktop.
ReVanced related scripts.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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