summaryrefslogtreecommitdiff
path: root/dumpstate
diff options
context:
space:
mode:
authorAdam Shih <adamshih@google.com>2022-10-17 13:39:53 +0800
committerTreeHugger Robot <treehugger-gerrit@google.com>2022-11-10 05:20:48 +0000
commitb4ee8b12eb363cb971647f23f182b51f392fd47f (patch)
tree7fd9e6cd35c969a8ece8fd5c2fc6d66e4213526a /dumpstate
parent73f714bcc9fd8348f7205d6665bbf53cc6f7a860 (diff)
downloadgs201-b4ee8b12eb363cb971647f23f182b51f392fd47f.tar.gz
move sensors dump to gs-common
Bug: 250475720 Test: adb bugreport Change-Id: Ica2a782fd59706eac5985ff8b534d0ba223e93c4
Diffstat (limited to 'dumpstate')
-rw-r--r--dumpstate/Dumpstate.cpp25
-rw-r--r--dumpstate/Dumpstate.h1
2 files changed, 0 insertions, 26 deletions
diff --git a/dumpstate/Dumpstate.cpp b/dumpstate/Dumpstate.cpp
index 7a1353d..e10524b 100644
--- a/dumpstate/Dumpstate.cpp
+++ b/dumpstate/Dumpstate.cpp
@@ -47,8 +47,6 @@
#define TCPDUMP_NUMBER_BUGREPORT "persist.vendor.tcpdump.log.br_num"
#define TCPDUMP_PERSIST_PROPERTY "persist.vendor.tcpdump.log.alwayson"
-#define HW_REVISION "ro.boot.hardware.revision"
-
using android::os::dumpstate::CommandOptions;
using android::os::dumpstate::DumpFileToFd;
using android::os::dumpstate::PropertiesHelper;
@@ -229,7 +227,6 @@ Dumpstate::Dumpstate()
{ "thermal", [this](int fd) { dumpThermalSection(fd); } },
{ "touch", [this](int fd) { dumpTouchSection(fd); } },
{ "display", [this](int fd) { dumpDisplaySection(fd); } },
- { "sensors-usf", [this](int fd) { dumpSensorsUSFSection(fd); } },
{ "misc", [this](int fd) { dumpMiscSection(fd); } },
{ "led", [this](int fd) { dumpLEDSection(fd); } },
},
@@ -975,28 +972,6 @@ void Dumpstate::dumpDisplaySection(int fd) {
}
}
-// Dump items related to sensors usf.
-void Dumpstate::dumpSensorsUSFSection(int fd) {
- CommandOptions options = CommandOptions::WithTimeout(2).Build();
- RunCommandToFd(fd, "USF statistics",
- {"/vendor/bin/sh", "-c", "usf_stats get --all"},
- options);
- if (!PropertiesHelper::IsUserBuild()) {
- // Not a user build, if this is also not a production device dump the USF registry.
- std::string hwRev = ::android::base::GetProperty(HW_REVISION, "");
- if (hwRev.find("PROTO") != std::string::npos ||
- hwRev.find("EVT") != std::string::npos ||
- hwRev.find("DVT") != std::string::npos) {
- RunCommandToFd(fd, "USF Registry",
- {"/vendor/bin/sh", "-c", "usf_reg_edit save -"},
- options);
- RunCommandToFd(fd, "USF Last Stat Buffer",
- {"/vendor/bin/sh", "-c", "cat /data/vendor/sensors/debug/stats.history"},
- options);
- }
- }
-}
-
// Dump items that don't fit well into any other section
void Dumpstate::dumpMiscSection(int fd) {
RunCommandToFd(fd, "VENDOR PROPERTIES", {"/vendor/bin/getprop"});
diff --git a/dumpstate/Dumpstate.h b/dumpstate/Dumpstate.h
index c748bff..a198364 100644
--- a/dumpstate/Dumpstate.h
+++ b/dumpstate/Dumpstate.h
@@ -60,7 +60,6 @@ class Dumpstate : public BnDumpstateDevice {
void dumpDevfreqSection(int fd);
void dumpMemorySection(int fd);
void dumpDisplaySection(int fd);
- void dumpSensorsUSFSection(int fd);
void dumpMiscSection(int fd);
void dumpLEDSection(int fd);