Commit Graph

5 Commits

Author SHA1 Message Date
Jooyung Han 634e2d7048 microdroid_manager executes a task via microdroid_launcher
Task can be one of "executable" or "microdroid_launcher".
When it is a microdroid_launcher task, microdroid_manager find the
target library in /mnt/apk/lib/{abi}/, and then executes it via
microdroid_launcher.

Bug: 186396080
Test: MicrodroidHostTestCases
Test: /system/bin/microdroid_manager in microdroid launched with
   default configuration.
   it should run testapk's MicrodroidTestNativeLib.so
Change-Id: I065f5c5d789e6a96fd658a52ed8533f42b1cbc42
2021-06-10 23:30:19 +09:00
Jiyong Park 7a31a9a55b Explicitly export the main activity of the test apk
A new requirement for 31

Bug: 190588547
Test: TARGET_BUILD_APPS=com.android.virt m; adb install <path>; adb
reboot
Change-Id: If03b6cb5eb64694cebaa56d037ead611d18d9b17

Change-Id: Ibe293169f39b74ec34b490dd216030c1d7221588
2021-06-09 23:28:17 +09:00
Jooyung Han f48ceb4125 microdroid_manager: waits for a config file
Ideally, microdroid_manager should start zipfuse only if necessary and
access the VM config file from the APK via fusefs when it's ready.

But for now zipfuse doesn't report when it's ready to access files in a
zip file. So, microdroid_manager should wait a while to access the
config file when it is from the APK.

Bug: 189301496
Test: MicrodroidHostTestCases
Test: microdroid_manager_test
Change-Id: I0dc304a8f135f52a846fc1bb6f4e476f6162697a
2021-06-01 21:39:13 +09:00
Jiyong Park 4069961147 Add microdroid_launcher
microdroid_launcher is a very thin executable that loads a shared
library and execute the entry function (android_native_main). This is
used to execute a shared library in an APK that is shared from the host
Android.

Bug: 188513012
Test: atest MicrodroidHostTestCases
Change-Id: I0f98eba4c72601adaa27733dae6a51d3852301db
2021-05-24 17:48:30 +09:00
Jiyong Park a7266ac893 Add MicrodroidTestApp
It's a test app (along with a native binary) that we will use to test
micdordoid. Right now, it doesn't have any test routine in it. For the
time being, the existing MicrodroidHostTestCases will use the apk to
check if zipfuse can correctly mount the file across the host Android
and microdroid. For this, the app right now is part of the virt APEX.

Later when we have app-facing Java APIs, the test app will be removed
from the virt APEX and installed separately (via adb install) and will
invoke the Java APIs and check the expected side effects.

Bug: 186377508
Test: m MicrodroidTestApp
Test: m com.android.virt

Change-Id: I929565f7fec1cd888ccc7a2b1c3021a2a85681ad
2021-05-24 08:19:12 +09:00