Use a script to record both Logcat and kmsg information in the ADB using the same scenario without using the log apk, or by choosing to log the log yourself.
This time use two scripts a background run a premise run, file path can be set
1. Background run file name: kmsg_log.sh, the content is a word
ADB logcat > $
2, the front office running files: kmsg.sh
#!/bin/bash#@ echo ***### #按格式获取时间信息date_ymd=$ (date +%y%m%d) Date_hm=$ (date +%y%m%d_%h_%m)###### #设置需要获取的地址if[" $"!=""]thenlogcat_dst_path="/home/putao/virtualbox/logcat/$date _ymd/$date _hm"_" $"ElseLogcat_dst_path="/home/putao/virtualbox/logcat/$date _ymd/$date _hm"fi/bin/mkdir-P$logcat _dst_pathadbwait- for-Deviceecho"Device Plugin"adb root adbwait- for-Deviceecho"Device Plugin"adb Remountecho"Kernel log"./kmsg_log.sh$logcat _dst_path/"Logcat".Log&adb shell Cat/proc/kmsg >$logcat _dst_path/"Kernel".LogEcho"Logcat"#adb logcat > $logcat _dst_path/"logcat". txt
At the same time record adb logcat information has corresponding KMSG kernel related information