سؤال

Where are KERN_DEBUG log levels written to in Android? If I were, for example, to call

printk(KERN_DEBUG "666 The beast lives here 666");

then where is the output written?

هل كانت مفيدة؟

المحلول

I figured it out. In Android, output of printk can be read with

    $ adb shell cat /proc/kmsg

or, provided a prior log was written to before, then with

    $ adb shell /proc/last_kmsg

or with

    $ adb shell dmesg
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top