X6833B: Link older libutils for PQ HAL

* Abort message: 'incStrongRequireStrong() called on 0xb400007c5afa7250 which isn't already owned'

Change-Id: I7ea86d3d7c68ba183b4838cb1f35a9fc58cfbf67
Signed-off-by: dodyirawan85 <40514988+dodyirawan85@users.noreply.github.com>
This commit is contained in:
SamarV-121 2023-07-20 14:52:21 +01:00 committed by dodyirawan85
parent 5ca665b1a5
commit c1d70a0738
3 changed files with 24 additions and 1 deletions

View file

@ -59,7 +59,8 @@ PRODUCT_PACKAGES += \
PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += \
android.hardware.graphics.allocator@4.0.vendor \ android.hardware.graphics.allocator@4.0.vendor \
libdrm.vendor libdrm.vendor \
libutils-v32
# Dynamic partitions # Dynamic partitions
PRODUCT_USE_DYNAMIC_PARTITIONS := true PRODUCT_USE_DYNAMIC_PARTITIONS := true

View file

@ -53,6 +53,14 @@ if [ -z "${SRC}" ]; then
SRC="adb" SRC="adb"
fi fi
function blob_fixup {
case "$1" in
vendor/lib*/hw/mt6789/vendor.mediatek.hardware.pq@2.15-impl.so)
"$PATCHELF" --replace-needed "libutils.so" "libutils-v32.so" "$2"
;;
esac
}
# Initialize the helper # Initialize the helper
setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}" false "${CLEAN_VENDOR}" setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}" false "${CLEAN_VENDOR}"

14
vndk/Android.mk Normal file
View file

@ -0,0 +1,14 @@
LOCAL_PATH := prebuilts/vndk
include $(CLEAR_VARS)
LOCAL_MODULE := libutils-v32
LOCAL_MULTILIB := both
LOCAL_SRC_FILES_arm := v32/arm64/arch-arm-armv8-a/shared/vndk-sp/libutils.so
LOCAL_SRC_FILES_arm64 := v32/arm64/arch-arm64-armv8-a/shared/vndk-sp/libutils.so
LOCAL_MODULE_SUFFIX := .so
LOCAL_MODULE_CLASS := SHARED_LIBRARIES
LOCAL_MODULE_TARGET_ARCH := arm arm64
LOCAL_MODULE_TAGS := optional
LOCAL_CHECK_ELF_FILES := false
LOCAL_VENDOR_MODULE := true
include $(BUILD_PREBUILT)