Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Commit

Permalink
Tell users about reboot twice
Browse files Browse the repository at this point in the history
  • Loading branch information
RikkaW committed Nov 9, 2020
1 parent 3cecdcd commit d4fdb20
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ Android 6.0+ devices rooted with [Magisk](https://github.com/topjohnwu/Magisk)
1. Download the zip from [GitHub release](https://github.com/RikkaApps/Riru/releases)
2. Install in Magisk Manager (Modules - Install from storage - Select downloaded zip)

**Before Magisk canary 21006, the first installation requires manual restart twice.**

### Config

* When the file `/data/adb/riru/disable` exists, Riru will do nothing
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/java/moe/riru/manager/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ class MainActivity : AppActivity() {
val devRandomFile = SuFile.open("/data/adb/riru/dev_random")
val devRandom = devRandomFile.readTextOrNull()
if (devRandom == null) {
message.append("Riru not installed (or version < v22).")
message.append("Riru not installed (or version < v22).\n\n")
message.append("Before Magisk canary 21006, you will have to reboot twice to finish the first installation.")
detail.append("$devRandomFile not exist")
return
}
Expand Down
8 changes: 8 additions & 0 deletions template/magisk_module/customize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,11 @@ set_perm "$RIRU_PATH/api_version.new" 0 0 0600 $SECONTEXT

ui_print "- Setting permissions"
set_perm_recursive "$MODPATH" 0 0 0755 0644

# 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 for the first installation."
ui_print "*******************************"
fi

0 comments on commit d4fdb20

Please sign in to comment.