Make exporting tombstone (out of VM) configurable
VM owner must specify export_tombstones value in assets/vm_config in
payload apk to enable/disable exporting the tombstones out of VM. This
is also dm-verity protected so only the owner of the VM can make the
change. There is no default value for this for now. Virtualization
service will fail at load_config() throw binder_exception to client.
Test: atest . (all tests in /packages/modules/Virtualization)
Bug: 227443903
Change-Id: I82325a9ffc57d4d4825d51d9d41ebb767e6c1f6f
diff --git a/microdroid_manager/src/main.rs b/microdroid_manager/src/main.rs
index 9e159d2..8c85d3e 100644
--- a/microdroid_manager/src/main.rs
+++ b/microdroid_manager/src/main.rs
@@ -254,6 +254,13 @@
);
let config = load_config(Path::new(&metadata.payload_config_path))?;
+
+ // Start tombstone_transmit if enabled
+ if config.export_tombstones {
+ system_properties::write("ctl.start", "tombstone_transmit")
+ .context("Failed to start tombstone_transmit")?;
+ }
+
if config.extra_apks.len() != verified_data.extra_apks_data.len() {
return Err(anyhow!(
"config expects {} extra apks, but found only {}",