diff --git a/edxp-core/build.gradle b/edxp-core/build.gradle index 6c79ecc99..d26abba72 100644 --- a/edxp-core/build.gradle +++ b/edxp-core/build.gradle @@ -208,7 +208,7 @@ afterEvaluate { task("push${backendCapped}${variantCapped}", type: Exec) { dependsOn zipTask workingDir "${projectDir}/release" - def commands = ["adb", "push", + def commands = [android.adbExecutable, "push", "${module_name}-${backend}-${project.version}-${variantLowered}.zip", "/data/local/tmp/"] if (is_windows) { @@ -220,7 +220,7 @@ afterEvaluate { task("flash${backendCapped}${variantCapped}", type: Exec) { dependsOn tasks.getByPath("push${backendCapped}${variantCapped}") workingDir "${projectDir}/release" - def commands = ["adb", "shell", "su", "-c", + def commands = [android.adbExecutable, "shell", "su", "-c", "magisk --install-module /data/local/tmp/${module_name}-${backend}-${project.version}-${variantLowered}.zip"] if (is_windows) { commandLine 'cmd', '/c', commands.join(" ") @@ -231,7 +231,7 @@ afterEvaluate { task("flashAndReboot${backendCapped}${variantCapped}", type: Exec) { dependsOn tasks.getByPath("flash${backendCapped}${variantCapped}") workingDir "${projectDir}/release" - def commands = ["adb", "shell", "reboot"] + def commands = [android.adbExecutable, "shell", "reboot"] if (is_windows) { commandLine 'cmd', '/c', commands.join(" ") } else { diff --git a/edxp-core/template_override/customize.sh b/edxp-core/template_override/customize.sh index 4de47bcfb..672da68f4 100644 --- a/edxp-core/template_override/customize.sh +++ b/edxp-core/template_override/customize.sh @@ -360,3 +360,11 @@ cp "${MODPATH}/module.prop" "${RIRU_TARGET}/module.prop" || abort "! Can't creat set_perm_recursive "${MODPATH}" 0 0 0755 0644 ui_print "- Welcome to EdXposed ${VERSION}!" + +# before Magisk 16e4c67, sepolicy.rule is copied on the second reboot +if [ "$MAGISK_VER_CODE" -lt 21006 ]; then + ui_print "*******************************" + ui_print "- Magisk version below 21006." + ui_print "- You have to manually reboot twice." + ui_print "*******************************" +fi \ No newline at end of file diff --git a/edxp-core/template_override/post-fs-data.sh b/edxp-core/template_override/post-fs-data.sh index 38ed15081..b0de91309 100644 --- a/edxp-core/template_override/post-fs-data.sh +++ b/edxp-core/template_override/post-fs-data.sh @@ -44,9 +44,8 @@ sepolicy() { # Should be deprecated now. This is for debug only. supolicy --live "allow system_server system_server process execmem" \ "allow system_server system_server memprotect mmap_zero" \ - "allow zygote app_data_file dir { search read open }" \ - "allow zygote app_data_file file { getattr read open }" \ - "allow zygote app_data_file dir { getattr search read open }" + "allow zygote app_data_file dir { getattr search read open }" \ + "allow zygote app_data_file file { getattr read open }" } #if [[ ${ANDROID_SDK} -ge 24 ]]; then diff --git a/edxp-core/template_override/sepolicy.rule b/edxp-core/template_override/sepolicy.rule index 27f00cd88..3a9f6385d 100644 --- a/edxp-core/template_override/sepolicy.rule +++ b/edxp-core/template_override/sepolicy.rule @@ -1,5 +1,4 @@ allow system_server system_server process execmem allow system_server system_server memprotect mmap_zero -allow zygote app_data_file dir { search read open } -allow zygote app_data_file file { getattr read open } -allow zygote app_data_file dir { getattr search read open } \ No newline at end of file +allow zygote app_data_file dir { getattr search read open } +allow zygote app_data_file file { getattr read open } \ No newline at end of file