summaryrefslogtreecommitdiff
path: root/dumpstate
diff options
context:
space:
mode:
authorAdam Shih <adamshih@google.com>2023-03-30 13:53:05 +0800
committerAdam Shih <adamshih@google.com>2023-04-06 01:42:52 +0000
commit15d11de1444d33b37d6567bb6b05572100736f8f (patch)
treea71db519b71fe259f2d41f6a791a59571c76e0df /dumpstate
parent22e4a142b578a72cd18286bde24f42b02303ea9c (diff)
downloadgs201-15d11de1444d33b37d6567bb6b05572100736f8f.tar.gz
move wlan dump to relevant devices
Bug: 273380509 Test: adb bugreport Change-Id: Id3e11e69a1a0c6502ab2e7883cec34659922f660
Diffstat (limited to 'dumpstate')
-rw-r--r--dumpstate/Dumpstate.cpp28
-rw-r--r--dumpstate/Dumpstate.h8
2 files changed, 0 insertions, 36 deletions
diff --git a/dumpstate/Dumpstate.cpp b/dumpstate/Dumpstate.cpp
index 828964f..4221fbb 100644
--- a/dumpstate/Dumpstate.cpp
+++ b/dumpstate/Dumpstate.cpp
@@ -68,29 +68,12 @@ void endSection(int fd, const std::string &sectionName, timepoint_t startTime) {
"\n", fd);
}
-Dumpstate::Dumpstate()
- : mTextSections{
- { "wlan", [this](int fd) { dumpWlanSection(fd); } },
- } {}
-
// Dump data requested by an argument to the "dump" interface, or help info
// if the specified section is not supported.
void Dumpstate::dumpTextSection(int fd, const std::string &sectionName) {
bool dumpAll = (sectionName == kAllSections);
std::string dumpFiles;
- for (const auto &section : mTextSections) {
- if (dumpAll || sectionName == section.first) {
- auto startTime = startSection(fd, section.first);
- section.second(fd);
- endSection(fd, section.first, startTime);
-
- if (!dumpAll) {
- return;
- }
- }
- }
-
// Execute all or designated programs under vendor/bin/dump/
std::unique_ptr<DIR, decltype(&closedir)> dir(opendir("/vendor/bin/dump"), closedir);
if (!dir) {
@@ -124,22 +107,11 @@ void Dumpstate::dumpTextSection(int fd, const std::string &sectionName) {
// An unsupported section was requested on the command line
::android::base::WriteStringToFd("Unrecognized text section: " + sectionName + "\n", fd);
::android::base::WriteStringToFd("Try \"" + kAllSections + "\" or one of the following:", fd);
- for (const auto &section : mTextSections) {
- ::android::base::WriteStringToFd(" " + section.first, fd);
- }
::android::base::WriteStringToFd(dumpFiles, fd);
::android::base::WriteStringToFd("\nNote: sections with attachments (e.g. modem) are"
"not avalable from the command line.\n", fd);
}
-// Dump items related to wlan
-void Dumpstate::dumpWlanSection(int fd) {
- // Dump firmware symbol table for firmware log decryption
- DumpFileToFd(fd, "WLAN FW Log Symbol Table", "/vendor/firmware/Data.msc");
- RunCommandToFd(fd, "WLAN TWT Dump", {"/vendor/bin/sh", "-c",
- "cat /sys/wlan_ptracker/twt/*"});
-}
-
void Dumpstate::dumpLogSection(int fd, int fd_bin)
{
std::string logDir = MODEM_LOG_DIRECTORY;
diff --git a/dumpstate/Dumpstate.h b/dumpstate/Dumpstate.h
index f4902b3..94546fe 100644
--- a/dumpstate/Dumpstate.h
+++ b/dumpstate/Dumpstate.h
@@ -27,8 +27,6 @@ namespace dumpstate {
class Dumpstate : public BnDumpstateDevice {
public:
- Dumpstate();
-
::ndk::ScopedAStatus dumpstateBoard(const std::vector<::ndk::ScopedFileDescriptor>& in_fds,
IDumpstateDevice::DumpstateMode in_mode,
int64_t in_timeoutMillis) override;
@@ -42,14 +40,8 @@ class Dumpstate : public BnDumpstateDevice {
private:
const std::string kAllSections = "all";
- std::vector<std::pair<std::string, std::function<void(int)>>> mTextSections;
-
void dumpTextSection(int fd, std::string const& sectionName);
- // Text sections that can be dumped individually on the command line in
- // addition to being included in full dumps
- void dumpWlanSection(int fd);
-
void dumpLogSection(int fd, int fdModem);
//bool getVerboseLoggingEnabledImpl();