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

后端 未结 6 824
陌清茗
陌清茗 2021-01-13 09:47

I am developing an application and during my testing on a real device I have found that it will crash and cause the phone to reboot (worrying I know...)

Is there any

相关标签:
6条回答
  • 2021-01-13 10:13

    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.

    0 讨论(0)
  • 2021-01-13 10:16

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

    0 讨论(0)
  • 2021-01-13 10:20

    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

    0 讨论(0)
  • 2021-01-13 10:24

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

    0 讨论(0)
  • 2021-01-13 10:32

    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.

    0 讨论(0)
  • 2021-01-13 10:32

    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

    0 讨论(0)
提交回复
热议问题