pKVM is included in the Generic Kernel Image configuration files for
android-13-5.x
. To try AVF, follow these steps:
Include
com.android.virt
APEX in your system image.Run tests to confirm that pKVM is working:
$ atest MicrodroidHostTestCases MicrodroidTestApp
Execute the following commands to run a demo app that spawns a pVM, boots Microdroid, and adds two numbers together:
$ TARGET_BUILD_APPS=MicrodroidDemoApp m apps_only dist $ adb install -t out/dist/MicrodroidDemoApp.apk $ adb shell pm grant com.android.microdroid.demo android.permission.MANAGE_VIRTUAL_MACHINE
To download source code for this demo app, refer to MicrodroidDemo.