move wlan dump to relevant devices
Bug: 273380509 Test: adb bugreport Change-Id: Id3e11e69a1a0c6502ab2e7883cec34659922f660
This commit is contained in:
parent
22e4a142b5
commit
15d11de144
2 changed files with 0 additions and 36 deletions
|
@ -68,29 +68,12 @@ void endSection(int fd, const std::string §ionName, 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 §ionName) {
|
||||
bool dumpAll = (sectionName == kAllSections);
|
||||
std::string dumpFiles;
|
||||
|
||||
for (const auto §ion : 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 §ionName) {
|
|||
// 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 §ion : 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;
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue