0%

安卓调试

1.找到当前运行APP的包名

1
$ adb shell dumpsys window | grep mCurrentFocus

2.找到应用备份包的位置

1
$ adb shell pm path [com.package.name]

3.提取安装包

1
$ adb pull [/data/app/…/…/base.apk] [localPath(提取到本地地址)]

4.查看将要启动app的包名

1
$ adb shell am monitor

5.查看所有启动的应用的包名

1
$ adb shell dumpsys activity activities | grep "Run"

6.查看启动的app的包名

1
$ adb shell dumpsys activity top | grep "ACTIVITY"

查看某个包的logcat

1
$ adb logcat | grep -F "`adb shell ps | grep  [com.package.name] | awk '{print $2}'`"