Skip to content

Commit

Permalink
Update overlayrw
Browse files Browse the repository at this point in the history
  • Loading branch information
Zenlua authored Jan 19, 2024
1 parent 0e040b0 commit 329133f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions module/common/overlayrw
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
#!/system/bin/sh
MODP="/data/overlayfs"
TMPP="/data/overlayfs/tmp"
if [ -d $1 ];then
mkdir -p $MODP$1
setfattr -n trusted.overlay.opaque -v y $MODP$1 2>/dev/null
mkdir -p $MODP/zoption$1
mkdir -p $TMPP$1
chcon -Rh "$(ls -nZld "$1" | awk '{print $5}')" "$MODP$1"
chmod -R 755 "$MODP$1"
chown -Rh $(ls -nZld "$1" | awk '{print $3":"$4}') "$MODP$1"
mount -t overlay kakathic -o upperdir=$MODP$1,lowerdir=$1,workdir=$MODP/zoption$1 $1 && echo "Mount: $1 done" || echo "Mount: $1 failure !"
mount -t overlay kakathic -o upperdir=$MODP$1,lowerdir=$1,workdir=$TMPP$1 $1 && echo "Mount: $1 done" || echo "Mount: $1 failure !"
elif [ -z $1 ] || [ "$1" == "--help" ];then
echo "Use: overlayrw [path_folder_rw]"
echo "Instruct: overlayrw /system/app"
Expand Down

0 comments on commit 329133f

Please sign in to comment.