Change apex_available value of libavf based on avf_enabled

When avf_enabled is set libavf is included in com.android.virt,
but when it is unset libavf is not included in any apex.  That
triggered a shortcut in Soong when no apex variations exist
resulting in the platform variant not being hidden from Make
despite the module not setting //apex_available:platform.
When the shortcut is fixed to consistently hide the platform
variant it triggers a check-abi-dump-list failure because
libavf is now hidden from Make and not included in the LLNDK
libraries in LSDUMP_PATHS.

Add a conditional to libavf so that when avf_enabled it sets
apex_available: ["com.android.virt"] as before and uses the apex variant
to create the lsdump, but when avf_enabled is unset leaves apex_available
unset so that the platform variant exists and is unhidden to create the
lsdump.

Also add //apex_available:platform to authfs to counteract the
com.android.virt in crosvm_defaults so it is available to the platform
and can be embedded in the microdroid image.

Bug: 394664568
Test: builds
Change-Id: Id85edd1cb9548074537845137d66813e145642ea
2 files changed
tree: ae62151f5cf0e8ba12a5cf5d6b14e36bae6f9e7a
  1. android/
  2. build/
  3. docs/
  4. guest/
  5. libs/
  6. microfuchsia/
  7. tests/
  8. .clang-format
  9. .gitignore
  10. Android.bp
  11. dice_for_avf_guest.cddl
  12. OWNERS
  13. PREUPLOAD.cfg
  14. README.md
  15. rustfmt.toml
  16. TEST_MAPPING
README.md

Android Virtualization Framework (AVF)

Android Virtualization Framework (AVF) provides secure and private execution environments for executing code. AVF is ideal for security-oriented use cases that require stronger isolation assurances over those offered by Android’s app sandbox.

Visit our public doc site to learn more about what AVF is, what it is for, and how it is structured. This repository contains source code for userspace components of AVF.

If you want a quick start, see the getting started guideline and follow the steps there.

For in-depth explanations about individual topics and components, visit the following links.

AVF components:

AVF APIs:

How-Tos: