/*****************************************************************************
* 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. ( if unspecified). Requires -f
-n <count> Sets max number of rotated logs to <count>, default
-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部分内容:
......
- ::12.840 D/GSM ( ): [ApnContext:fota] setRetryCount:
- ::12.840 D/GSM ( ): [ApnContext:supl] setRetryCount:
- ::12.840 D/GSM ( ): [ApnContext:hipri] setRetryCount:
- ::12.840 D/GSM ( ): [ApnContext:ims] setRetryCount:
- ::12.840 D/GSM ( ): [ApnContext:default] setRetryCount:
- ::12.840 D/GSM ( ): [ApnContext:mms] setRetryCount:
- ::12.840 D/GSM ( ): [ApnContext:cbs] setRetryCount:
- ::12.840 D/GSM ( ): [GsmDCT] onRoamingOff
......