From ab4c5929db33edc29281574481457caf2e1e3c74 Mon Sep 17 00:00:00 2001 From: Armelle Laine Date: Fri, 25 Jun 2021 05:12:21 +0000 Subject: [PATCH] Include /dev/trusty-log0 as one of the Cloudripper's dumpstate_board section - DumpState add trusty section to dump /dev/trusty-log0 - ueventd.gs101.rc: add /dev/trusty-log0 (system ownership) and r/w permissions to user/group Test: adb root; adb shell lshal debug android.hardware.dumpstate@1.1::IDumpstateDevice/default trusty Bug: 192036703 Change-Id: I752ee9c9a88855485d71ed9deb1555df5bb005cd Signed-off-by: Armelle Laine --- conf/ueventd.gs201.rc | 1 + dumpstate/DumpstateDevice.cpp | 5 +++++ dumpstate/DumpstateDevice.h | 1 + 3 files changed, 7 insertions(+) diff --git a/conf/ueventd.gs201.rc b/conf/ueventd.gs201.rc index f0801507..cf0cf441 100644 --- a/conf/ueventd.gs201.rc +++ b/conf/ueventd.gs201.rc @@ -160,6 +160,7 @@ # Trusty /dev/trusty-ipc-dev0 0660 system drmrpc +/dev/trusty-log0 0660 system system # Citadel /dev/gsc0 0660 hsm hsm diff --git a/dumpstate/DumpstateDevice.cpp b/dumpstate/DumpstateDevice.cpp index a14b7891..bcb788cc 100644 --- a/dumpstate/DumpstateDevice.cpp +++ b/dumpstate/DumpstateDevice.cpp @@ -247,6 +247,7 @@ DumpstateDevice::DumpstateDevice() { "ramdump", [this](int fd) { dumpRamdumpSection(fd); } }, { "misc", [this](int fd) { dumpMiscSection(fd); } }, { "gsc", [this](int fd) { dumpGscSection(fd); } }, + { "trusty", [this](int fd) { dumpTrustySection(fd); } }, } { } @@ -846,6 +847,10 @@ void DumpstateDevice::dumpGscSection(int fd) { RunCommandToFd(fd, "Citadel STATS", {"vendor/bin/hw/citadel_updater", "--stats"}); } +void DumpstateDevice::dumpTrustySection(int fd) { + DumpFileToFd(fd, "Trusty TEE0 Logs", "/dev/trusty-log0"); +} + void DumpstateDevice::dumpModem(int fd, int fdModem) { std::string modemLogDir = MODEM_LOG_DIRECTORY; diff --git a/dumpstate/DumpstateDevice.h b/dumpstate/DumpstateDevice.h index 2c53087d..2492b3be 100644 --- a/dumpstate/DumpstateDevice.h +++ b/dumpstate/DumpstateDevice.h @@ -82,6 +82,7 @@ struct DumpstateDevice : public IDumpstateDevice { void dumpRamdumpSection(int fd); void dumpMiscSection(int fd); void dumpGscSection(int fd); + void dumpTrustySection(int fd); // Hybrid and binary sections that require an additional file descriptor void dumpModem(int fd, int fdModem);