android adb 常见命令

查看应用内存:adb shell dumpsys meminfo <包名>
查看当前页面activity:adb shell "dumpsys activity top | grep ACTIVITY 或者

adb shell dumpsys activity top |findstr <包名>
adb shell dumpsys activity activities | findstr <包名> |findstr Run
当前可见fragment:adb shell "dumpsys activity top | grep '#[0-9]: ' | tail -n 1" 
安装命令:adb install
卸载:adb uninstall <包名>
导出bug:adb bugreport 、adb logcat > log.txt
查看进程:adb shell ps |findstr <包名>

输出单个app的log:adb logcat -d --pid=xxx
adb logcat -d --pid=1150 > e:/log888.txt

查看app版本号:adb shell pm dump <包名> | findstr "version"

清理缓存:adb shell pm clear <包名>

你可能感兴趣的:(android,adb)