ADB命令

1、查看当前打开应用的包名

输入命令:adb shell dumpsys window w |findstr \/ |findstr name=

ADB命令_第1张图片

2、打印log日志到文件

打印main log:adb logcat -b main >  C:\Users\wanghx20\Desktop\log.txt  

打印event log:adb logcat -b events  >  C:\Users\wanghx20\Desktop\log.txt

打印进程和线程 log:adb logcat -b main -b  events -v  time -v process  -v threadtime >  C:\Users\wanghx20\Desktop\log.txt

停止打印log:Ctrl+c

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