Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit af06f11b authored by Mark Salyzyn's avatar Mark Salyzyn Committed by Luca Stefani
Browse files

BootReceiver: check console-ramoops-0

On later kernels /sys/pstore/console-ramoops becomes
/sys/fs/pstore/console-ramoops-0

Test: none
Bug: 63058217
Change-Id: Ia68c0b5741c35cb35f10be6bbce93e0f0c92480f
parent d1371847
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -195,6 +195,8 @@ public class BootReceiver extends BroadcastReceiver {
                    "/proc/last_kmsg", -LOG_SIZE, "SYSTEM_LAST_KMSG");
                    "/proc/last_kmsg", -LOG_SIZE, "SYSTEM_LAST_KMSG");
            addFileWithFootersToDropBox(db, timestamps, headers, lastKmsgFooter,
            addFileWithFootersToDropBox(db, timestamps, headers, lastKmsgFooter,
                    "/sys/fs/pstore/console-ramoops", -LOG_SIZE, "SYSTEM_LAST_KMSG");
                    "/sys/fs/pstore/console-ramoops", -LOG_SIZE, "SYSTEM_LAST_KMSG");
            addFileWithFootersToDropBox(db, timestamps, headers, lastKmsgFooter,
                    "/sys/fs/pstore/console-ramoops-0", -LOG_SIZE, "SYSTEM_LAST_KMSG");
            addFileToDropBox(db, timestamps, headers, "/cache/recovery/log", -LOG_SIZE,
            addFileToDropBox(db, timestamps, headers, "/cache/recovery/log", -LOG_SIZE,
                    "SYSTEM_RECOVERY_LOG");
                    "SYSTEM_RECOVERY_LOG");
            addFileToDropBox(db, timestamps, headers, "/cache/recovery/last_kmsg",
            addFileToDropBox(db, timestamps, headers, "/cache/recovery/last_kmsg",
@@ -276,6 +278,10 @@ public class BootReceiver extends BroadcastReceiver {
        if (fileTime <= 0) {
        if (fileTime <= 0) {
            file = new File("/sys/fs/pstore/console-ramoops");
            file = new File("/sys/fs/pstore/console-ramoops");
            fileTime = file.lastModified();
            fileTime = file.lastModified();
            if (fileTime <= 0) {
                file = new File("/sys/fs/pstore/console-ramoops-0");
                fileTime = file.lastModified();
            }
        }
        }


        if (fileTime <= 0) return;  // File does not exist
        if (fileTime <= 0) return;  // File does not exist