Let's say I am working with the Android emulator, and get it to run one of my custom images/custom kernels, and it gets stuck in a boot-loop or crashes after a little while in booting up, does it produce a log file that I can look through? And if so, where does it store this "boot" log? (most likely somewhere in the Android build tree)

  • you could also just do an 'adb logcat' and start your instance to see what happens
    – ce4
    Commented Jul 25, 2012 at 15:18
  • Yeah but it just says <waiting for device>. And if the emulator is simulating the phone crashing, does the emulator itself produce any log messages? Commented Jul 25, 2012 at 16:00
  • Well, the emulator itself is just fine. Simulating phone crashes and reboot loops is just as indifferent to it as normal operation
    – ce4
    Commented Jul 25, 2012 at 16:04
  • There are some questions about it on Stackoverflow (google search), it's more dev related though but there are a number of hits. Most probably it has to do something with either permissions for adb or your build is not adb enabled
    – ce4
    Commented Jul 25, 2012 at 16:13

1 Answer 1


kernel panic

When a kernel panic occurs all user space programs are immediately stopped, preventing a user from detecting the cause of the panic: logcat; dmesg and /proc/kmsg will do you no good.

You can still check the /data/dontpanic/ folder for any files present, like:

apanic_console or apanic_threads

kernel boot

Method of logging kernel messages:

  1. invoke "dmesg":

    • See it as it happens:

      # adb shell dmesg
    • Direct to a file on your sdcard and see it later

      # adb shell dmesg >/mnt/sdcard/dmesg.txt
  2. "tail" the kernel if "syslogd" and /var are available:

    # adb shell cat /proc/kmsg
  3. dump the kernel file /proc/kmsg:

    # adb shell cat /proc/kmsg

Note: You may need to issue su to gain permissions over some files if you're stuck with an error message. Alternatively, removing shell from the command will execute it on the computer side, not on the phone.


  • This is great information (as well as the posts you reference). However, it seems there's one massive wall every developer is going to run into: what about a BOOT-LOOP? You're phone (or emulator) crashes as it boots up with your installed image, and keeps trying to reboot, but keeps crashing. How do you get kernel messages or any kind of log to figure out how far the phone gets? Commented Jul 25, 2012 at 18:02
  • @9exceptionThrower9 All comes down to the cause! you may check for the folder /data/dontpanic/ for logs concerning the kernel failure or act according to instructions provided by eldarerathis (first link on the references section).
    – Zuul
    Commented Jul 25, 2012 at 18:22
  • @9exceptionThrower9 Keep in mind that this type of issues are prone to be very specific, since they depend on many variables. Ain't easy to have a bulletproof solution :)
    – Zuul
    Commented Jul 25, 2012 at 18:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .