update module scripts

This commit is contained in:
j-hc 2023-02-12 22:15:29 +03:00
parent 9f1e0ab188
commit ee7e02a3a3
No known key found for this signature in database
GPG Key ID: FCBF5E9C57092AD9
2 changed files with 1 additions and 10 deletions

View File

@ -37,13 +37,10 @@ fi
if [ $INS = true ]; then
ui_print "* Updating __PKGNAME (v__PKGVER)"
set_perm $MODPATH/__PKGNAME.apk 1000 1000 644 u:object_r:apk_data_file:s0
ADBV=$(settings get global verifier_verify_adb_installs)
[ $ADBV = 1 ] && settings put global verifier_verify_adb_installs 0
if ! op=$(pm install --user 0 -i com.android.vending -r -d $MODPATH/__PKGNAME.apk 2>&1); then
ui_print "ERROR: APK installation failed!"
abort "$op"
fi
[ $ADBV = 1 ] && settings put global verifier_verify_adb_installs $ADBV
BASEPATH=$(pm path __PKGNAME | grep base)
BASEPATH=${BASEPATH#*:}
if [ -z "$BASEPATH" ]; then
@ -54,7 +51,7 @@ BASEPATHLIB=${BASEPATH%base.apk}lib/${ARCH}
if [ -z "$(ls -A1 ${BASEPATHLIB})" ]; then
ui_print "* Extracting native libs"
mkdir -p $BASEPATHLIB
if ! op=$(unzip -j $MODPATH/__EXTRCT lib/${ARCH_LIB}/* -d ${BASEPATHLIB} 2>&1); then
if ! op=$(unzip -j $MODPATH/__PKGNAME.apk lib/${ARCH_LIB}/* -d ${BASEPATHLIB} 2>&1); then
ui_print "ERROR: extracting native libs failed"
abort "$op"
fi

View File

@ -5,10 +5,4 @@
NVBASE=${MODULES%/*}
rm $NVBASE/rvhc/__PKGNAME_rv.apk
rmdir $NVBASE/rvhc
if __ISBNDL :; then
until [ "$(getprop sys.boot_completed)" = 1 ]; do sleep 1; done
until [ "$(getprop init.svc.bootanim)" = stopped ]; do sleep 1; done
sleep 3
pm uninstall __PKGNAME
fi
} &