Last active
December 16, 2021 13:57
-
-
Save inlacou/ae9c480e2b2082ca1f78134ace947439 to your computer and use it in GitHub Desktop.
[Android][ADB] list installed packages
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
ALL: | |
adb shell pm list packages -f | |
FILTER: | |
adb shell pm list packages -f | grep inlacou |
List all with requested and given permissions:
for p in adb shell pm list package | awk -F"package:" '{print $2}'
; do echo -n "$p: "; adb shell dumpsys package $p | grep -i permission; done
List all with versionCode:
for p in adb shell pm list package | awk -F"package:" '{print $2}'
; do echo -n "$p: "; adb shell dumpsys package $p | grep -i versionCode; done
List all filtered with versionCode (just added the | grep inlacou
):
for p in adb shell pm list package | grep inlacou | awk -F"package:" '{print $2}'
; do echo -n "$p: "; adb shell dumpsys package $p | grep -i versionCode; done
Get versionCode from apk:
~/Android/Sdk/build-tools/30.0.2/aapt2 dump badging actia.sample.20.8.9.435v7a.apk | grep versionCode | awk -F" " '{print $3}'
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
List all with their version name:
for p in
adb shell pm list package | awk -F"package:" '{print $2}'
; do echo -n "$p: "; adb shell dumpsys package $p | grep -i versionName | awk -F"=" '{print $2}'; done