Add proto dumpstate mode

Add a "PROTO" dumpstate mode to request a protobuf dump from
IDumpstateDevice HAL, primarily used by incidentd to get
device-specific state as a proto for automated issue reporting and
debugging.
Since the format of these states can vary across vendors and devices,
the proto schema will not be defined in AOSP.

Bug: 140521164
Test: VtsHalDumpstateV1_1TargetTest
Change-Id: I1d586c99b654471db5028039792c3d9e6e2184bb
This commit is contained in:
Mike Ma
2020-02-13 13:11:00 -08:00
parent 9d51774201
commit 8908d6fd51
3 changed files with 10 additions and 2 deletions

View File

@@ -645,7 +645,7 @@ f18695dd36ee205640b8326a17453858a7b4596653aaa6ef0016b0aef1bd4dac android.hardwar
4d85e814f94949dae4dc6cb82bbd7d6bb24ffafda6ddb2eac928d2a4fc2e21ce android.hardware.cas@1.2::types
66931c2506fbb5af61f20138cb05e0a09e7bf67d6964c231d27c648933bb33ec android.hardware.drm@1.3::ICryptoFactory
994d08ab27d613022c258a9ec48cece7adf2a305e92df5d76ef923e2c6665f64 android.hardware.drm@1.3::IDrmFactory
446287268831f4ddfac4a51bb1c32ae1e48e47bccd535fccc2c4546d0e7c4013 android.hardware.dumpstate@1.1::types
d9df99be0f59d8f33a9699fe316c67bfd11818aa69440bb1123ba43e717cea85 android.hardware.dumpstate@1.1::types
186bc152ae189ab48f3a761a44ddf5edd0d483073c5b6ca1f802f8b50488b754 android.hardware.dumpstate@1.1::IDumpstateDevice
769d346927a94fd40ee80a5a976d8d15cf022ef99c5900738f4a82f26c0ed229 android.hardware.gnss@2.1::types
626db710bf917ecf551a0b0b1f25be10bf52758f43e0fc808b148b6aae2ef73e android.hardware.gnss@2.1::IGnss

View File

@@ -55,6 +55,13 @@ enum DumpstateMode : uint32_t {
* This mode MUST be supported if the dumpstate HAL is implemented.
*/
DEFAULT = 6,
/**
* Takes a report in protobuf.
*
* The content, if implemented, must be a binary protobuf message written to the first file
* descriptor of the native handle. The protobuf schema shall be defined by the vendor.
*/
PROTO = 7,
};
/**

View File

@@ -92,7 +92,8 @@ class DumpstateHidl1_1Test : public ::testing::TestWithParam<std::string> {
TEST_FOR_DUMPSTATE_MODE(name, body, WEAR); \
TEST_FOR_DUMPSTATE_MODE(name, body, CONNECTIVITY); \
TEST_FOR_DUMPSTATE_MODE(name, body, WIFI); \
TEST_FOR_DUMPSTATE_MODE(name, body, DEFAULT);
TEST_FOR_DUMPSTATE_MODE(name, body, DEFAULT); \
TEST_FOR_DUMPSTATE_MODE(name, body, PROTO);
constexpr uint64_t kDefaultTimeoutMillis = 30 * 1000; // 30 seconds