adb shell command to check the apk is debug or release signed?

Lava Sangeetham picture Lava Sangeetham · Jan 11, 2017 · Viewed 8k times · Source

How to check if apk is debug or release signed?
Is there any direct adb command to verify apk signature?

Tried the following dumpsys and aapt commands, but I am not able to find the exact flag

adb shell dumpsys package <package name>
aapt dump badging <apk file>

How to find out the given apk is debug or release signed? How to know which builds (user, userdebug or eng) we can install this apk?

Answer

Rohith Krishnan picture Rohith Krishnan · Jan 12, 2017

If you want to check whether the apk is debuggable use the below aapt command.

aapt dump badging /path/to/apk | grep -c application-debuggable

Outputs 1: Debuggable Outputs 0: Not Debuggable.