Reading kernel logs

To find out what happened during an unsuccessful boot you can check the kernel log files. These can usually be retrieved from /proc/last_kmsg after rebooting the device into another, working system. TWRP or some other recovery is suggested here as that other system. Alternatively you could use the halium-boot init in telnet access.

  1. Boot your newly built image
  2. Wait for it to fail
  3. Reboot the device into the working system.
  4. Retrieve the kernel log with adb shell cat /proc/last_kmsg > ~/last_kmsg
  5. Read ~/last_kmsg and find out what went wrong


Make sure you do not power the device off and on again. It must be a reboot in order to keep the contents of the ram and therefore the log.


If you can’t get the log file, double check that you have the two necessary configs:


Some porters report that they still cannot get the logs to work. Your milage may vary.


Newer kernels do not have /proc/last_kmsg but instead /sys/fs/pstore/console-ramoops. Or is it /sys/fs/pstore/console-ramoops-0?