adb shell command to check the apk is debug or rel

2020-04-08 01:31发布

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?

3条回答
不美不萌又怎样
2楼-- · 2020-04-08 01:57

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.

查看更多
Luminary・发光体
3楼-- · 2020-04-08 02:10

You seem to be confused. Apks usually have debug and release versions. And eng, userdebug and user build types are used for the whole firmware images.

You can find build information (if properly populated by builder) by using

adb shell getprop ro.build.fingerprint
查看更多
看我几分像从前
4楼-- · 2020-04-08 02:13

i've tried a lot of stuff and came upon the following solution:

adb shell dumpsys package <package name> | findstr flags

if the build is debuggable, the "flags" line will have "DEBUGGABLE" parameter present. If it's not there, the build is not debug

查看更多
登录 后发表回答