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
Merged-In: I1d586c99b654471db5028039792c3d9e6e2184bb
diff --git a/current.txt b/current.txt
index d94f159..616440f 100644
--- a/current.txt
+++ b/current.txt
@@ -612,7 +612,7 @@
40ab2c6866c18d32baf6e49e3053949e79601f56963a791e93e68b9ee18f718d android.hardware.bluetooth@1.1::IBluetoothHciCallbacks
07d0a252b2d8fa35887908a996ba395cf392968395fc30afab791f46e0c22a52 android.hardware.boot@1.1::IBootControl
74049a402be913963edfdd80828a53736570e9d8124a1bf18166b6ed46a6b0ab android.hardware.boot@1.1::types
-446287268831f4ddfac4a51bb1c32ae1e48e47bccd535fccc2c4546d0e7c4013 android.hardware.dumpstate@1.1::types
+d9df99be0f59d8f33a9699fe316c67bfd11818aa69440bb1123ba43e717cea85 android.hardware.dumpstate@1.1::types
f284ffde7cadf5a1364b75ab313baf22401eeca289bdde2a2dc7a27ea4ab98d7 android.hardware.dumpstate@1.1::IDumpstateDevice
ce8dbe76eb9ee94b46ef98f725be992e760a5751073d4f4912484026541371f3 android.hardware.health@2.1::IHealth
26f04510a0b57aba5167c5c0a7c2f077c2acbb98b81902a072517829fd9fd67f android.hardware.health@2.1::IHealthInfoCallback
diff --git a/dumpstate/1.1/types.hal b/dumpstate/1.1/types.hal
index f5cbade..c522f7c 100644
--- a/dumpstate/1.1/types.hal
+++ b/dumpstate/1.1/types.hal
@@ -55,6 +55,13 @@
* 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,
};
/**
diff --git a/dumpstate/1.1/vts/functional/VtsHalDumpstateV1_1TargetTest.cpp b/dumpstate/1.1/vts/functional/VtsHalDumpstateV1_1TargetTest.cpp
index 089b039..1811b73 100644
--- a/dumpstate/1.1/vts/functional/VtsHalDumpstateV1_1TargetTest.cpp
+++ b/dumpstate/1.1/vts/functional/VtsHalDumpstateV1_1TargetTest.cpp
@@ -92,7 +92,8 @@
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