ADB调试命令简介
一:命令行
adb -help 查看adb 命令简介
adb start-server启动服务
adb kill-server 杀掉服务
adb devices 查看设备号
adb reboot 重启
adb shell 进入设备
adb -s xxxx shell 对指定设备操作:xxx每个设备的设备号
二:logcat
adb logcat > log.txt ==》‘>’新建并日志输出到txt文档中,'>>'第一次新建txt,后期增量填入log到文件
adb pull /data/log xxxx pull 设备路径 =====> windows 本地路径
adb push xxxx /data/log push windows 本地路径 ===>设备路径
adb logcat |findstr 包名或|grep 包名 ==》查看apk运行日志
Android 的日志分为如下几个优先级(priority):
V —— Verbose(最低,输出得最多)
D —— Debug
I —— Info
W —— Warning
E —— Error
F —— Fatal
S —— Silent(最高,啥也不输出)
按某级别过滤日志则会将该级别及以上的日志输出。
比如,命令:
adb logcat *:W
adb logcat -c ====&#