Skip to content

Commit 0675f9a

Browse files
set permissions and selinux context on sdcard
we previously only set the owner
1 parent 8775832 commit 0675f9a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

magiskmodule/customize.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ VIPERFXSHAREDPREFS="$VIPERFXPREFS"/shared_prefs
100100
[ ! -d "$VIPERFXSHAREDPREFS" ] && mkdir "$VIPERFXSHAREDPREFS"
101101
cp -f "$MODPATH"/viperfx_preferences.xml "$VIPERFXSHAREDPREFS"/"${VIPERFXPACKAGE}_preferences.xml"
102102
chown -R $VIPERFXPREFSOWNER:$VIPERFXPREFSOWNER "$VIPERFXPREFS"
103-
chown -R $VIPERFXPREFSOWNER "$FOLDER"
103+
set_perm_recursive "$FOLDER" "$VIPERFXPREFSOWNER" sdcard_rw 771 660 u:object_r:sdcardfs:s0
104104
# this permanently hides the notifications without the possiblity of reenabling them
105105
[ $API -ge 31 ] && pm set-distracting-restriction --flag hide-notifications $VIPERFXPACKAGE
106106
[ $API -ge 33 ] && {
@@ -137,6 +137,6 @@ for packagedata in $(sed -e 's/^\s*#.*$//' -e '/^$/d' < "$MODPATH"/stockeqpackag
137137
done
138138

139139
ui_print "- Setting Permissions"
140-
set_perm_recursive "$MODPATH"/system 0 0 0755 0644
141-
set_perm_recursive "$MODPATH"/system/vendor 0 0 0755 0644 u:object_r:vendor_file:s0
142-
[ -d "$MODPATH"/system/vendor/etc ] && set_perm_recursive "$MODPATH"/system/vendor/etc 0 0 0755 0644 u:object_r:vendor_configs_file:s0
140+
set_perm_recursive "$MODPATH"/system root root 755 644
141+
set_perm_recursive "$MODPATH"/system/vendor root root 755 644 u:object_r:vendor_file:s0
142+
[ -d "$MODPATH"/system/vendor/etc ] && set_perm_recursive "$MODPATH"/system/vendor/etc root root 755 644 u:object_r:vendor_configs_file:s0

0 commit comments

Comments
 (0)