vm: print which file is missing in one case
adb shell /apex/com.android.virt/bin/vm run-app non-existant.apk foo bar
Error: No such file or directory (os error 2)
=>
adb shell /apex/com.android.virt/bin/vm run-app non-existant.apk foo bar
Error: Failed to open APK file
Caused by:
No such file or directory (os error 2)
Bug: N/A
Test: manual
Change-Id: I14264ed5d978b3998c183bb5729ca47ca2b39426
diff --git a/vm/src/run.rs b/vm/src/run.rs
index 967314b..de8f1c0 100644
--- a/vm/src/run.rs
+++ b/vm/src/run.rs
@@ -55,6 +55,8 @@
task_profiles: Vec<String>,
extra_idsigs: &[PathBuf],
) -> Result<(), Error> {
+ let apk_file = File::open(apk).context("Failed to open APK file")?;
+
let extra_apks = parse_extra_apk_list(apk, config_path)?;
if extra_apks.len() != extra_idsigs.len() {
bail!(
@@ -70,7 +72,6 @@
service.createOrUpdateIdsigFile(&extra_apk_fd, &extra_idsig_fd)?;
}
- let apk_file = File::open(apk).context("Failed to open APK file")?;
let idsig_file = File::create(idsig).context("Failed to create idsig file")?;
let apk_fd = ParcelFileDescriptor::new(apk_file);