sdm660-common: Get rid of megvii dependencies in camera.sdm660.so

Change-Id: I97058c320d06819a468ebe38e2704360e9aa91db
Signed-off-by: Arian <arian.kulmer@web.de>
This commit is contained in:
kazerine
2020-08-12 00:18:36 +05:30
committed by Nolen Johnson
parent a3ca04f423
commit 868ba32cf0
5 changed files with 54 additions and 3 deletions

21
camera/Android.bp Normal file
View File

@@ -0,0 +1,21 @@
//
// Copyright (C) 2020 The LineageOS Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
cc_library_shared {
name: "libshim_megvii",
proprietary: true,
srcs: ["megvii_shim.cpp"],
}

19
camera/megvii_shim.cpp Normal file
View File

@@ -0,0 +1,19 @@
/*
* Copyright (C) 2020 The LineageOS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
namespace android {
extern "C" void mg_facepp() {}
}

View File

@@ -57,6 +57,16 @@ if [ -z "$SRC" ]; then
SRC=adb
fi
function blob_fixup() {
case "${1}" in
vendor/lib64/hw/camera.qcom.so)
patchelf --remove-needed "libMegviiFacepp.so" "${2}"
patchelf --remove-needed "libmegface-new.so" "${2}"
patchelf --add-needed "libshim_megvii.so" "${2}"
;;
esac
}
# Initialize the helper for common device
setup_vendor "$DEVICE_COMMON" "$VENDOR" "$LINEAGE_ROOT" true $CLEAN_VENDOR

View File

@@ -156,7 +156,7 @@ vendor/lib64/libaptX_encoder.so
lib/libseemore.so
lib64/libseemore.so
vendor/bin/mm-qcamera-app
vendor/lib/hw/camera.sdm660.so
vendor/lib/hw/camera.sdm660.so|1e4af7b317b0b3a525f9cce166ec76b8feeb7689
vendor/lib/libc++_shared.so
vendor/lib/libdepthmapwrapper.so
vendor/lib/libflash_pmic.so
@@ -165,7 +165,6 @@ vendor/lib/libhal_dbg.so
vendor/lib/libjpegdhw.so
vendor/lib/libjpegdmahw.so
vendor/lib/libjpegehw.so
vendor/lib/libMegviiFacepp.so
vendor/lib/libmm-qcamera.so
vendor/lib/libmmjpeg.so
vendor/lib/libmmjpeg_interface.so
@@ -1724,7 +1723,6 @@ vendor/lib/libimage_matting.so
vendor/lib/libirisService.so
vendor/lib/libiris_ioctl_wrapper.so
vendor/lib/libjnihelper.so
vendor/lib/libmegface-new.so
vendor/lib/libMGBeauty.so
vendor/lib/libmiracast.so
vendor/lib/libopus.so

View File

@@ -153,6 +153,9 @@ PRODUCT_PACKAGES += \
libxml2 \
Snap
PRODUCT_PACKAGES += \
libshim_megvii
# Display
PRODUCT_PACKAGES += \
android.hardware.graphics.allocator@2.0-impl \