/***************************************************************************** * dos保存adb logcat读取的Android信息 * 声明: * 由于dos下用logcat直接看Android系统信息不方便,眼花缭乱,眼神真心不好使, * 于是觉得dos下面应该有办法能够将logcat信息保存下来,于是找到这个重定向的方式。 * * 2015-12-31 深圳 南山平山村 曾剑锋 ****************************************************************************/ 一、参考文档: cmd连接android手机,并使用logcat输出的log信息 http://jingyan.baidu.com/article/86112f135add5627379787ee.html 二、adb logcat -h Usage: logcat [options] [filterspecs] options include: -s Set default filter to silent. Like specifying filterspec '*:s' -f <filename> Log to file. Default to stdout -r [<kbytes>] Rotate log every kbytes. (16 if unspecified). Requires -f -n <count> Sets max number of rotated logs to <count>, default 4 -v <format> Sets the log print format, where <format> is one of: brief process tag thread raw time threadtime long -c clear (flush) the entire log and exit -d dump the log and then exit (don't block) -t <count> print only the most recent <count> lines (implies -d) -g get the size of the log's ring buffer and exit -b <buffer> Request alternate ring buffer, 'main', 'system', 'radio' or 'events'. Multiple -b parameters are allowed and the results are interleaved. The default is -b main -b system. -B output the log in binary 三、解决方法: adb logcat -v time -b radio > ublox.txt 四、ublox.txt部分内容: ...... 01-01 00:05:12.840 D/GSM ( 2758): [ApnContext:fota] setRetryCount: 0 01-01 00:05:12.840 D/GSM ( 2758): [ApnContext:supl] setRetryCount: 0 01-01 00:05:12.840 D/GSM ( 2758): [ApnContext:hipri] setRetryCount: 0 01-01 00:05:12.840 D/GSM ( 2758): [ApnContext:ims] setRetryCount: 0 01-01 00:05:12.840 D/GSM ( 2758): [ApnContext:default] setRetryCount: 0 01-01 00:05:12.840 D/GSM ( 2758): [ApnContext:mms] setRetryCount: 0 01-01 00:05:12.840 D/GSM ( 2758): [ApnContext:cbs] setRetryCount: 0 01-01 00:05:12.840 D/GSM ( 2758): [GsmDCT] onRoamingOff ......
时间: 2024-09-16 03:37:53