Android: How to get kernel logs after kernel panic?

后端 未结 6 1728
暖寄归人
暖寄归人 2020-12-04 15:09

I am using an Android Custom ROM on my device, also with a custom boot.img (custom kernel + cmdline + ramdisk). I now want to be able to view the kernel logs immediately aft

6条回答
  •  离开以前
    2020-12-04 15:31

    Android creates a RAM console and attempts to save the last kernel message buffer for you in RAM (assuming the power doesn't go out). You can access this file through the proc interface and on my system it is world readable:

    cat /proc/last_kmsg
    

    For more information see the kernel code @ drivers/staging/android/ram_console.c

提交回复
热议问题