android命令抓LOG

手机和电脑,在电脑上开3个命令窗口,分别输入如下3个命令分别抓取mainLog、radioLog和kernalLog
adb logcat -v time >main.txt
adb logcat -v time -b radio >radio.txt
adb shell cat proc/kmsg >uart.txt
如果是抓取开机Log,可以先输入命令等待设备,在开机。

------------------------------------------

radio log 和 mian log 一起抓

adb logcat -b system -b main -b radio -v time

------------------------------------------

在代码中对Log输出会有判断如:

if (Log.isLoggable(LogTag.APP, Log.VERBOSE)) {
       Log.v(TAG, "onSizeChanged: w=" + width + " h=" + height + " oldw=" + oldWidth + " oldh=" + oldHeight);
}

如果APP默认关闭了Log.VERBOSE,用命令adb shell setprop log.tag.APP V 开启Log.VERBOSE。然后再抓Log。

转载于:https://www.cnblogs.com/antoon/p/5238407.html

你可能感兴趣的:(android命令抓LOG)