diff options
author | Todd Poynor <toddpoynor@google.com> | 2013-11-22 17:15:49 -0800 |
---|---|---|
committer | Ethan Chen <intervigil@gmail.com> | 2015-03-15 01:31:21 +0000 |
commit | ed6461569bc8dadb90750aa0bd503353c6ca670a (patch) | |
tree | bc4c03a8185d2cf47ac1165086e58af1d39b4f1d | |
parent | 9bb2da1373abfb59805a7e73453bc1d5b349116b (diff) | |
download | android_frameworks_base-stable/cm-11.0-XNF8Y.tar.gz android_frameworks_base-stable/cm-11.0-XNF8Y.tar.bz2 android_frameworks_base-stable/cm-11.0-XNF8Y.zip |
Add previous console on pstore to DropBoxstable/cm-11.0-XNF8Y
Change-Id: I23c0213fe3d52280d7338ca62cb7e79b80a16cc6
-rw-r--r-- | services/java/com/android/server/BootReceiver.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/services/java/com/android/server/BootReceiver.java b/services/java/com/android/server/BootReceiver.java index 5b73ef1cab4..d2ff8390cb0 100644 --- a/services/java/com/android/server/BootReceiver.java +++ b/services/java/com/android/server/BootReceiver.java @@ -124,6 +124,8 @@ public class BootReceiver extends BroadcastReceiver { // Negative sizes mean to take the *tail* of the file (see FileUtils.readTextFile()) addFileToDropBox(db, prefs, headers, "/proc/last_kmsg", -LOG_SIZE, "SYSTEM_LAST_KMSG"); + addFileToDropBox(db, prefs, headers, "/sys/fs/pstore/console-ramoops", + -LOG_SIZE, "SYSTEM_LAST_KMSG"); addFileToDropBox(db, prefs, headers, "/cache/recovery/log", -LOG_SIZE, "SYSTEM_RECOVERY_LOG"); addFileToDropBox(db, prefs, headers, "/data/dontpanic/apanic_console", @@ -189,6 +191,11 @@ public class BootReceiver extends BroadcastReceiver { File file = new File("/proc/last_kmsg"); long fileTime = file.lastModified(); + if (fileTime <= 0) { + file = new File("/sys/fs/pstore/console-ramoops"); + fileTime = file.lastModified(); + } + if (fileTime <= 0) return; // File does not exist if (prefs != null) { |