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