adb命令总结
启动apk
adb shell am start -n 包名 /. 类名关闭APK
adb shell am force-stop 包名对某一台设备进行操作
获取连接电脑的手机设备号:
adb devices对特定设备进行操作
adb -s <device id> <other>如:
adb -s <device id> shell am start -n 包名 /.类名
查看log
清空log
adb logcat -c以二进制形式输出日志
adb logcat -B过滤项解析
<tag>[:priority], 标签:日志等级, 默认的日志过滤项是 “*:I“adb logcat WifiHW:D *:S可以同时设置多个过滤器
adb logcat WifiHW:D dalvikvm:I *:S输出指定包名的日志
1
adb logcat | grep -F "`adb shell ps | grep com.amlloc.test | cut -c10-15`"