Merge "zipfuse: a read-only fuse implementation for zip archive"
diff --git a/microdroid/Android.bp b/microdroid/Android.bp
index 47f3474..55075ca 100644
--- a/microdroid/Android.bp
+++ b/microdroid/Android.bp
@@ -59,6 +59,9 @@
"libadbd_auth",
"libadbd_fs",
+ // "com.android.art" requires
+ "heapprofd_client_api",
+
"apexd",
"debuggerd",
"linker",
@@ -168,7 +171,9 @@
kernel_prebuilt: ":kernel_prebuilts-5.10-x86_64",
cmdline: microdroid_boot_cmdline +
"pci=noacpi " +
- "androidboot.boot_devices=pci0000:00/0000:00:01.0",
+ "androidboot.boot_devices=pci0000:00/0000:00:01.0," + // os
+ "pci0000:00/0000:00:03.0," + // payload
+ "pci0000:00/0000:00:04.0", // userdata
},
},
dtb_prebuilt: "dummy_dtb.img",
diff --git a/microdroid/README.md b/microdroid/README.md
index 91371b5..4edd65b 100644
--- a/microdroid/README.md
+++ b/microdroid/README.md
@@ -51,9 +51,9 @@
```
Copy the artifacts to the temp directory, create the composite image using
-`mk_cdisk`, copy the VM config file, and run it via `vm`. For now, some other
-files have to be manually created. In the future, you won't need these, and this
-shall be done via [`virtmanager`](../virtmanager/).
+`mk_cdisk` and copy the VM config file. For now, some other files have to be
+manually created. In the future, you won't need these, and this shall be done
+via [`virtmanager`](../virtmanager/).
```sh
$ adb root
@@ -67,10 +67,20 @@
$ adb shell 'cd /data/local/tmp/microdroid; /apex/com.android.virt/bin/mk_cdisk /apex/com.android.virt/etc/microdroid_cdisk.json os_composite.img'
$ adb shell 'cd /data/local/tmp/microdroid; /apex/com.android.virt/bin/mk_cdisk /apex/com.android.virt/etc/microdroid_cdisk_env.json env_composite.img'
$ adb shell 'cd /data/local/tmp/microdroid; /apex/com.android.virt/bin/mk_cdisk /apex/com.android.virt/etc/microdroid_cdisk_userdata.json userdata_composite.img'
-$ adb shell '/apex/com.android.virt/bin/crosvm create_qcow2 --backing_file=/data/local/tmp/microdroid/userdata_composite.img /data/local/tmp/microdroid/userdata_composite.$ qcow2'
+$ adb shell '/apex/com.android.virt/bin/crosvm create_qcow2 --backing_file=/data/local/tmp/microdroid/userdata_composite.img /data/local/tmp/microdroid/userdata_composite.qcow2'
$ adb shell 'cd /data/local/tmp/microdroid; /apex/com.android.virt/bin/mk_payload /apex/com.android.virt/etc/microdroid_payload.json payload.img'
$ adb shell 'chmod go+r /data/local/tmp/microdroid/*-header.img /data/local/tmp/microdroid/*-footer.img'
$ adb push microdroid.json /data/local/tmp/microdroid/microdroid.json
+```
+
+Ensure SELinux is in permissive mode to allow virtmanager and crosvm to open
+files from `/data/local/tmp`. Opening files from this directory is
+neverallow-ed and file descriptors should be passed instead but, before that is
+supported, `adb shell setenforce 0` will put the device in permissive mode.
+
+Now, run the VM and look for `adbd` starting in the logs.
+
+```sh
$ adb shell "start virtmanager"
$ adb shell "RUST_BACKTRACE=1 RUST_LOG=trace /apex/com.android.virt/bin/vm run /data/local/tmp/microdroid/microdroid.json"
```