From 2b7c6714f11635fd87d833e9fd997519b6edd6e6 Mon Sep 17 00:00:00 2001 From: Adam Shih Date: Fri, 30 Sep 2022 15:08:32 +0800 Subject: [PATCH] move ramdump relate dumpstate to gs-common Bug: 248428203 Test: adb bugreport Change-Id: I2e3f3ebaccd6a6b345f75d6ebfb3f38d8be6d0f8 --- device.mk | 1 + dumpstate/DumpstateDevice.cpp | 34 ---------------------------------- dumpstate/DumpstateDevice.h | 1 - 3 files changed, 1 insertion(+), 35 deletions(-) diff --git a/device.mk b/device.mk index dbe74c48..25682c18 100644 --- a/device.mk +++ b/device.mk @@ -16,6 +16,7 @@ include device/google/gs-common/device.mk include device/google/gs-common/gs_watchdogd/watchdog.mk +include device/google/gs-common/ramdump/ramdump.mk TARGET_BOARD_PLATFORM := gs101 DEVICE_IS_64BIT_ONLY ?= $(if $(filter %_64,$(TARGET_PRODUCT)),true,false) diff --git a/dumpstate/DumpstateDevice.cpp b/dumpstate/DumpstateDevice.cpp index 3a878f1d..38871bd8 100644 --- a/dumpstate/DumpstateDevice.cpp +++ b/dumpstate/DumpstateDevice.cpp @@ -261,7 +261,6 @@ DumpstateDevice::DumpstateDevice() { "display", [this](int fd) { dumpDisplaySection(fd); } }, { "sensors-usf", [this](int fd) { dumpSensorsUSFSection(fd); } }, { "aoc", [this](int fd) { dumpAoCSection(fd); } }, - { "ramdump", [this](int fd) { dumpRamdumpSection(fd); } }, { "misc", [this](int fd) { dumpMiscSection(fd); } }, { "camera", [this](int fd) { dumpCameraSection(fd); } }, { "trusty", [this](int fd) { dumpTrustySection(fd); } }, @@ -973,39 +972,6 @@ void DumpstateDevice::dumpSensorsUSFSection(int fd) { } } -// Gzip binary data and dump to fd in base64 format. Cmd to decode is also attached. -void dumpGzippedFileInBase64ToFd(int fd, const char* title, const char* file_path) { - auto cmd = android::base::StringPrintf("echo 'base64 -d <i, header->size, std::string(header->buf, header->i).c_str()), fd); - } else { - android::base::WriteStringToFd("*** Ramdump misc file: abl.log: File not found\n", fd); - } - dumpGzippedFileInBase64ToFd( - fd, "Ramdump misc file: acpm.lst (gzipped in base64)", "/mnt/vendor/ramdump/acpm.lst"); - dumpGzippedFileInBase64ToFd( - fd, "Ramdump misc file: s2d.lst (gzipped in base64)", "/mnt/vendor/ramdump/s2d.lst"); -} - // Dump items that don't fit well into any other section void DumpstateDevice::dumpMiscSection(int fd) { RunCommandToFd(fd, "VENDOR PROPERTIES", {"/vendor/bin/getprop"}); diff --git a/dumpstate/DumpstateDevice.h b/dumpstate/DumpstateDevice.h index 0ebae41a..721d8cac 100644 --- a/dumpstate/DumpstateDevice.h +++ b/dumpstate/DumpstateDevice.h @@ -73,7 +73,6 @@ struct DumpstateDevice : public IDumpstateDevice { void dumpDisplaySection(int fd); void dumpSensorsUSFSection(int fd); void dumpAoCSection(int fd); - void dumpRamdumpSection(int fd); void dumpMiscSection(int fd); void dumpCameraSection(int fd); void dumpTrustySection(int fd);