android_packages_modules_Vi.../demo
Nikita Ioffe 60991a57c4 Add VirtualizationModuleFrameworkInitializer
VirtualizationModuleFrameworkInitializer.registerServiceWrappers() is
called in SystemServiceRegistry during zygote initialization to register
Manager classes inside the com.android.virt APEX with the
Context.getSystemService() lookup API.

For the devices without AVF support the
Context.getSystemService(VirtualMachineManager.class) will return null.
A CTS test is added to verify this behaviour.

Bug: 249093790
Test: presubmit
Change-Id: Ib8a94643e5f7ccbfa55dd659d93d02d146af6443
Merged-In: Ib8a94643e5f7ccbfa55dd659d93d02d146af6443
(cherry picked from commit 63594352ae)
2022-11-25 15:57:01 +00:00
..
java/com/android/microdroid/demo Add VirtualizationModuleFrameworkInitializer 2022-11-25 15:57:01 +00:00
res Console output and OS logs are separated 2021-10-27 10:07:12 +09:00
Android.bp Migrate VirtualMachine API to @SystemApi 2022-11-23 14:32:45 +00:00
AndroidManifest.xml Remove uses-library 2022-11-15 08:51:09 +00:00
README.md Fix build command for demo app 2022-06-28 13:06:53 +09:00

README.md

Microdroid demo app

Building

UNBUNDLED_BUILD_SDKS_FROM_SOURCE=true TARGET_BUILD_APPS=MicrodroidDemoApp m apps_only dist

Installing

adb install -t out/dist/MicrodroidDemoApp.apk
adb shell pm grant com.android.microdroid.demo android.permission.MANAGE_VIRTUAL_MACHINE

Don't run the app before granting the permission. Or you will have to uninstall the app, and then re-install it.

Running

Run the app by touching the icon on the launcher. Press the run button to start a VM. You can see console output from the VM on the screen. You can stop the VM by pressing the stop button.