Ask users to reboot twice

This commit is contained in:
LoveSy 2020-11-27 19:00:11 +08:00 committed by 双草酸酯
parent f878993d48
commit 35a18e8992
4 changed files with 15 additions and 9 deletions

View File

@ -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 {

View File

@ -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

View File

@ -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

View File

@ -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 }
allow zygote app_data_file dir { getattr search read open }
allow zygote app_data_file file { getattr read open }