Expose encryptedstore feature to system apps

This patch adds 2 api functions: set/get EncryptedStorageKib &
isEncryptedStorageEnabled() which can be used to specify the size of
storage required. VirtualMachine, on being initialized, will create the
backing (empty) file if storageSize > 0.

The (storage) allocation happens when VirtualMachine.create() is called:
by using VS' initializeWritablePartition() called over binder.

Test that EncryptedStore is available & accessible -
encryptedStorageAvailable() is a device test which uses these system
apis to enable encrypted storage in VM. It then verifies that the native
api(getEncryptedStoragePath()) inside VM indeed returns the right mount
point, hence verifying both the ends of the encryptedstore infra :)

Test: atest MicrodroidTests#encryptedStorageAvailable
Bug: 254454175
Bug: 260084116
Change-Id: I4842ebac6af795beaf250525252087545895b231
5 files changed
tree: a990c3e024e679a38f38e38c3b5197b16b86f126
  1. apex/
  2. apkdmverity/
  3. authfs/
  4. avmd/
  5. compos/
  6. demo/
  7. docs/
  8. encryptedstore/
  9. javalib/
  10. launcher/
  11. libs/
  12. microdroid/
  13. microdroid_manager/
  14. pvmfw/
  15. rialto/
  16. tests/
  17. virtualizationservice/
  18. vm/
  19. vm_payload/
  20. vmbase/
  21. vmclient/
  22. zipfuse/
  23. .clang-format
  24. .gitignore
  25. Android.bp
  26. OWNERS
  27. PREUPLOAD.cfg
  28. README.md
  29. 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.