RM6785-common: Shim missing libutils symbol for Camera HAL
* cannot locate symbol "_ZN7android7String87toUpperEv" referenced by
"/vendor/lib64/libcam.halsensor.so"....
9434f59c17
Signed-off-by: bengris32 <bengris32@protonmail.ch>
Change-Id: I7ac4e2362a9cca76009785d994d2aa6d103182f1
This commit is contained in:
@@ -55,7 +55,8 @@ PRODUCT_PACKAGES += \
|
||||
libpng.vendor:64
|
||||
|
||||
PRODUCT_PACKAGES += \
|
||||
libshim_camera_metadata
|
||||
libshim_camera_metadata \
|
||||
libshim_utils
|
||||
|
||||
# ConfigStore
|
||||
PRODUCT_PACKAGES += \
|
||||
|
||||
@@ -62,6 +62,10 @@ function blob_fixup {
|
||||
[ "$2" = "" ] && return 0
|
||||
grep -q "liblog.so" "${2}" || "${PATCHELF_0_17_2}" --add-needed "liblog.so" "${2}"
|
||||
;;
|
||||
vendor/lib64/libcam.halsensor.so)
|
||||
[ "$2" = "" ] && return 0
|
||||
grep -q "libshim_utils.so" "$2" || "$PATCHELF" --add-needed "libshim_utils.so" "$2"
|
||||
;;
|
||||
vendor/lib64/libmtkcam_stdutils.so)
|
||||
"$PATCHELF" --replace-needed "libutils.so" "libutils-v30.so" "$2"
|
||||
;;
|
||||
|
||||
15
libshims/libutils/Android.bp
Normal file
15
libshims/libutils/Android.bp
Normal file
@@ -0,0 +1,15 @@
|
||||
//
|
||||
// Copyright (C) 2022 The LineageOS Project
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
cc_library_shared {
|
||||
name: "libshim_utils",
|
||||
srcs: ["libshim_utils.cpp"],
|
||||
vendor: true,
|
||||
compile_multilib: "64",
|
||||
shared_libs: [
|
||||
"libutils",
|
||||
],
|
||||
}
|
||||
25
libshims/libutils/libshim_utils.cpp
Normal file
25
libshims/libutils/libshim_utils.cpp
Normal file
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Copyright (C) 2022 The LineageOS Project
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <utils/String8.h>
|
||||
|
||||
using namespace android;
|
||||
|
||||
extern "C" {
|
||||
|
||||
void _ZN7android7String87toUpperEv(String8* thisptr) {
|
||||
const size_t length = thisptr->size();
|
||||
if (length == 0) return;
|
||||
|
||||
char* buf = thisptr->lockBuffer(length);
|
||||
for (size_t i = length; i > 0; --i) {
|
||||
*buf = static_cast<char>(toupper(*buf));
|
||||
buf++;
|
||||
}
|
||||
thisptr->unlockBuffer(length);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user