mirror of
https://github.com/j-hc/revanced-magisk-module.git
synced 2025-05-27 20:10:19 +02:00
module: add checks
This commit is contained in:
parent
3ddf638566
commit
09baf0ab39
@ -25,10 +25,9 @@ enabled = true # whether to build the app. default: true
|
||||
build-mode = "both" # 'both', 'apk' or 'module'. default: apk
|
||||
allow-alpha-version = false # allow downloading alpha versions from apkmirror. default: false
|
||||
excluded-patches = "some-patch" # whitespace seperated list of patches to exclude. default: "" (empty)
|
||||
included-patches = "patch-name" # whitespace seperated list of patches to include. default: "" (empty)
|
||||
included-patches = "patch-name" # whitespace seperated list of patches to include, all default patches are included by default. default: "" (empty)
|
||||
version = "auto" # 'auto', 'latest' or a custom one e.g. '17.40.41'. 'auto' option gets the latest version that is supported by the patches. default: auto
|
||||
exclusive-patches = false # exclude all patches by default. default: false
|
||||
microg-patch = "microg-support" # name of the microg-patch if exists for the app. default: "" (empty)
|
||||
apkmirror-dlurl = "https://www.apkmirror.com/apk/inc/app" # download url. if not set, uptodown dl url is used.
|
||||
uptodown-dlurl = "https://spotify.en.uptodown.com/android" # uptodown url. if not set, apkmirror dl url is used. apkmirror is prioritized
|
||||
module-prop-name = "ytrv-magisk" # magisk module prop name. not required.
|
||||
@ -38,5 +37,4 @@ arch = "arm64-v8a" # 'arm64-v8a', 'arm-v7a' or 'all'. default: all
|
||||
```
|
||||
|
||||
# Building ReVanced Extended
|
||||
Use [`config-rv-ex.toml`](./config-rv-ex.toml) as the config.
|
||||
By replacing config.toml with config-rv-ex.toml.
|
||||
Use [`config-rv-ex.toml`](./config-rv-ex.toml) as the config by replacing config.toml with it
|
||||
|
@ -24,7 +24,7 @@ BASEPATH=${BASEPATH#*:}
|
||||
INS=true
|
||||
if [ "$BASEPATH" ]; then
|
||||
if [ ! -d ${BASEPATH%base.apk}lib ]; then
|
||||
ui_print "Invalid installation found. Uninstalling..."
|
||||
ui_print "* Invalid installation found. Uninstalling..."
|
||||
pm uninstall -k --user 0 __PKGNAME
|
||||
elif cmpr $BASEPATH $MODPATH/__PKGNAME.apk; then
|
||||
ui_print "* __PKGNAME is up-to-date"
|
||||
|
@ -13,11 +13,18 @@ if [ $BASEPATH ] && [ -d ${BASEPATH%base.apk}lib ]; then
|
||||
VERSION=$(dumpsys package __PKGNAME | grep -m1 versionName)
|
||||
if [ ${VERSION#*=} = __PKGVER ]; then
|
||||
grep __PKGNAME /proc/self/mountinfo | while read -r line; do
|
||||
mountpoint=$(echo "$line" | cut -d' ' -f5)
|
||||
umount -l "${mountpoint%%\\*}"
|
||||
mountpoint=$(echo "$line" | cut -d' ' -f5)
|
||||
umount -l "${mountpoint%%\\*}"
|
||||
done
|
||||
chcon u:object_r:apk_data_file:s0 $RVPATH
|
||||
su -Mc mount -o bind $RVPATH $BASEPATH
|
||||
am force-stop __PKGNAME
|
||||
mv -f $MODDIR/err $MODDIR/module.prop 2>/dev/null
|
||||
else
|
||||
cp -n $MODDIR/module.prop $MODDIR/err
|
||||
sed -i "s/^des.*/description=⚠️ Module is inactive: Version mismatch (${VERSION#*=})/g" $MODDIR/module.prop
|
||||
fi
|
||||
else
|
||||
cp -n $MODDIR/module.prop $MODDIR/err
|
||||
sed -i "s/^des.*/description=⚠️ Module is inactive: Invalid installation/g" $MODDIR/module.prop
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user