From 574644ad9dfac09d7f33c8cbad3199a0c329cba8 Mon Sep 17 00:00:00 2001 From: j-hc Date: Sat, 23 Sep 2023 14:37:35 +0300 Subject: [PATCH] back to nsenter --- scripts/customize.sh | 6 +++--- scripts/uninstall.sh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/customize.sh b/scripts/customize.sh index 59aa176..48e1711 100755 --- a/scripts/customize.sh +++ b/scripts/customize.sh @@ -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 @@ -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 diff --git a/scripts/uninstall.sh b/scripts/uninstall.sh index 91c78eb..ab2372e 100755 --- a/scripts/uninstall.sh +++ b/scripts/uninstall.sh @@ -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