By 9exceptionThrower9


2012-07-25 15:12:48 8 Comments

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)

1 comments

@Zuul 2012-07-25 17:00:14

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.


References

@9exceptionThrower9 2012-07-25 18:02:08

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?

@Zuul 2012-07-25 18:22:44

@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 2012-07-25 18:24:29

@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 :)

Related Questions

Sponsored Content

1 Answered Questions

How to see Android OS System log file?

  • 2019-12-13 21:30:06
  • Mohsen Emami
  • 222 View
  • 0 Score
  • 1 Answer
  • Tags:   adb logging

1 Answered Questions

1 Answered Questions

[SOLVED] Access Android log files for specific periods on android 7

5 Answered Questions

[SOLVED] How can I view and examine the Android log?

  • 2011-10-11 09:03:03
  • Flow
  • 527987 View
  • 122 Score
  • 5 Answer
  • Tags:   logging

4 Answered Questions

[SOLVED] Can I delete the log files on my device?

  • 2011-12-13 18:40:33
  • truell
  • 84265 View
  • 7 Score
  • 4 Answer
  • Tags:   logging

3 Answered Questions

[SOLVED] How can I access android log files on my Nexus 7 without root access?

2 Answered Questions

[SOLVED] Troubleshooting the Android Emulator

1 Answered Questions

[SOLVED] Skinning the Android emulator

  • 2010-09-17 08:49:04
  • Paresh Mayani
  • 946 View
  • 4 Score
  • 1 Answer
  • Tags:   android-emulator

Sponsored Content