Search code examples
androidadblogcatandroid-4.4-kitkatreboot

Does logcat log errors that are 12 hours old?


This morning my Samsung Galaxy Mega 6.3 (Android 4.4.2) rebooted suddenly. I was not doing anything at that time, and it was the very first time when it did that. I managed to pull out a logcat using adb, but about 11 hours later. Also, I don't think that logcat was enabled on my phone at the time when the error occurred. Is there a way to see an error that is 12 hours long?

I suspect that the phone rebooted due to a system update. Is there a way to see a system update history, perhaps using an app instead of a code? I need the EXACT time (date + hour) of the last update.


Solution

  • Also, I don't think that logcat was enabled on my phone at the time when the error occurred

    Logging is always enabled. LogCat simply reports what's in the log.

    Is there a way to see an error that is 12 hours long?

    The logging area is a ring buffer. It used to be fixed at 64KB. On Android 5.0, it is selectable by you via the Developer Options in the Settings app. I am not sure how big it is on Android 4.4 in general, let alone on a Samsung device.

    How old the logs can be therefore is dependent on the size of the ring buffer and how much stuff gets logged. Unfortunately, production hardware logs a lot, so I would be skeptical that you can see 12+ hours back in the log. For example, on my Nexus 5, in a 256KB log buffer, I get about 8 hours of history.

    Is there a way to see a system update history, perhaps using an app instead of a code?

    Not that I am aware of, though that would be a better question for the Android Enthusiasts Stack Exchange.