diff --git a/camera-vendor.mk b/camera-vendor.mk index d1839f6..f918d7d 100644 --- a/camera-vendor.mk +++ b/camera-vendor.mk @@ -8,7 +8,6 @@ PRODUCT_SOONG_NAMESPACES += \ PRODUCT_COPY_FILES += \ vendor/xiaomi/camera/proprietary/system/lib64/libcamera_algoup_jni.xiaomi.so:$(TARGET_COPY_OUT_SYSTEM)/lib64/libcamera_algoup_jni.xiaomi.so \ vendor/xiaomi/camera/proprietary/system/lib64/libcamera_mianode_jni.xiaomi.so:$(TARGET_COPY_OUT_SYSTEM)/lib64/libcamera_mianode_jni.xiaomi.so \ - vendor/xiaomi/camera/proprietary/system/lib64/libgui-xiaomi.so:$(TARGET_COPY_OUT_SYSTEM)/lib64/libgui-xiaomi.so \ vendor/xiaomi/camera/proprietary/system/lib64/libmicampostproc_client.so:$(TARGET_COPY_OUT_SYSTEM)/lib64/libmicampostproc_client.so \ vendor/xiaomi/camera/proprietary/system/lib64/vendor.xiaomi.hardware.campostproc@1.0.so:$(TARGET_COPY_OUT_SYSTEM)/lib64/vendor.xiaomi.hardware.campostproc@1.0.so diff --git a/extract-files.sh b/extract-files.sh index c59762d..968d199 100755 --- a/extract-files.sh +++ b/extract-files.sh @@ -55,11 +55,8 @@ fi function blob_fixup() { case "${1}" in - system/lib64/libgui-xiaomi.so) - patchelf --set-soname libgui-xiaomi.so "${2}" - ;; system/lib64/libcamera_algoup_jni.xiaomi.so|system/lib64/libcamera_mianode_jni.xiaomi.so) - patchelf --replace-needed libgui.so libgui-xiaomi.so "${2}" + patchelf --add-needed "libgui_shim_miuicamera.so" "${2}" ;; esac } diff --git a/miuicamera.mk b/miuicamera.mk index fb3c897..96e0ca8 100644 --- a/miuicamera.mk +++ b/miuicamera.mk @@ -21,4 +21,8 @@ PRODUCT_SYSTEM_PROPERTIES += \ BOARD_VENDOR_SEPOLICY_DIRS += \ vendor/xiaomi/camera/sepolicy/vendor +# Shims +PRODUCT_PACKAGES += \ + libgui_shim_miuicamera + $(call inherit-product, vendor/xiaomi/camera/camera-vendor.mk) diff --git a/proprietary-files.txt b/proprietary-files.txt index a573bef..6101090 100644 --- a/proprietary-files.txt +++ b/proprietary-files.txt @@ -2,6 +2,5 @@ -product/priv-app/MiuiCamera/MiuiCamera.apk:system/priv-app/MiuiCamera/MiuiCamera.apk;OVERRIDES=Aperture,Camera,Camera2,GoogleCameraGo system/lib64/libcamera_algoup_jni.xiaomi.so system/lib64/libcamera_mianode_jni.xiaomi.so -system/lib64/libgui.so:system/lib64/libgui-xiaomi.so system/lib64/libmicampostproc_client.so system/lib64/vendor.xiaomi.hardware.campostproc@1.0.so diff --git a/proprietary/system/lib64/libcamera_algoup_jni.xiaomi.so b/proprietary/system/lib64/libcamera_algoup_jni.xiaomi.so index c2e0a96..3d261f3 100644 Binary files a/proprietary/system/lib64/libcamera_algoup_jni.xiaomi.so and b/proprietary/system/lib64/libcamera_algoup_jni.xiaomi.so differ diff --git a/proprietary/system/lib64/libcamera_mianode_jni.xiaomi.so b/proprietary/system/lib64/libcamera_mianode_jni.xiaomi.so index e58c787..0a9ebc1 100644 Binary files a/proprietary/system/lib64/libcamera_mianode_jni.xiaomi.so and b/proprietary/system/lib64/libcamera_mianode_jni.xiaomi.so differ diff --git a/proprietary/system/lib64/libgui-xiaomi.so b/proprietary/system/lib64/libgui-xiaomi.so deleted file mode 100644 index c657501..0000000 Binary files a/proprietary/system/lib64/libgui-xiaomi.so and /dev/null differ diff --git a/shims/Android.bp b/shims/Android.bp new file mode 100644 index 0000000..1cf1a7a --- /dev/null +++ b/shims/Android.bp @@ -0,0 +1,10 @@ +// +// Copyright (C) 2022 The LineageOS Project +// +// SPDX-License-Identifier: Apache-2.0 +// + +cc_library { + name: "libgui_shim_miuicamera", + srcs: ["libgui_shim_miuicamera.c"], +} diff --git a/shims/libgui_shim_miuicamera.c b/shims/libgui_shim_miuicamera.c new file mode 100644 index 0000000..53adfd1 --- /dev/null +++ b/shims/libgui_shim_miuicamera.c @@ -0,0 +1,9 @@ +/* + * Copyright (C) 2023 The LineageOS Project + * + * SPDX-License-Identifier: Apache-2.0 + */ + +void _ZN7android18BnProducerListener16onBufferDetachedEi() { + return; +}