From 7ee63ad73fcb47288438af09244fe47bb69e9a64 Mon Sep 17 00:00:00 2001 From: Adam Shih Date: Wed, 14 Dec 2022 13:34:28 +0800 Subject: [PATCH] create an empty dump for wlan Bug: 261784587 Test: adb bugreport Change-Id: Iaeac8e61f9c03ac4b7f6010d7f9b248c0de8415e --- device.mk | 2 ++ dumpstate/Android.bp | 7 +++++++ dumpstate/Dumpstate.cpp | 10 ---------- dumpstate/Dumpstate.h | 1 - dumpstate/dump_wlan.sh | 3 +++ dumpstate/item.mk | 1 + 6 files changed, 13 insertions(+), 11 deletions(-) create mode 100644 dumpstate/dump_wlan.sh create mode 100644 dumpstate/item.mk diff --git a/device.mk b/device.mk index ffd47be5..f4921dc3 100644 --- a/device.mk +++ b/device.mk @@ -24,6 +24,8 @@ include device/google/gs-common/trusty/trusty.mk include device/google/gs-common/storage/storage.mk include device/google/gs-common/thermal/thermal.mk +include device/google/zuma/dumpstate/item.mk + ifneq ($(BOARD_WITHOUT_RADIO),true) include device/google/gs-common/gps/brcm/device.mk endif diff --git a/dumpstate/Android.bp b/dumpstate/Android.bp index ddcea259..ae733797 100644 --- a/dumpstate/Android.bp +++ b/dumpstate/Android.bp @@ -2,6 +2,13 @@ package { default_applicable_licenses: ["Android-Apache-2.0"], } +sh_binary { + name: "dump_wlan.sh", + src: "dump_wlan.sh", + vendor: true, + sub_dir: "dump", +} + cc_binary { name: "android.hardware.dumpstate-service.zuma", srcs: [ diff --git a/dumpstate/Dumpstate.cpp b/dumpstate/Dumpstate.cpp index 92bd2532..453922d0 100644 --- a/dumpstate/Dumpstate.cpp +++ b/dumpstate/Dumpstate.cpp @@ -221,7 +221,6 @@ void endSection(int fd, const std::string §ionName, timepoint_t startTime) { Dumpstate::Dumpstate() : mTextSections{ - { "wlan", [this](int fd) { dumpWlanSection(fd); } }, { "memory", [this](int fd) { dumpMemorySection(fd); } }, { "Devfreq", [this](int fd) { dumpDevfreqSection(fd); } }, { "cpu", [this](int fd) { dumpCpuSection(fd); } }, @@ -297,15 +296,6 @@ void Dumpstate::dumpTextSection(int fd, const std::string §ionName) { "not avalable from the command line.\n", fd); } -// Dump items related to wlan -void Dumpstate::dumpWlanSection(int fd) { - RunCommandToFd(fd, "WLAN Debug Dump", {"/vendor/bin/sh", "-c", - "cat /sys/wifi/dump_start"}); - - // Dump firmware symbol table for firmware log decryption - DumpFileToFd(fd, "WLAN FW Log Symbol Table", "/vendor/firmware/Data.msc"); -} - // Dump items related to power and battery void Dumpstate::dumpPowerSection(int fd) { struct stat buffer; diff --git a/dumpstate/Dumpstate.h b/dumpstate/Dumpstate.h index bae1344e..79073a3e 100644 --- a/dumpstate/Dumpstate.h +++ b/dumpstate/Dumpstate.h @@ -52,7 +52,6 @@ class Dumpstate : public BnDumpstateDevice { // 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 dumpCpuSection(int fd); void dumpDevfreqSection(int fd); diff --git a/dumpstate/dump_wlan.sh b/dumpstate/dump_wlan.sh new file mode 100644 index 00000000..4741ac87 --- /dev/null +++ b/dumpstate/dump_wlan.sh @@ -0,0 +1,3 @@ +#!/vendor/bin/sh +echo "--- wlan WIP ---" + diff --git a/dumpstate/item.mk b/dumpstate/item.mk new file mode 100644 index 00000000..11bed69a --- /dev/null +++ b/dumpstate/item.mk @@ -0,0 +1 @@ +PRODUCT_PACKAGES += dump_wlan.sh