mirror of
https://github.com/Evolution-X-Devices/device_google_redfin
synced 2026-02-01 11:26:33 +00:00
dumpstate: dump sensor logs to bugreport
am: 19d43eaa58
Change-Id: I4b614fc32fefa8ed78f607a9ef984b99e138951c
This commit is contained in:
@@ -324,6 +324,18 @@ static void DumpTouch(int fd) {
|
||||
}
|
||||
}
|
||||
|
||||
static void DumpSensorLog(int fd) {
|
||||
const std::string logPath = "/data/vendor/sensors/log/sensor_log.txt";
|
||||
const std::string lastlogPath = "/data/vendor/sensors/log/sensor_lastlog.txt";
|
||||
|
||||
if (!access(logPath.c_str(), R_OK)) {
|
||||
DumpFileToFd(fd, "sensor log", logPath);
|
||||
}
|
||||
if (!access(lastlogPath.c_str(), R_OK)) {
|
||||
DumpFileToFd(fd, "sensor lastlog", lastlogPath);
|
||||
}
|
||||
}
|
||||
|
||||
static void DumpF2FS(int fd) {
|
||||
DumpFileToFd(fd, "F2FS", "/sys/kernel/debug/f2fs/status");
|
||||
RunCommandToFd(fd, "F2FS - fragmentation", {"/vendor/bin/sh", "-c",
|
||||
@@ -412,6 +424,8 @@ Return<void> DumpstateDevice::dumpstateBoard(const hidl_handle& handle) {
|
||||
DumpF2FS(fd);
|
||||
DumpUFS(fd);
|
||||
|
||||
DumpSensorLog(fd);
|
||||
|
||||
DumpFileToFd(fd, "INTERRUPTS", "/proc/interrupts");
|
||||
DumpFileToFd(fd, "Sleep Stats", "/sys/power/system_sleep/stats");
|
||||
DumpFileToFd(fd, "Power Management Stats", "/sys/power/rpmh_stats/master_stats");
|
||||
|
||||
Reference in New Issue
Block a user