diff options
-rwxr-xr-x | extract-files.sh | 4 | ||||
-rw-r--r-- | libshims/Android.bp | 17 | ||||
-rw-r--r-- | libshims/miwatermark.cpp | 10 | ||||
-rw-r--r-- | sdm660.mk | 1 |
4 files changed, 32 insertions, 0 deletions
diff --git a/extract-files.sh b/extract-files.sh index 88517a6..8528cec 100755 --- a/extract-files.sh +++ b/extract-files.sh @@ -70,6 +70,10 @@ function blob_fixup() { patchelf --remove-needed vendor.xiaomi.hardware.mtdservice@1.0.so "${2}" sed -i "s|/system/etc/firmware|/vendor/firmware\x0\x0\x0\x0|g" "${2}" ;; + + vendor/lib/hw/camera.sdm660.so) + patchelf --replace-needed libMiWatermark.so libMiWatermark_shim.so "${2}" + ;; esac } diff --git a/libshims/Android.bp b/libshims/Android.bp new file mode 100644 index 0000000..a1f2c0d --- /dev/null +++ b/libshims/Android.bp @@ -0,0 +1,17 @@ +/* libMiWatermark */ +cc_library_shared { + name: "libMiWatermark_shim", + proprietary: true, + defaults: ["hidl_defaults"], + srcs: [ + "miwatermark.cpp", + ], + cflags: [ + "-Werror", + "-Wextra", + "-Wall", + ], + shared_libs: [ + "libutils", + ], +} diff --git a/libshims/miwatermark.cpp b/libshims/miwatermark.cpp new file mode 100644 index 0000000..b2daf37 --- /dev/null +++ b/libshims/miwatermark.cpp @@ -0,0 +1,10 @@ +#include <stdint.h> + +namespace android { + extern "C" void miwatermark_age() {} + extern "C" void miwatermark_deinit() {} + extern "C" void miwatermark_dualcamera() {} + extern "C" void miwatermark_init() {} + extern "C" void miwatermark_score() {} + extern "C" void miwatermark_time() {} +} @@ -144,6 +144,7 @@ PRODUCT_BOOT_JARS += \ # Camera PRODUCT_PACKAGES += \ + libMiWatermark_shim \ Snap PRODUCT_PACKAGES += \ |