sapphire: Use Shim for missing symbols

04-03 15:00:34.291  1443  1443 F linker  : CANNOT LINK EXECUTABLE "/vendor/bin/hw/vendor.dolby.media.c2@1.0-service": cannot locate symbol "_ZN7android13FilterWrapper17getParamReflectorEv" referenced by "/vendor/lib64/libcodec2_hidl@1.0.so"...
04-03 15:00:34.324  1444  1444 F linker  : CANNOT LINK EXECUTABLE "/vendor/bin/hw/vendor.qti.media.c2@1.0-service": cannot locate symbol "_ZN7android13FilterWrapper17getParamReflectorEv" referenced by "/vendor/lib64/libcodec2_hidl@1.0.so"...
04-03 15:00:34.339  1445  1445 F linker  : CANNOT LINK EXECUTABLE "/vendor/bin/hw/vendor.qti.media.c2audio@1.0-service": cannot locate symbol "_ZN7android13FilterWrapper17getParamReflectorEv" referenced by "/vendor/lib64/libcodec2_hidl@1.0.so"...
04-03 15:00:35.065  1613  1613 F linker  : CANNOT LINK EXECUTABLE "/vendor/bin/vendor.dpmd": cannot locate symbol "_ZN7android8hardware6Parcel7setDataEPKhm" referenced by "/vendor/lib64/vendor.libdpmframework.so"...
This commit is contained in:
AmeChanRain
2023-10-11 01:08:25 +00:00
committed by Liekoo
parent f03347b535
commit 963e04b536
4 changed files with 31 additions and 0 deletions

View File

@@ -557,6 +557,9 @@ PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.software.sip.voip.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.sip.voip.xml
endif
# Shim for missing symbols
PRODUCT_PACKAGES += libshim
# Thermal
PRODUCT_PACKAGES += \
android.hardware.thermal@2.0-service.qti-v2 \

View File

@@ -75,6 +75,16 @@ function blob_fixup() {
[ "$2" = "" ] && return 0
"${PATCHELF}" --replace-needed "libstagefright_foundation.so" "libstagefright_foundation-v33.so" "${2}"
;;
vendor/bin/hw/vendor.qti.media.c2@1.0-service|vendor/bin/hw/vendor.dolby.media.c2@1.0-service|vendor/bin/hw/vendor.qti.media.c2audio@1.0-service)
[ "$2" = "" ] && return 0
"${PATCHELF}" --replace-needed "libcodec2_hidl@1.0.so" "${2}"
"${PATCHELF}" --add-needed "libshim.so" "${2}"
;;
vendor/bin/vendor.dpmd)
[ "$2" = "" ] && return 0
"${PATCHELF}" --replace-needed "vendor.libdpmframework.so" "${2}"
"${PATCHELF}" --add-needed "libshim.so" "${2}"
;;
vendor/etc/seccomp_policy/atfwd@2.0.policy)
[ "$2" = "" ] && return 0
grep -q "gettid: 1" "${2}" || echo "gettid: 1" >> "${2}"

9
shims/Android.mk Normal file
View File

@@ -0,0 +1,9 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := libshim.cpp
LOCAL_SHARED_LIBRARIES := libui libutils
LOCAL_MODULE := libshim
LOCAL_MODULE_TAGS := optional
LOCAL_PROPRIETARY_MODULE := true
include $(BUILD_SHARED_LIBRARY)

9
shims/libshim.cpp Normal file
View File

@@ -0,0 +1,9 @@
#include <stdint.h>
namespace android {
extern "C" void _ZN7android13FilterWrapper17getParamReflectorEv() {
}
extern "C" void _ZN7android8hardware6Parcel7setDataEPKhm() {
}
}