Created
April 22, 2025 12:11
-
-
Save cabiamdos/cbe8feaa3a289ef9ffb84f78a2877be3 to your computer and use it in GitHub Desktop.
powershell script for backing up your android apk files
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 list of installed packages with file paths | |
$packages = adb shell pm list packages -f | |
# Loop through each line | |
foreach ($line in $packages) { | |
# Extract APK path and package name | |
if ($line -match "package:(.+\.apk)=(.+)") { | |
$apkPath = $matches[1] | |
$packageName = $matches[2] | |
Write-Host "Backing up: $packageName from $apkPath" | |
# Pull APK to current folder | |
adb pull $apkPath "$packageName.apk" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment