adb logcat 技巧

1 adb logcat -v long BluetoothManagerService *:S
sz@ubuntu:~/Desktop$ adb logcat -v long BluetoothManagerService *:S
--------- beginning of /dev/log/system
--------- beginning of /dev/log/main
[ 06-18 20:46:30.156 845: 1117 D/BluetoothManagerService ]
unregisterStateChangeCallback+

[ 06-18 20:46:30.156 845: 908 D/BluetoothManagerService ]
Message: MESSAGE_UNREGISTER_STATE_CHANGE_CALLBACK

2 adb logcat -s WifiStateMachine wpa_supplicant //用于过滤 tag 同 adb logcat WifiStateMachine wpa_supplicant *?

3 adb logcat -s FMRadioService BaseFMRadioService fmradio | grep -i e # 用-s 指定tag ,只打印tag 为FMRadioService BaseFMRadioService fmradio 的log , 用grep过滤关键字,-i 忽略大小写

实例:adb logcat -v time -s videocamera

意思是说,会打印出 log 信息中时间,以及包含关键字 “videocamera” 的所有 log

C:\Users\Administrator>adb logcat -v time -s videocamera fulin
--------- beginning of /dev/log/system
--------- beginning of /dev/log/main
07-01 08:43:57.037 V/videocamera( 2329): VideoCamera onCreate!
07-01 08:43:57.039 I/videocamera( 2329): getExternalSdState() : removed
07-01 08:43:57.040 I/videocamera( 2329): getExternalState() : mounted
07-01 08:43:57.040 I/videocamera( 2329): Sdcard is exists ? false
07-01 08:43:57.157 V/videocamera( 2329): fulin onCreate Storage.getAvailableSpace() 1335459840
07-01 08:43:57.159 V/videocamera( 2329): fulin initThumbnailButton
07-01 08:43:57.170 D/videocamera( 2329): Thumbnail.getLastThumbnail >>>
07-01 08:43:57.204 E/videocamera( 2329): --------------readVideoPreferences---------------minutes = 600
07-01 08:43:57.205 E/videocamera( 2329): --------------readVideoPreferences----------quality6=10
07-01 08:43:57.207 E/videocamera( 2329): -----------------readVideoPreferences---------mCameraId=0
07-01 08:43:57.208 E/videocamera( 2329): -----------------readVideoPreferences---------quality7=10

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值