Use odrefresh CompOS mode
This resolves issues specific to running in the VM:
- We don't store APEX timestamps, since they can't be known by the VM
- We get the equivalent of the deprecated --force-compile (all
artifacts are generated).
Bug: 211458160
Bug: 211001226
Test: Manual verification + presubmits
Change-Id: I9a3e344432c885da0004ae4aad2807c6c8932e17
diff --git a/compos/src/compilation.rs b/compos/src/compilation.rs
index 50d79c1..4837029 100644
--- a/compos/src/compilation.rs
+++ b/compos/src/compilation.rs
@@ -151,6 +151,7 @@
let mut args = vec![
"odrefresh".to_string(),
+ "--compilation-os-mode".to_string(),
format!("--zygote-arch={}", context.zygote_arch),
format!("--dalvik-cache={}", context.target_dir_name),
format!("--staging-dir={}", staging_dir.display()),
@@ -163,7 +164,8 @@
context.system_server_compiler_filter
));
}
- args.push("--force-compile".to_string());
+
+ args.push("--compile".to_string());
debug!("Running odrefresh with args: {:?}", &args);
let jail = spawn_jailed_task(odrefresh_path, &args, Vec::new() /* fd_mapping */)