What log source is used by logcat (with default settings: adb shell logcat). Are dmesg logs included in logcat’s output? If not, what’s the difference between dmesg logs and logcat logs?
What log source is used by logcat (with default settings: adb shell logcat ).
Share
According to the source code https://github.com/android/platform_system_core/blob/master/liblog/logd_write.c
Log.d(String tag, String message)writes directly to/dev/log/main.You can write there like this
adb shell echo "Hello world" >> /dev/log/mainBut
dmesgprints the contents of the kernel’s ring buffer. Sodmesgwill print only what system writes to kernel log,logcatwill output only android app’s logs.