Android: How to get kernel logs after kernel panic?

后端 未结 6 1731
暖寄归人
暖寄归人 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:15

    How about /data/dontpanic folder? After kernel panic happens, you can connect USB cable with your Android device and check the files in that folder through ADB.

    I found this folder contains some apanic files after a kernel panic happens. For example, if a kernel panic just happened and you go check the folder, you might find these two files:

    apanic_console

    apanic_threads

    You can find out in apanic_threads which thread / process is running when the kernel panic happens. In apanic_console you might find out more information such as the stack trace and values of some critical registers: PC, LR, etc.
    They will help you get your debugging started.

提交回复
热议问题