Pass isFactory bit from host to Microdroid via payload metadata

The isolated compilation usecase demands that isFactory bit of an APEX
is the same across VM and host. This is because the bit is encoded in
the compiled artifact (in the VM), and matched against the same bit on
the host side.

This is now done by (1) reading isFactory bit from
/apex/apex-info-list.xml and (2) send the bit to the VM by writing it to
payload metadata. (3) On the VM side, apexd records the bit to
/apex/apex-info-list.xml. (See the other CL in the same topic for the
last step).

Bug: 210998761
Test: adb shell /apex/com.android.compos/bin/composd_cmd staged-apex-compile
Change-Id: I69dd73357132812766867db13f0f5cb9958bb113
Test: (1) build any APEX (e.g. com.android.virt) and install it
(2) add the name of the APEX to vm_config.json of the test app.
(3) run the test app and adb shell into the VM
(4) check /apex/apex-info-list.xml has isFactory="false" for the apex.

Change-Id: Iaed1e2c9b232a6e9a58a0624adb5044d06d88d2b
4 files changed
tree: dda5eb7f747e827c87885b2ad429897e831a8294
  1. apex/
  2. apkdmverity/
  3. apkverify/
  4. authfs/
  5. binder_common/
  6. compos/
  7. demo/
  8. docs/
  9. idsig/
  10. javalib/
  11. launcher/
  12. libs/
  13. microdroid/
  14. microdroid_manager/
  15. pvmfw/
  16. statslog_virtualization/
  17. tests/
  18. virtualizationservice/
  19. vm/
  20. vmconfig/
  21. zipfuse/
  22. .clang-format
  23. .gitignore
  24. Android.bp
  25. OWNERS
  26. PREUPLOAD.cfg
  27. README.md
  28. TEST_MAPPING
README.md

Virtualization

This repository contains userspace services related to running virtual machines on Android, especially protected virtual machines. See the getting started documentation and Microdroid README for more information.