module: remove NVBASE

This commit is contained in:
j-hc 2024-07-25 23:45:13 +03:00
parent 37baf5ffdb
commit ecd919d176
No known key found for this signature in database
GPG Key ID: CDF97F1DBFE904CD
4 changed files with 6 additions and 10 deletions

View File

@ -118,8 +118,8 @@ ui_print "* Setting Permissions"
set_perm "$MODPATH/base.apk" 1000 1000 644 u:object_r:apk_data_file:s0
ui_print "* Mounting $PKG_NAME"
mkdir -p "$NVBASE/rvhc"
RVPATH=$NVBASE/rvhc/${MODPATH##*/}.apk
mkdir -p "/data/adb/rvhc"
RVPATH=/data/adb/rvhc/${MODPATH##*/}.apk
mv -f "$MODPATH/base.apk" "$RVPATH"
if ! op=$(mm mount -o bind "$RVPATH" "$BASEPATH/base.apk" 2>&1); then
@ -133,10 +133,6 @@ nohup cmd package compile --reset "$PKG_NAME" >/dev/null 2>&1 &
ui_print "* Cleanup"
rm -rf "${MODPATH:?}/bin" "$MODPATH/$PKG_NAME.apk"
for s in "uninstall.sh" "service.sh"; do
sed -i "2 i\NVBASE=${NVBASE}" "$MODPATH/$s"
done
ui_print "* Done"
ui_print " by j-hc (github.com/j-hc)"
ui_print " "

View File

@ -1,6 +1,6 @@
#!/system/bin/sh
MODDIR=${0%/*}
RVPATH=$NVBASE/rvhc/${MODDIR##*/}.apk
RVPATH=/data/adb/rvhc/${MODDIR##*/}.apk
. "$MODDIR/config"
until [ "$(getprop sys.boot_completed)" = 1 ]; do sleep 1; done

View File

@ -1,6 +1,6 @@
#!/system/bin/sh
{
MODDIR=${0%/*}
rm "$NVBASE/rvhc/${MODDIR##*/}".apk
rmdir "$NVBASE/rvhc"
rm "/data/adb/rvhc/${MODDIR##*/}".apk
rmdir "/data/adb/rvhc"
} &

View File

@ -260,7 +260,7 @@ get_uptodown_resp() {
}
get_uptodown_vers() { $HTMLQ --text ".version" <<<"$__UPTODOWN_RESP__"; }
dl_uptodown() {
local uptodown_dlurl=$1 version=$2 output=$3 arch=$4 is_latest=$6
local uptodown_dlurl=$1 version=$2 output=$3 arch=$4 _dpi=$5 is_latest=$6
local url
if [ "$is_latest" = false ]; then
url=$(grep -F "${version}</span>" -B 2 <<<"$__UPTODOWN_RESP__" | head -1 | sed -n 's;.*data-url=".*download\/\(.*\)".*;\1;p') || return 1