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/bootconfig.common b/microdroid/bootconfig.common
index c202ba0..eda95a2 100644
--- a/microdroid/bootconfig.common
+++ b/microdroid/bootconfig.common
@@ -1,6 +1,2 @@
androidboot.first_stage_console = 1
androidboot.hardware = microdroid
-
-# tombstone_transmit is enabled. Tombstones will be transmitted to the host
-# TODO(b/227443903) : Make this configurable by VM owners
-androidboot.tombstone_transmit.enabled=1
diff --git a/microdroid/init.rc b/microdroid/init.rc
index dbe5ac7..93cced8 100644
--- a/microdroid/init.rc
+++ b/microdroid/init.rc
@@ -173,9 +173,6 @@
mkdir /data/local 0751 root root
mkdir /data/local/tmp 0771 shell shell
-on init && property:ro.boot.tombstone_transmit.enabled=1
- start tombstone_transmit
-
service tombstone_transmit /system/bin/tombstone_transmit.microdroid -cid 2 -port 2000
user root
group system
diff --git a/microdroid/payload/config/src/lib.rs b/microdroid/payload/config/src/lib.rs
index 67e8feb..b82544f 100644
--- a/microdroid/payload/config/src/lib.rs
+++ b/microdroid/payload/config/src/lib.rs
@@ -38,6 +38,10 @@
/// Tells VirtualizationService to use staged APEXes if possible
#[serde(default)]
pub prefer_staged: bool,
+
+ /// Whether to export the tomsbtones (VM crashes) out of VM to host
+ /// This does not have a default & the value is expected to be in json for deserialization
+ pub export_tombstones: bool,
}
/// OS config