LG8n: Add a shim to link sensor blobs against `android.hardware.sens…

…ors@1.0-convert`

* `libndksensorbridge` was converted to AIDL and is no longer linked to
  this static library that contains symbols required by our sensor
  blobs. Add a shim linked to `android.hardware.sensors@1.0-convert` to
  fix our sensors

Change-Id: I969f97bb15d0abcc71f87352722995db3826e122
Signed-off-by: Woomymy <woomy@woomy.be>
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
This commit is contained in:
Woomymy 2024-07-25 23:23:11 +08:00 committed by Shirayuki39
parent 6c9f0b3dea
commit cb60895bb0
3 changed files with 22 additions and 0 deletions

View file

@ -253,6 +253,10 @@ PRODUCT_PACKAGES += \
android.hardware.security.sharedsecret-V1-ndk_platform.vendor \
libcppbor_external.vendor:64
# Libshims
PRODUCT_PACKAGES += \
libshim_sensors
# Lights
PRODUCT_PACKAGES += \
android.hardware.light-V1-ndk.vendor

View file

@ -111,6 +111,12 @@ function blob_fixup {
"$PATCHELF" --replace-needed "android.hardware.security.secureclock-V1-ndk_platform.so" "android.hardware.security.secureclock-V1-ndk.so" "$2"
"$PATCHELF" --replace-needed "android.hardware.security.sharedsecret-V1-ndk_platform.so" "android.hardware.security.sharedsecret-V1-ndk.so" "$2"
;;
vendor/lib64/hw/android.hardware.sensors@2.X-subhal-mediatek.so|\
vendor/lib64/hw/mt6789/vendor.mediatek.hardware.pq@2.15-impl.so|\
vendor/lib64/mt6789/libaalservice.so|\
vendor/lib64/mt6789/libcam.utils.sensorprovider.so)
"${PATCHELF}" --add-needed "libshim_sensors.so" "${2}"
;;
esac
}

12
shims/Android.bp Normal file
View file

@ -0,0 +1,12 @@
cc_library_shared {
name: "libshim_sensors",
whole_static_libs: [
"android.hardware.sensors@1.0-convert"
],
shared_libs: [
"libhardware",
"libhidlbase",
"android.hardware.sensors@1.0"
],
vendor: true
}