android_packages_modules_Vi.../compos/composd
Victor Hsieh de76d90b76 Don't mount the extra apk if VM isn't given one
Extra APK is given to the VM when it boots (via various of
vm_config*.json) depending on whether the build manifest APK exists or
not. On the request, the directory FD of /system_ext needs to come with
the request accordingly, so that authfs can set up the remote file
access.

The current implementation is problematic when there's inconsistency.
Even if /system_ext exists, we shouldn't pass the FD in the compilation
request because the VM may not be set up with a build manifest APK for
/system_ext. This can happen when /system_ext exists but without
BuildManifestSystemExt.apk.

The simple fix is to condition the FD passing on whether the extra APK
exists.

Bug: 267262026
Bug: 273393637
Test: rm /system_ext/etc/security/fsverity/BuildManifestSystemExt.apk
      ComposHostTestCases only after this change
Change-Id: I415343ddb69e4c8cac0b77274db9f629da33fbdd
2023-03-17 09:22:36 -07:00
..
aidl Enable fs-verity after compilation by CompOS 2023-03-16 12:03:54 -07:00
native Migrate off keystore 2022-01-24 14:08:47 +00:00
src Don't mount the extra apk if VM isn't given one 2023-03-17 09:22:36 -07:00
Android.bp Enable fs-verity after compilation by CompOS 2023-03-16 12:03:54 -07:00