From 34e66966c7298445a653c5dbf82c4be1a50dae02 Mon Sep 17 00:00:00 2001 From: Jenny Ho Date: Fri, 28 Oct 2022 22:19:19 +0800 Subject: [PATCH 1/2] dumpstate: dump battery defend logbuffer Bug: 242679204 Change-Id: I59c2267105ef093a75c2cac2183c941def70b10f Signed-off-by: Jenny Ho --- conf/init.gs101.rc | 1 + dumpstate/DumpstateDevice.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/conf/init.gs101.rc b/conf/init.gs101.rc index fffdee1b..35ab767f 100644 --- a/conf/init.gs101.rc +++ b/conf/init.gs101.rc @@ -226,6 +226,7 @@ on init chown system system /dev/logbuffer_wireless chown system system /dev/logbuffer_pca9468 chown system system /dev/logbuffer_cpm + chown system system /dev/logbuffer_bd # Dump maxfg chown system system /sys/class/power_supply/maxfg/m5_model_state diff --git a/dumpstate/DumpstateDevice.cpp b/dumpstate/DumpstateDevice.cpp index cbe997ed..dbaef9aa 100644 --- a/dumpstate/DumpstateDevice.cpp +++ b/dumpstate/DumpstateDevice.cpp @@ -386,6 +386,7 @@ void DumpstateDevice::dumpPowerSection(int fd) { DumpFileToFd(fd, "TTF stats", "/sys/class/power_supply/battery/ttf_stats"); DumpFileToFd(fd, "maxq", "/dev/logbuffer_maxq"); DumpFileToFd(fd, "aacr_state", "/sys/class/power_supply/battery/aacr_state"); + DumpFileToFd(fd, "TEMP/DOCK-DEFEND", "/dev/logbuffer_bd"); RunCommandToFd(fd, "TRICKLE-DEFEND Config", {"/vendor/bin/sh", "-c", " cd /sys/devices/platform/google,battery/power_supply/battery/;" From c0825f2717933a1e33e51c4e3ca4cf413402ffef Mon Sep 17 00:00:00 2001 From: Roger Wang Date: Tue, 1 Nov 2022 14:06:22 +0800 Subject: [PATCH 2/2] wifi: remove unnecessary debug dump Since design was adjusted, we are no longer need to cat dump_start when bugreport be triggered. Bug: 256746618 Test: Trigger bugreport and check debug files. Change-Id: I907e707be99a35bfd76dfdb5f9bd693cb4b471d8 Merged-In: I907e707be99a35bfd76dfdb5f9bd693cb4b471d8 Signed-off-by: Roger Wang --- dumpstate/DumpstateDevice.cpp | 7 ------- dumpstate/DumpstateDevice.h | 1 - 2 files changed, 8 deletions(-) diff --git a/dumpstate/DumpstateDevice.cpp b/dumpstate/DumpstateDevice.cpp index dbaef9aa..b5b1d424 100644 --- a/dumpstate/DumpstateDevice.cpp +++ b/dumpstate/DumpstateDevice.cpp @@ -252,7 +252,6 @@ void endSection(int fd, const std::string §ionName, timepoint_t startTime) { DumpstateDevice::DumpstateDevice() : mTextSections{ { "pre-touch", [this](int fd) { dumpPreTouchSection(fd); } }, - { "wlan", [this](int fd) { dumpWlanSection(fd); } }, { "soc", [this](int fd) { dumpSocSection(fd); } }, { "storage", [this](int fd) { dumpStorageSection(fd); } }, { "memory", [this](int fd) { dumpMemorySection(fd); } }, @@ -304,12 +303,6 @@ void DumpstateDevice::dumpTextSection(int fd, const std::string §ionName) { "not avalable from the command line.\n", fd); } -// Dump items related to wlan -void DumpstateDevice::dumpWlanSection(int fd) { - RunCommandToFd(fd, "WLAN Debug Dump", {"/vendor/bin/sh", "-c", - "cat /sys/wifi/dump_start"}); -} - // Dump items related to power and battery void DumpstateDevice::dumpPowerSection(int fd) { struct stat buffer; diff --git a/dumpstate/DumpstateDevice.h b/dumpstate/DumpstateDevice.h index 5cc32491..a6be31b9 100644 --- a/dumpstate/DumpstateDevice.h +++ b/dumpstate/DumpstateDevice.h @@ -61,7 +61,6 @@ struct DumpstateDevice : public IDumpstateDevice { // Text sections that can be dumped individually on the command line in // addition to being included in full dumps - void dumpWlanSection(int fd); void dumpPowerSection(int fd); void dumpThermalSection(int fd); void dumpPreTouchSection(int fd);