Can I get logcat logs after phone reboots?

前端 未结 3 760
太阳男子
太阳男子 2020-12-07 23:01

I\'m testing an android application with a long running service. I\'m using Eclipse and have the usb cord hooked up with the phone sitting next to me. Since it\'s a long ong

相关标签:
3条回答
  • 2020-12-07 23:42

    You can use adb bugreport, which should contain some information regarding a spurious reboot - for example, a kernel panic, last logcat entries etc.

    Be warned, though: this tool outputs immense amounts of information, so you'll have to dig deep to find what you need.

    0 讨论(0)
  • 2020-12-07 23:48

    I have run into this problem as well. It should be possible to write an app that continuously saves the logcat output to a file on the SD card. There are apps on the market that display the logcat output, so I know it is accessible from within an application.

    @djv, I wasn't able to find a /log directory in either root or /data on my phone.

    0 讨论(0)
  • 2020-12-08 00:05

    I don't know of any way to do this. However, you could start up logcat in adb with adb logcat -v time > logcat.txt and then run your app again. If it crashes a second time, then you can go look at the output in logcat.txt on your machine.

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