sm6150-common: Provide radio, keymaster and secure_element HAL on vendor

In [1] Google removed many HIDL HAL libraries from VNDK, causing them to
only be installed to the system partition.  This is inaccessible for
vendor apps and results in the usual:

    linker  : CANNOT LINK EXECUTABLE "/odm/bin/hw/android.hardware.keymaster@4.0-service-qti": library "android.hardware.keymaster@4.0.so" not found: needed by main executable
    linker  : CANNOT LINK EXECUTABLE "/odm/bin/hw/android.hardware.keymaster@4.0-service-qti": library "android.hardware.keymaster@4.1.so" not found: needed by /odm/lib64/libqtikeymaster4.so in namespace (default)
    linker  : CANNOT LINK EXECUTABLE "/odm/bin/hw/vendor.somc.hardware.modemswitcher@1.0-service": library "android.hardware.radio.config@1.0.so" not found: needed by /odm/lib64/libril-qc-hal-qmi.so in namespace (default)
    linker  : CANNOT LINK EXECUTABLE "/odm/bin/hw/qcrild": library "android.hardware.secure_element@1.1.so" not found: needed by /odm/lib64/libril-qc-hal-qmi.so in namespace (default)
    linker  : CANNOT LINK EXECUTABLE "/odm/bin/hw/qcrild": library "android.hardware.secure_element@1.2.so" not found: needed by /odm/lib64/libril-qc-hal-qmi.so in namespace (default)
    linker  : CANNOT LINK EXECUTABLE "/odm/bin/hw/qcrild": library "android.hardware.radio.deprecated@1.0.so" not found: needed by /odm/lib64/libril-qc-hal-qmi.so in namespace (default)

These libraries are listed in common-treble because they're used by ODM
apps but have no explicit vendor dependency (ie. a binary placed on
/vendor) to put them in a vendor-available space.  The default is to
include system variants which is why the dependencies have to be
suffixed with `.vendor` so that they're shipped in `/vendor` and are
available for our ODM blobs even on GSIs.

[1]: d610435ac4

Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
Change-Id: I8344b85fb4e86a913bd8d9071ce49150ed093575
This commit is contained in:
Marijn Suijten 2021-10-06 21:26:13 +02:00 committed by Arian
parent 3182cdfce9
commit 4e1847ceca

View File

@ -205,6 +205,10 @@ PRODUCT_COPY_FILES += \
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/msm_irqbalance.conf:$(TARGET_COPY_OUT_VENDOR)/etc/msm_irqbalance.conf
# Keymaster
PRODUCT_PACKAGES += \
android.hardware.keymaster@4.1.vendor
# LiveDisplay
PRODUCT_PACKAGES += \
vendor.lineage.livedisplay@2.1-service.xiaomi_sm6150
@ -264,6 +268,10 @@ PRODUCT_COPY_FILES += \
# RIL
PRODUCT_PACKAGES += \
android.hardware.radio@1.6.vendor \
android.hardware.radio.config@1.3.vendor \
android.hardware.radio.deprecated@1.0.vendor \
android.hardware.secure_element@1.2.vendor \
CarrierConfigOverlay \
libjson \
libril \