How to list all debuggable applications?

后端 未结 2 1122
小蘑菇
小蘑菇 2020-12-19 16:14

I want to see all the debuggable applications that are installed on my android phone.

Can I know them using adb? If yes, how?

相关标签:
2条回答
  • 2020-12-19 16:34

    The 3rd column in the /data/system/packages.list has the debuggable flag.

    So you can do adb shell grep " 1 /" /data/system/packages.list to list all debuggable packages.

    0 讨论(0)
  • 2020-12-19 16:38

    The packages.list file is readable on rooted phones only. You can do something like this in an adb shell:

    for p in $(pm list packages | cut -d : -f 2); do (run-as $p id >/dev/null 2>&1 && echo $p); done
    
    0 讨论(0)
提交回复
热议问题