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

Commit 22ced44

Browse files
committed
Minor change
1 parent 4247b82 commit 22ced44

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

rirud/src/main/java/riru/Installer.java

+10-13
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,18 @@ private static void checkSELinux() {
2020
return;
2121
}
2222

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

30-
if (SELinux.checkSELinuxAccess("u:r:init:s0", "u:object_r:system_file:s0", "dir", "relabelfrom")) {
31-
System.out.println("! Your ROM allows init to relabel Magisk module files");
26+
if (file || dir) {
27+
System.out.println("!!!!!!!!! PLEASE READ !!!!!!!!!!");
28+
if (file) {
29+
System.out.println("! Your ROM allows init to relabel Magisk module files");
30+
}
31+
if (dir) {
32+
System.out.println("! Your ROM allows init to relabel Magisk module files");
33+
}
3234
System.out.println("- Riru will try to reset the context of modules files, but not guaranteed to always work");
33-
exit = true;
34-
}
35-
36-
if (exit) {
37-
System.exit(1);
3835
} else {
3936
System.out.println("- No problem found");
4037
}

0 commit comments

Comments
 (0)