adevtool/scripts/list-updated-system-apps.sh
Danny Lin fb83441e35 scripts: Add script to list updated system apps
Useful for deriving a list of presigned apps.
2021-12-14 18:43:43 -08:00

13 lines
374 B
Bash
Executable file

#!/usr/bin/env bash
set -eufo pipefail
for pkg in $(adb shell pm list packages -s | sed 's/package://g')
do
out="$(adb shell dumpsys package $pkg)"
if grep -q "path: /data/app" <<< "$out"; then
#echo $pkg
sys_dir="$(grep codePath= <<< "$out" | cut -d'=' -f2 | grep -v /data | head -n1)"
adb shell ls $sys_dir/'*.apk' | head -n1
fi
done