New test persist detection
This commit is contained in:
parent
6537f38309
commit
612a2a0fc5
|
|
@ -2,7 +2,7 @@ SKIPUNZIP=1
|
|||
RIRU_PATH="/data/misc/riru"
|
||||
OLD_MAGISK=false
|
||||
DETECTED_DEVICE=false
|
||||
NO_PERSIST=true
|
||||
NO_PERSIST=false
|
||||
PROP_MODEL=$(getprop ro.product.model)
|
||||
PROP_DEVICE=$(getprop ro.product.device)
|
||||
PROP_PRODUCT=$(getprop ro.build.product)
|
||||
|
|
@ -28,10 +28,6 @@ HONOR
|
|||
MANUFACTURER="
|
||||
HUAWEI
|
||||
"
|
||||
PERSIST="
|
||||
/persist
|
||||
/mnt/vendor/persist
|
||||
"
|
||||
|
||||
require_new_magisk() {
|
||||
if [[ "${NO_PERSIST}" == true ]]; then
|
||||
|
|
@ -153,7 +149,7 @@ check_architecture() {
|
|||
fi
|
||||
ui_print "- EdXposed Variant: ${VARIANTS}"
|
||||
if [[ "${ARCH}" != "arm" && "${ARCH}" != "arm64" && "${ARCH}" != "x86" && "${ARCH}" != "x64" ]]; then
|
||||
abort "! Unsupported platform is ${ARCH}"
|
||||
abort "! Unsupported platform ${ARCH}"
|
||||
else
|
||||
ui_print "- Device platform is ${ARCH}"
|
||||
if [[ "${ARCH}" == "x86" || "${ARCH}" == "x64" ]]; then
|
||||
|
|
@ -169,11 +165,9 @@ check_android_version() {
|
|||
}
|
||||
|
||||
check_persist() {
|
||||
for TARGET in ${PERSIST}; do
|
||||
if [[ -d ${TARGET} ]]; then
|
||||
NO_PERSIST=false
|
||||
fi
|
||||
done
|
||||
if [[ "$(cat /proc/mounts | grep /sbin/.magisk/mirror/persist)" == "" ]]; then
|
||||
NO_PERSIST=true
|
||||
fi
|
||||
}
|
||||
|
||||
ui_print "- EdXposed Version ${VERSION}"
|
||||
|
|
@ -184,7 +178,7 @@ check_riru_version
|
|||
check_architecture
|
||||
|
||||
ui_print "- Extracting module files"
|
||||
unzip -o "${ZIPFILE}" module.prop post-fs-data.sh sepolicy.rule system.prop uninstall.sh 'system/*' -d "${MODPATH}" >&2
|
||||
unzip -o "${ZIPFILE}" EdXposed.apk module.prop post-fs-data.sh sepolicy.rule system.prop uninstall.sh 'system/*' -d "${MODPATH}" >&2
|
||||
|
||||
if [[ "${ARCH}" == "x86" || "${ARCH}" == "x64" ]]; then
|
||||
ui_print "- Replacing x86 and x86_64 libraries"
|
||||
|
|
@ -201,6 +195,11 @@ if [[ "${IS64BIT}" == false ]]; then
|
|||
rm -rf "${MODPATH}/system/lib64"
|
||||
fi
|
||||
|
||||
if [[ ${BOOTMODE} == true && "$(pm path org.meowcat.edxposed.manager)" == "" ]]; then
|
||||
ui_print "- Installing stub apk"
|
||||
pm install ${MODPATH}/EdXposed.apk 2>&2
|
||||
fi
|
||||
|
||||
if [[ "${OLD_MAGISK}" == true ]]; then
|
||||
ui_print "- Removing SEPolicy rule for old Magisk"
|
||||
rm ${MODPATH}/sepolicy.rule
|
||||
|
|
|
|||
Loading…
Reference in New Issue