Last active
January 5, 2025 09:52
-
-
Save seaque/27524408c94d3586e9dbc914d3ad210a to your computer and use it in GitHub Desktop.
ReVanced related scripts.
This file contains hidden or 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 hidden or 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 "patches-*.rvp" | 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 = "patches-$PatchesVersion" | |
# Use $nameWithVersion as needed | |
Write-Host "[CLI VERSION] $cli" | |
Write-Host "[PATCHES VERSION] $patches" | |
Write-Host "[FILE NAME] $file" | |
Write-Host "--------------------" | |
java -jar "$cli" patch --patches "$patches" -o "ReVanced-$file" "$file" | |
# Ask if the device is connected | |
$isConnected = Read-Host 'Is your device connected (y)? Press any key to exit.' | |
if ($isConnected -eq 'y') { | |
# Install the APK using adb | |
adb install "ReVanced-$file" | |
} else { | |
Write-Host "Exiting program." | |
exit | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment