Starting March 27, 2025, we recommend using android-latest-release instead of aosp-main to build and contribute to AOSP. For more information, see Changes to AOSP.
To download source code for this demo app, refer to
MicrodroidDemo.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-08-29 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-29 UTC."],[],[],null,["# Try Android Virtualization Framework (AVF)\n\npKVM is included in the Generic Kernel Image configuration files for\n`android-13-5.x`. To try AVF, follow these steps:\n\n1. Include `com.android.virt` APEX in your system image.\n\n2. Run tests to confirm that pKVM is working:\n\n $ atest MicrodroidHostTestCases MicrodroidTestApp\n\n3. Execute the following commands to run a demo app that spawns a pVM, boots\n Microdroid, and adds two numbers together:\n\n $ TARGET_BUILD_APPS=MicrodroidDemoApp m apps_only dist\n\n $ adb install -t out/dist/MicrodroidDemoApp.apk\n\n $ adb shell pm grant com.android.microdroid.demo android.permission.MANAGE_VIRTUAL_MACHINE\n\nTo download source code for this demo app, refer to\n[MicrodroidDemo](https://android.googlesource.com/platform/packages/modules/Virtualization/+/refs/heads/android16-release/android/MicrodroidDemoApp/).\n| **Note:** This demo works only on Cuttlefish."]]