Use fs-verity digests proto to build the directory
The proto contains path -> digest mapping. In this change, we start to
use the provided protobuf to build the directory. Digest is not yet
used.
Bug: 206869687
Test: atest AuthFsHostTest ComposHostTestCases MicrodroidTestCase
Change-Id: I0f03219c1243f20f9ec5099a451c6f588add9608
diff --git a/compos/src/compilation.rs b/compos/src/compilation.rs
index 4837029..9a23bf5 100644
--- a/compos/src/compilation.rs
+++ b/compos/src/compilation.rs
@@ -122,9 +122,9 @@
port: FD_SERVER_PORT,
inputDirFdAnnotations: vec![InputDirFdAnnotation {
fd: context.system_dir_fd,
- // TODO(206869687): Replace /dev/null with the real path when possible.
- manifestPath: "/dev/null".to_string(),
- prefix: "/system".to_string(),
+ // 0 is the index of extra_apks in vm_config_extra_apk.json
+ manifestPath: "/mnt/extra-apk/0/assets/build_manifest.pb".to_string(),
+ prefix: "system/".to_string(),
}],
outputDirFdAnnotations: vec![
OutputDirFdAnnotation { fd: context.output_dir_fd },
diff --git a/compos/tests/java/android/compos/test/ComposKeyTestCase.java b/compos/tests/java/android/compos/test/ComposKeyTestCase.java
index d7c0058..d59d3d9 100644
--- a/compos/tests/java/android/compos/test/ComposKeyTestCase.java
+++ b/compos/tests/java/android/compos/test/ComposKeyTestCase.java
@@ -41,9 +41,12 @@
/** Wait time for service to be ready on boot */
private static final int READY_LATENCY_MS = 10 * 1000; // 10 seconds
- // Path to compos_key_cmd tool
+ /** Path to compos_key_cmd tool */
private static final String COMPOS_KEY_CMD_BIN = "/apex/com.android.compos/bin/compos_key_cmd";
+ /** Config of the test VM. This is a path inside the APK. */
+ private static final String VM_TEST_CONFIG_PATH = "assets/vm_test_config.json";
+
private String mCid;
@Before
@@ -132,7 +135,7 @@
getBuild(),
/* apkName, no need to install */ null,
packageName,
- "assets/vm_test_config.json",
+ VM_TEST_CONFIG_PATH,
/* debug */ true,
/* use default memoryMib */ 0,
Optional.empty(),