Skip to content

Commit

Permalink
enhancer: fix file permission/context in boot mode
Browse files Browse the repository at this point in the history
Signed-off-by: BlackMesa123 <[email protected]>
  • Loading branch information
salvogiangri committed Sep 29, 2023
1 parent 37c77b6 commit 77bcca8
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 @@ -115,7 +115,21 @@ if $BOOTMODE; then
fi
fi

ui_print "I: Fixing file permissions..."
set_perm_recursive "$MODPATH" 0 0 0755 0644
set_perm_recursive "$MODPATH/system/lib" 0 0 0755 0644 "u:object_r:system_lib_file:s0"
$IS64BIT && set_perm_recursive "$MODPATH/system/lib64" 0 0 0755 0644 "u:object_r:system_lib_file:s0"
if [ -e "$MODPATH/system/vendor" ]; then
set_perm_recursive "$MODPATH/system/vendor" 0 2000 0755 0644 "u:object_r:vendor_file:s0"
set_perm "$MODPATH/system/vendor/lib/hw" 0 2000 0755 "u:object_r:vendor_hal_file:s0"
set_perm "$MODPATH/system/vendor/lib/hw/camera.qcom.so" 0 0 0644 "u:object_r:vendor_file:s0"
[ -f "$MODPATH/system/vendor/lib/hw/com.qti.chi.override.so" ] && set_perm "$MODPATH/system/vendor/lib/hw/com.qti.chi.override.so" 0 0 0644 "u:object_r:vendor_file:s0"
if $IS64BIT; then
set_perm "$MODPATH/system/vendor/lib64/hw" 0 2000 0755 "u:object_r:vendor_hal_file:s0"
set_perm "$MODPATH/system/vendor/lib64/hw/camera.qcom.so" 0 0 0644 "u:object_r:vendor_file:s0"
[ -f "$MODPATH/system/vendor/lib64/hw/com.qti.chi.override.so" ] && set_perm "$MODPATH/system/vendor/lib64/hw/com.qti.chi.override.so" 0 0 0644 "u:object_r:vendor_file:s0"
fi
fi
else
ui_print "- Installing from recovery"

Expand Down

4 comments on commit 77bcca8

@309040521

This comment was marked as off-topic.

@309040521

This comment was marked as off-topic.

@309040521

This comment was marked as off-topic.

@salvogiangri
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please keep the discussion in #53.

Please sign in to comment.