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

Commit

Permalink
Minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
RikkaW committed Jul 27, 2021
1 parent 4247b82 commit 22ced44
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions rirud/src/main/java/riru/Installer.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,18 @@ private static void checkSELinux() {
return;
}

boolean exit = false;
if (SELinux.checkSELinuxAccess("u:r:init:s0", "u:object_r:system_file:s0", "file", "relabelfrom")) {
System.out.println("! Your ROM allows init to relabel Magisk module files");
System.out.println("- Riru will try to reset the context of modules files, but not guaranteed to always work");
exit = true;
}
boolean file = SELinux.checkSELinuxAccess("u:r:init:s0", "u:object_r:system_file:s0", "file", "relabelfrom");
boolean dir = SELinux.checkSELinuxAccess("u:r:init:s0", "u:object_r:system_file:s0", "dir", "relabelfrom");

if (SELinux.checkSELinuxAccess("u:r:init:s0", "u:object_r:system_file:s0", "dir", "relabelfrom")) {
System.out.println("! Your ROM allows init to relabel Magisk module files");
if (file || dir) {
System.out.println("!!!!!!!!! PLEASE READ !!!!!!!!!!");
if (file) {
System.out.println("! Your ROM allows init to relabel Magisk module files");
}
if (dir) {
System.out.println("! Your ROM allows init to relabel Magisk module files");
}
System.out.println("- Riru will try to reset the context of modules files, but not guaranteed to always work");
exit = true;
}

if (exit) {
System.exit(1);
} else {
System.out.println("- No problem found");
}
Expand Down

0 comments on commit 22ced44

Please sign in to comment.