From 87c912336adcc71d7a37acc3c9847a4eb04b04c4 Mon Sep 17 00:00:00 2001 From: davidycchen Date: Tue, 2 Nov 2021 14:14:00 +0800 Subject: [PATCH] dumpstate: dump touch HDM debug information HDM debug information already expend to 64 bytes. Dump whole debug information when bugreport is triggered. Read HDM debug information twice to check if any status events keep changing. Bug: 174191180 Test: trigger bugreport and check the data. Signed-off-by: davidycchen Change-Id: I9d2f9ed094f85dae303ba47e85a182adcd6954ac --- dumpstate/DumpstateDevice.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dumpstate/DumpstateDevice.cpp b/dumpstate/DumpstateDevice.cpp index 1acd28a2..7b98f75b 100644 --- a/dumpstate/DumpstateDevice.cpp +++ b/dumpstate/DumpstateDevice.cpp @@ -540,6 +540,12 @@ void DumpstateDevice::dumpTouchSection(int fd) { snprintf(cmd, sizeof(cmd), "%s", stm_cmd_path[i + 1]); if (!access(cmd, R_OK)) { + snprintf(cmd, sizeof(cmd), + "echo 01 A4 06 C3 > %s; echo 02 A7 00 00 00 40 00 > %s && cat %s", + stm_cmd_path[i + 1], stm_cmd_path[i + 1], stm_cmd_path[i + 1]); + RunCommandToFd(fd, "HDM debug information (32 bytes)", + {"/vendor/bin/sh", "-c", cmd}); + snprintf(cmd, sizeof(cmd), "echo 23 00 > %s && cat %s", stm_cmd_path[i + 1], stm_cmd_path[i + 1]); RunCommandToFd(fd, "Mutual Raw Data", @@ -605,7 +611,7 @@ void DumpstateDevice::dumpTouchSection(int fd) { {"/vendor/bin/sh", "-c", cmd}); snprintf(cmd, sizeof(cmd), - "echo 01 A4 06 C3 > %s; echo 02 A7 00 00 00 20 00 > %s && cat %s", + "echo 01 A4 06 C3 > %s; echo 02 A7 00 00 00 40 00 > %s && cat %s", stm_cmd_path[i + 1], stm_cmd_path[i + 1], stm_cmd_path[i + 1]); RunCommandToFd(fd, "HDM debug information (32 bytes)", {"/vendor/bin/sh", "-c", cmd});