From b5753554aa55820864746b67b83e05cec81d788b Mon Sep 17 00:00:00 2001 From: Davide Garberi Date: Tue, 29 Jan 2019 20:02:48 +0100 Subject: msm8996-common: Enable actual VNDK support * Basically: - Copy vndk 28 libgui.so to vendor renaming it to libfui.so and hex edit libmmcamera2_stats_modules and libmmcamera_ppeiscore to search for it This is needed as with BOARD_VNDK_RUNTIME_DISABLE disabled only some files are allowed to access the /system/lib directory - Patchelf libmpbase and libmmcamera2_stats_modules to remove libandroid.so which was being searched, it isn't actually necessary * Thanks erfanoabdi for all the help with this Signed-off-by: Davide Garberi Change-Id: Ib1797104c3cdf1b4205616a127d4a99cbc70d67b --- BoardConfigCommon.mk | 1 - extract-files.sh | 8 ++++++++ proprietary-files.txt | 3 +++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk index 42aefe6..7fd168c 100644 --- a/BoardConfigCommon.mk +++ b/BoardConfigCommon.mk @@ -58,7 +58,6 @@ TARGET_BOARD_PLATFORM_GPU := qcom-adreno530 # Properties BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED := true -BOARD_VNDK_RUNTIME_DISABLE := true BOARD_VNDK_VERSION := current PRODUCT_FULL_TREBLE_OVERRIDE := true PRODUCT_VENDOR_MOVE_ENABLED := true diff --git a/extract-files.sh b/extract-files.sh index 78747c0..196cb8d 100755 --- a/extract-files.sh +++ b/extract-files.sh @@ -64,4 +64,12 @@ if [ -s "$MY_DIR"/../$DEVICE/proprietary-files.txt ]; then extract "$MY_DIR"/../$DEVICE/proprietary-files.txt "$SRC" "$SECTION" fi +BLOB_ROOT="$LINEAGE_ROOT"/vendor/"$VENDOR"/msm8996-common/proprietary + +# Patch blobs for VNDK +sed -i "s|libgui.so|libfui.so|g" "$BLOB_ROOT"/vendor/lib/libmmcamera_ppeiscore.so +sed -i "s|libgui.so|libfui.so|g" "$BLOB_ROOT"/vendor/lib/libmmcamera2_stats_modules.so +patchelf --remove-needed libandroid.so "$BLOB_ROOT"/vendor/lib/libmmcamera2_stats_modules.so +patchelf --remove-needed libandroid.so "$BLOB_ROOT"/vendor/lib/libmpbase.so + "$MY_DIR"/setup-makefiles.sh diff --git a/proprietary-files.txt b/proprietary-files.txt index bec1d6c..4c0c5aa 100644 --- a/proprietary-files.txt +++ b/proprietary-files.txt @@ -246,6 +246,9 @@ vendor/lib/libchromatix_ov8865_video_full.so vendor/lib/libchromatix_ov8865_zsl_preview.so vendor/lib/libchromatix_ov8865_zsl_video.so +# Camera vndk hax - from Lineage 16.0 build +vendor/lib/libfui.so|21d012ec9dabe6e62e023780eac1e3a476eb298e + # CNE - from LA.UM.7.6.r1-02800-89xx.0 - daisy 9/PKQ1.180917.001/V10.0.1.0PDLMIFJ etc/permissions/cneapiclient.xml|15831adf0e80243042b90c734eea0a68eb8ae9c9 etc/permissions/com.quicinc.cne.xml|e99e631d8b06ba4680529e9e4004d8d05baf6904 -- cgit v1.2.3