Enable debug mode
When the debug mode is enabled, an extra bootconfig partition for the
debug mode is used. The bootconfig partition currently disables Selinux.
Bug: 185211964
Test: vm /data/local/tmp/MicrodroidTestApp.apk
/data/local/tmp/MicrodroidApp.apk.idsig assets/config.json --debug
Change-Id: I25a20b75b6d216395fe7579729a61bcbdb8dd395
diff --git a/vm/src/main.rs b/vm/src/main.rs
index d7bae30..9ca0ea6 100644
--- a/vm/src/main.rs
+++ b/vm/src/main.rs
@@ -53,6 +53,10 @@
/// Path to file for VM log output.
#[structopt(short, long)]
log: Option<PathBuf>,
+
+ /// Whether to run VM in debug mode.
+ #[structopt(short, long)]
+ debug: bool,
},
/// Run a virtual machine
Run {
@@ -97,8 +101,8 @@
.context("Failed to find VirtualizationService")?;
match opt {
- Opt::RunApp { apk, idsig, config_path, daemonize, log } => {
- command_run_app(service, &apk, &idsig, &config_path, daemonize, log.as_deref())
+ Opt::RunApp { apk, idsig, config_path, daemonize, log, debug } => {
+ command_run_app(service, &apk, &idsig, &config_path, daemonize, log.as_deref(), debug)
}
Opt::Run { config, daemonize, log } => {
command_run(service, &config, daemonize, log.as_deref())