Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
if test $# -lt 1 ; then
echo "Usage: download_apk.sh <target-dir>"
exit 1
fi
for LINE in $(adb shell pm list packages -f -3|sed 's/package://g'); do
APK_PATH=$(echo "$LINE" | cut -d'=' -f1)
FILE=$1/$(echo "${LINE}" | cut -d'=' -f2 | sed 's/\r$//').apk