Mkdir data/tombstones before tombstone_transmit

Because tombstone_transmit inotifies /data/tombstones and it bails if
the directory doesn't exist. This may cause a few seconds of boot time
regression. In the worst case, VS may think that the VM hangs.

Bug: 266470759
Test: atest MicrodroidHostTestCases MicrodroidTestApp
Test: run composd_cmd test-compile and see vm_console
Test: run boot time benchmark
Change-Id: Iee275978680c7f40cda253f468a10d6876739359
diff --git a/microdroid_manager/src/main.rs b/microdroid_manager/src/main.rs
index 24a12f7..f1c41b9 100644
--- a/microdroid_manager/src/main.rs
+++ b/microdroid_manager/src/main.rs
@@ -426,7 +426,8 @@
 
     // Start tombstone_transmit if enabled
     if config.export_tombstones {
-        control_service("start", "tombstone_transmit")?;
+        system_properties::write("tombstone_transmit.start", "1")
+            .context("set tombstone_transmit.start")?;
     } else {
         control_service("stop", "tombstoned")?;
     }
@@ -436,10 +437,6 @@
 
     register_vm_payload_service(allow_restricted_apis, service.clone(), dice_context)?;
 
-    if config.export_tombstones {
-        wait_for_tombstone_transmit_done()?;
-    }
-
     // Wait for encryptedstore to finish mounting the storage (if enabled) before setting
     // microdroid_manager.init_done. Reason is init stops uneventd after that.
     // Encryptedstore, however requires ueventd
@@ -451,6 +448,12 @@
     wait_for_property_true("dev.bootcomplete").context("failed waiting for dev.bootcomplete")?;
     system_properties::write("microdroid_manager.init_done", "1")
         .context("set microdroid_manager.init_done")?;
+
+    // Wait for tombstone_transmit to init
+    if config.export_tombstones {
+        wait_for_tombstone_transmit_done()?;
+    }
+
     info!("boot completed, time to run payload");
     exec_task(task, service).context("Failed to run payload")
 }