From 498c4cbd00ac361789eb741af79276e189a38ac2 Mon Sep 17 00:00:00 2001 From: Cheng Chang Date: Mon, 26 Jun 2023 03:49:09 +0000 Subject: [PATCH] gps: collect chip information Bug: 288815100 Test: compile and collect bugreport Change-Id: I8b74ec265d3ccac2ff2bbe3e52e5a47ee2b0704a --- gps/dump/dump_gps.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gps/dump/dump_gps.cpp b/gps/dump/dump_gps.cpp index d569f9b..a217d14 100644 --- a/gps/dump/dump_gps.cpp +++ b/gps/dump/dump_gps.cpp @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +#include #include #include #include @@ -24,6 +25,7 @@ #define GPS_MCU_LOG_PREFIX "esw-" #define GPS_MALLOC_LOG_DIRECTORY "/data/vendor/gps" #define GPS_MALLOC_LOG_PREFIX "malloc_" +#define GPS_VENDOR_CHIP_INFO "/data/vendor/gps/chip.info" int main() { if(!::android::base::GetBoolProperty("vendor.gps.aol.enabled", false)) { @@ -41,6 +43,9 @@ int main() { dumpLogs(GPS_LOG_DIRECTORY, outputDir.c_str(), 3, GPS_MCU_LOG_PREFIX); dumpLogs(GPS_LOG_DIRECTORY, outputDir.c_str(), maxFileNum, GPS_LOG_PREFIX); dumpLogs(GPS_MALLOC_LOG_DIRECTORY, outputDir.c_str(), 1, GPS_MALLOC_LOG_PREFIX); + if (access(GPS_VENDOR_CHIP_INFO, F_OK) == 0) { + copyFile(GPS_VENDOR_CHIP_INFO, concatenatePath(outputDir.c_str(), "chip.info").c_str()); + } return 0; }