android根据包名打印日志

1
2
3
4
5
6
7
Linux or Mac:
adb logcat | grep -F "`adb shell ps | grep com.abc.package | cut -c10-15`"
windows:
adb logcat | findstr com.abc.package

adb logcat -v time | find “XXX” >D:\myLog2.txt
"XXX"可以用包名,或者关键字去代替。