gta4xl-common: Use libutils from VNDK32 for HWC and sensors

* For sensors.sensorhub.so and libexynosdisplay.so
* Abort message: 'incStrongRequireStrong() called on 0x7586a3a1c0 which isn't already owned'

Change-Id: Ibca93bc356b81e205c77df5992b2ae1ded9bb83b
diff --git a/common.mk b/common.mk
index a85f796..c1feb87 100644
--- a/common.mk
+++ b/common.mk
@@ -257,6 +257,10 @@
 PRODUCT_PACKAGES += \
     android.hardware.usb@1.3-service.samsung
 
+# VNDK
+PRODUCT_PACKAGES += \
+    libutils-v32
+
 # WiFi
 PRODUCT_PACKAGES += \
     WifiOverlay \
diff --git a/extract-files.sh b/extract-files.sh
index 89af173..01da0e7 100755
--- a/extract-files.sh
+++ b/extract-files.sh
@@ -60,6 +60,9 @@
 
 function blob_fixup() {
     case "${1}" in
+        vendor/lib*/libexynosdisplay.so|vendor/lib*/hw/hwcomposer.exynos9611.so|vendor/lib*/sensors.*.so)
+            "${PATCHELF}" --replace-needed libutils.so libutils-v32.so "${2}"
+            ;;
         vendor/lib*/libsensorlistener.so)
             "${PATCHELF}" --add-needed libshim_sensorndkbridge.so "${2}"
             ;;
diff --git a/vndk/Android.mk b/vndk/Android.mk
new file mode 100644
index 0000000..0cbb2e0
--- /dev/null
+++ b/vndk/Android.mk
@@ -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)