logcat 是否记录 12 小时前的错误?

Does logcat log errors that are 12 hours old?

今天早上我的 Samsung Galaxy Mega 6.3 (Android 4.4.2) 突然重启了。当时我什么都没做,它这样做还是第一次。 我设法使用 adb 提取了 logcat,但大约 11 小时后。另外,我不认为 logcat 在发生错误时在我的 phone 上启用。有没有办法查看长达 12 小时的错误?

我怀疑 phone 由于系统更新而重新启动。有没有办法查看系统更新历史记录,也许使用应用程序而不是代码?我需要上次更新的确切时间(日期 + 小时)。

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

始终启用日志记录。 LogCat 只报告日志中的内容。

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

日志区域是一个环形缓冲区。它曾经固定为 64KB。在 Android 5.0 中,您可以通过“设置”应用中的“开发者选项”选择它。我不确定它在 Android 4.4 上一般有多大,更不用说在三星设备上了。

因此,日志的保存时间取决于环形缓冲区的大小以及记录了多少内容。不幸的是,生产硬件日志很多,所以我怀疑您能否在日志中看到 12 小时以上的时间。例如,在我的 Nexus 5 上,在一个 256KB 的日志缓冲区中,我获得了大约 8 小时的历史记录。

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

据我所知,这对 the Android Enthusiasts Stack Exchange 来说是一个更好的问题。