Everything I've read indicates /proc/last_kmsg used to be how, however that seems to have changed with Android 6.0 (I'm on 8.1). I've also seen reference to /sys/fs/pstore/console-ramoops for Android 6.0+, but I have no file called that. I can't ls the directory either, because apparently I don't have root shell with adb.

I've tried adb bugreport, but that doesn't seem to contain shutdown logs. I've tried adb root, but I get the message:

adbd cannot run as root in production builds

I have a Nexus 5x that is rooted, with TWRP and Magisk.

The only other suggestion I've seen is to edit '/system/build.prop' to include the line ro.debuggable=1, but I can't access that file either due to a lack of root access.

I've spent a week trying to sort this out. Surely it can't be this hard to find shutdown logs?

  • Persistent store doesn't exist on your device because your kernel isn't built with CONFIG_PSTORE_* options. Last_kmsg also works if phone isn't manually restarted. Yes, only on userdebug and engineering builds of ROM, adbd can run as root, not on user builds. In fact you can't do any reasonable debugging on non-debug ROMs without root access. Btw why are you looking for kernel logs? Are you building some ROM? Apr 2, 2019 at 21:20
  • Why are you trying to read the shutdown logs ? May be there's another method of diagnosis. Have you tried logcat ? Apr 7, 2019 at 7:44


You must log in to answer this question.

Browse other questions tagged .