Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ask users to reboot twice #672

Merged
merged 1 commit into from
Nov 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions edxp-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ afterEvaluate {
task("push${backendCapped}${variantCapped}", type: Exec) {
dependsOn zipTask
workingDir "${projectDir}/release"
def commands = ["adb", "push",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

夹 带 私 货

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

嘿嘿嘿

def commands = [android.adbExecutable, "push",
"${module_name}-${backend}-${project.version}-${variantLowered}.zip",
"/data/local/tmp/"]
if (is_windows) {
Expand All @@ -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(" ")
Expand All @@ -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 {
Expand Down
8 changes: 8 additions & 0 deletions edxp-core/template_override/customize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 2 additions & 3 deletions edxp-core/template_override/post-fs-data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions edxp-core/template_override/sepolicy.rule
Original file line number Diff line number Diff line change
@@ -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 }