Skip to content

Commit

Permalink
enhancer: add camera bootloader lock restriction fix
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidArsene authored and salvogiangri committed Sep 28, 2023
1 parent 188d7d7 commit 37c77b6
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions enhancer/customize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,20 @@ if $BOOTMODE; then
touch "$MODPATH/system/lib64/libhal.wsm.samsung.so"
fi

if [ -f "/vendor/lib/hw/camera.qcom.so" ]; then
if grep -q 'ro.boot.flash.locked' /vendor/lib/hw/camera.qcom.so; then
ui_print "I: Applying camera fix..."
mkdir -p "$MODPATH/system/vendor/lib/hw"
sed 's/ro.boot.flash.locked/ro.camera.notify_nfc/g' "/vendor/lib/hw/camera.qcom.so" > "$MODPATH/system/vendor/lib/hw/camera.qcom.so"
[ -f "/vendor/lib/hw/com.qti.chi.override.so" ] && sed 's/ro.boot.flash.locked/ro.camera.notify_nfc/g' "/vendor/lib/hw/com.qti.chi.override.so" > "$MODPATH/system/vendor/lib/hw/com.qti.chi.override.so"
if $IS64BIT; then
mkdir -p "$MODPATH/system/vendor/lib64/hw"
sed 's/ro.boot.flash.locked/ro.camera.notify_nfc/g' "/vendor/lib64/hw/camera.qcom.so" > "$MODPATH/system/vendor/lib64/hw/camera.qcom.so"
[ -f "/vendor/lib64/hw/com.qti.chi.override.so" ] && sed 's/ro.boot.flash.locked/ro.camera.notify_nfc/g' "/vendor/lib64/hw/com.qti.chi.override.so" > "$MODPATH/system/vendor/lib64/hw/com.qti.chi.override.so"
fi
fi
fi

set_perm_recursive "$MODPATH" 0 0 0755 0644
else
ui_print "- Installing from recovery"
Expand Down

0 comments on commit 37c77b6

Please sign in to comment.