Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

How to get logs

Marcel Bokhorst edited this page May 9, 2013 · 21 revisions

###General###

There are two kind of restarts:

  1. Android restart
  2. Kernel restart

The difference is that you will / will not see the kernel logo. This is important for the kind of log needed.

###Prerequisites###

  1. Android Debug Bridge (Linux: sudo apt-get install android-tools-adb)
  2. BetterBatteryStats

###Logs###

  • Android log: adb logcat -d or use an app like CatLog
  • Last kernel log: adb shell su -c 'cat /proc/last_kmsg' (see also the remark below)
  • Current kernel log: adb shell su -c 'dmesg'
  • Battery usage: BetterBatteryStats: Menu > Dump to File
  • Paste the logs on pastbin or a similar service, like gist
  • Create/update an issue and provide the link to the pasted log

If you had a kernel crash (reboot), try to capture the log in recovery before starting Android again.

  • adb shell cat /proc/last_kmsg

If you want to get the logs on your device, open a terminal, type the su command and:

  • Android log: logcat -d >/sdcard/logcat.txt
  • Last kernel log: cat /proc/last_kmsg >/sdcard/last_kmsg.txt
  • Current kernel log: dmesg >/sdcard/dmsg.txt

###Advanced###

If you enable adb over Wi-Fi on your device, you can get the Adroid log over Wi-Fi by connecting to your device like this:

adb connect IP:PORT

See here for more adb commands.