Sunday 17 April 2011

Diagnosing Intermittent Android Events Such As Reboots via Log Capture

When your phone's problem doesn't involve reboots and it is fairly predictable etc you can use tools like "Log Collector" to manually send an email to yourself containing the log of Android's activity after you have noticed the issue occur.

When a reboot is involved (like the HTC one that occurs to me overnight) you really want to record what is happening all the time and the reboot will effectively stop the recording for you :-)

I've been using "CatLog - Logcat Reader!" but another possibility I found was "aLogcat (free) - logcat" (just found a CatLog varient called "LogViewer (LogCat)").

The "CatLog" program has a "Write Period" setting, the smaller the value the closer you will capture to the time of reboot but the more it will impact (I'm guessing) your phone's performance. As it writes to the SDCARD, if its the cra@ppy one that came with your phone the performance won't be as good as with a class 10 card :-)

I'd also recommend that you power your phone or at least watch the remaining charge closely to know how much it impacts your battery life.

If you don't mind being attached to your computer then the Android SDK's "Dalvik Debug Monitor" (DDMS) can capture this trace information also and doesn't have the "Write Period" issue either :-)

No comments: