Skip to content

Commit

Permalink
back to nsenter
Browse files Browse the repository at this point in the history
  • Loading branch information
j-hc committed Sep 23, 2023
1 parent 6d47258 commit 574644a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions scripts/customize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ else
fi
set_perm_recursive $MODPATH/bin 0 0 0755 0777

su -M -c grep __PKGNAME /proc/mounts | while read -r line; do
nsenter -t1 -m -- grep __PKGNAME /proc/mounts | while read -r line; do
ui_print "* Un-mount"
mp=${line#* }
mp=${mp%% *}
su -M -c umount -l "${mp%%\\*}"
nsenter -t1 -m -- umount -l "${mp%%\\*}"
done
am force-stop __PKGNAME

Expand Down Expand Up @@ -97,7 +97,7 @@ mkdir -p $NVBASE/rvhc
RVPATH=$NVBASE/rvhc/${MODPATH##*/}.apk
mv -f $MODPATH/base.apk $RVPATH

if ! op=$(su -M -c mount -o bind $RVPATH $BASEPATH/base.apk 2>&1); then
if ! op=$(nsenter -t1 -m -- mount -o bind $RVPATH $BASEPATH/base.apk 2>&1); then
ui_print "ERROR: Mount failed!"
ui_print "$op"
fi
Expand Down
2 changes: 1 addition & 1 deletion scripts/uninstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
MODDIR=${0%/*}
rm "$NVBASE/rvhc/${MODDIR##*/}".apk
rmdir --ignore-fail-on-non-empty "$NVBASE/rvhc"
rmdir "$NVBASE/rvhc"
# if __ISBNDL; then
# until [ "$(getprop sys.boot_completed)" = 1 ]; do sleep 1; done
# sleep 15
Expand Down

0 comments on commit 574644a

Please sign in to comment.