exynos9610: Use libutils from VNDK32 for HWC and sensors
authorTim Zimmermann <tim@linux4.de>
Wed, 17 Aug 2022 16:08:25 +0000 (18:08 +0200)
committerNolen Johnson <johnsonnolen@gmail.com>
Wed, 2 Nov 2022 21:54:30 +0000 (17:54 -0400)
* For hwcomposer, sensors, and libexynosdisplay.so
* Abort message: 'incStrongRequireStrong() called on 0x7586a3a1c0 which isn't already owned'

Change-Id: Ibca93bc356b81e205c77df5992b2ae1ded9bb83b

common.mk
extract-files.sh
vndk/Android.mk [new file with mode: 0644]

index 4e9d925bd2a1b4ca58ab91beebfcd37ff152e79e..98ea7a1a17875a0727152929e0c781f15917a353 100644 (file)
--- a/common.mk
+++ b/common.mk
@@ -376,6 +376,10 @@ PRODUCT_PACKAGES += \
 PRODUCT_PACKAGES += \
     android.hardware.vibrator@1.0-service.exynos9610
 
+# VNDK
+PRODUCT_PACKAGES += \
+    libutils-v32
+
 # WiFi
 PRODUCT_PACKAGES += \
     android.hardware.wifi@1.0-service \
index 929c4dcc8c0f18355da7e3272c1ed74bb7dc9056..dbed536d5b79f96313d264664ea5ddbabf4d4d6d 100755 (executable)
@@ -64,6 +64,13 @@ BLOB_ROOT="${ANDROID_ROOT}"/vendor/"${VENDOR}"/"${DEVICE_COMMON}"/proprietary
 
 "${PATCHELF}" --replace-needed "libmedia.so" "libmedia_ims.so" "${BLOB_ROOT}"/lib64/libmediaadaptor.so
 
+"${PATCHELF}" --replace-needed "libutils.so" "libutils-v32.so" "${BLOB_ROOT}"/vendor/lib/libexynosdisplay.so
+"${PATCHELF}" --replace-needed "libutils.so" "libutils-v32.so" "${BLOB_ROOT}"/vendor/lib64/libexynosdisplay.so
+"${PATCHELF}" --replace-needed "libutils.so" "libutils-v32.so" "${BLOB_ROOT}"/vendor/lib/hw/hwcomposer.exynos9610.so
+"${PATCHELF}" --replace-needed "libutils.so" "libutils-v32.so" "${BLOB_ROOT}"/vendor/lib64/hw/hwcomposer.exynos9610.so
+"${PATCHELF}" --replace-needed "libutils.so" "libutils-v32.so" "${BLOB_ROOT}"/vendor/lib/hw/sensors.rp.so
+"${PATCHELF}" --replace-needed "libutils.so" "libutils-v32.so" "${BLOB_ROOT}"/vendor/lib64/hw/sensors.rp.so
+
 for LIBAUDIOPROXY_SHIM in $(grep -L "libaudioproxy_shim.so" "${BLOB_ROOT}"/vendor/lib/libaudioproxy.so); do
     "${PATCHELF}" --add-needed libaudioproxy_shim.so "${LIBAUDIOPROXY_SHIM}"
 done
diff --git a/vndk/Android.mk b/vndk/Android.mk
new file mode 100644 (file)
index 0000000..0cbb2e0
--- /dev/null
@@ -0,0 +1,28 @@
+#
+# Copyright (C) 2022 The LineageOS Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+LOCAL_PATH := prebuilts/vndk/v32/arm64/arch-arm64-armv8-a/shared/vndk-sp
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := libutils-v32
+LOCAL_SRC_FILES := libutils.so
+LOCAL_MODULE_SUFFIX := .so
+LOCAL_MODULE_CLASS := SHARED_LIBRARIES
+LOCAL_MODULE_TARGET_ARCH := arm64
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_SHARED_LIBRARIES)
+LOCAL_MODULE_TAGS := optional
+LOCAL_CHECK_ELF_FILES := false
+include $(BUILD_PREBUILT)