How to empty (clear) the logcat buffer in Android [duplicate]
adb logcat -c
Logcat options are documented here: http://developer.android.com/tools/help/logcat.html
The following command will clear only non-rooted buffers (main, system ..etc).
adb logcat -c
If you want to clear all the buffers (like radio, kernel..etc), Please use the following commands
adb rootadb logcat -b all -c
or
adb rootadb shell logcat -b all -c
Use the following commands to know the list of buffers that device supports
adb logcat -gadb logcat -b all -gadb shell logcat -b all -g
I give my solution for Mac:
- With your device connected to the USB port, open a terminal and goto the adb folder.
- Write: ./adb devices
- The terminal will show something like this:List of devices attached 36ac5997 device
- Take note of the serial number (36ac5997)
- Write: ./adb -s 36ac5997 to connect to the device
- Write: ./adb logcat
If at any time you want to clear the log, type ./adb logcat -c