Android: Retrieve logcat before crash (reboot) on a real device

邮差的信 提交于 2019-12-01 05:26:49

Use http://code.google.com/p/acra/, which is a great lib to send crash reports to a google form incl. stack trace. I use it in my app and works nicely. Let me know if you have any difficulties implementing it. Read the http://code.google.com/p/acra/wiki/ACRAHowTo, it's easy to setup.

From slashfoo's blog, (check the logcat page for exact syntax) hook up your computer to start off the logcat process in the background. adb shell nohup logcat -f /dev/[your sdcard] -n60 -r3600

Although it means logcat will be saved to the sdcard but every time you reboot, you must perform the procedure again.

fivef

Easiest way: Get aLogrec from Market for free. This app saves the logs to sdcard.

Updating for 2019, Fabric, which was purchased by Google, does an excellent job of remote logging app crashes. Integration into the app was simple, and it is free (at least at whatever level I'm using it). It has been extremely valuable to finding defects in my apps.

https://www.fabric.io

Try to open a terminal/command prompt and issue this in it :
adb -d logcat
This should dump you a live version of the logcat you could read to find the problem

Use the alogrec program. It writes the log to the SD card, and will automatically resume after rebooting.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!