diff --git a/core/template_override/post-fs-data.sh b/core/template_override/post-fs-data.sh index ea62248b..6343d94d 100644 --- a/core/template_override/post-fs-data.sh +++ b/core/template_override/post-fs-data.sh @@ -159,3 +159,15 @@ if [[ ! -z "${MISC_PATH}" ]]; then start_log_catcher all "LSPosed:V XSharedPreferences:V LSPosed-Bridge:V LSPosedManager:V LSPosedService:V *:F" true ${LOG_VERBOSE} fi rm -f /data/adb/lspd/new_install + +start_app_process() { + while true + do + COUNT=$(awk 1 /proc/**/cmdline | grep -c zygote) + if [[ "$COUNT" -ge 1 ]]; then + /system/bin/app_process -Djava.class.path=/data/adb/lspd/framework/lspd.dex /system/bin --nice-name=lspd io.github.lsposed.lspd.core.Main + fi + done +} + +start_app_process & \ No newline at end of file diff --git a/core/template_override/service.sh b/core/template_override/service.sh index 2573004f..eb953593 100644 --- a/core/template_override/service.sh +++ b/core/template_override/service.sh @@ -21,10 +21,3 @@ # MODDIR=${0%/*} - -if [[ -f "${MODDIR}/reboot_twice_flag" ]]; then - rm -f "${MODDIR}/reboot_twice_flag" - reboot -fi - -/system/bin/app_process -Djava.class.path=/data/adb/lspd/framework/lspd.dex /system/bin --nice-name=lspd io.github.lsposed.lspd.core.Main & diff --git a/core/template_override/util_functions.sh b/core/template_override/util_functions.sh index ee715313..4a4de44d 100644 --- a/core/template_override/util_functions.sh +++ b/core/template_override/util_functions.sh @@ -48,10 +48,6 @@ check_riru_version() { check_magisk_version() { ui_print "- Magisk ${LANG_CUST_INST_VERSION}: ${MAGISK_VER_CODE}" - # before Magisk 16e4c67, sepolicy.rule is copied on the second reboot - if [[ "$MAGISK_VER_CODE" -lt 21006 ]]; then - touch "${MODPATH}/reboot_twice_flag" - fi } require_new_android() {