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

Commit

Permalink
Warning if context incorrect
Browse files Browse the repository at this point in the history
  • Loading branch information
yujincheng08 committed Sep 4, 2021
1 parent 914d727 commit 59dadd5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
6 changes: 5 additions & 1 deletion rirud/src/main/java/riru/Daemon.java
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,11 @@ private void onRiruLoad() {
}
}

DaemonUtils.writeStatus(R.string.loaded, loadedModules.length, sb);
if (DaemonUtils.hasIncorrectFileContext()) {
DaemonUtils.writeStatus(R.string.bad_file_context_loaded, loadedModules.length, sb);
} else {
DaemonUtils.writeStatus(R.string.loaded, loadedModules.length, sb);
}
}

private void startWait(boolean isFirst) {
Expand Down
1 change: 1 addition & 0 deletions rirud/src/main/res/values-zh-rCN/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@
<string name="loaded">\uD83D\uDE0B Riru 正常工作中。已载入 %1$d 个模块 %2$s。</string>
<string name="bad_file_context">\u26A0\uFE0F Riru 和模块文件的 SELinux 上下文不正确。Riru 已尝试重设它们,但您看到了该提示意味着重设没有起作用。这可能是由于您的 ROM 有不正确的 SELinux 规则。请参阅 Riru 在 GitHub 上的 wiki 以了解更多。</string>
<string name="empty">无</string>
<string name="bad_file_context_loaded">\\u26A0\\uFE0F Riru 和模块文件的 SELinux 上下文不正确。Riru 已尝试重设它们,但模块仍可能不能正常工作。这可能是由于您的 ROM 有不正确的 SELinux 规则。请参阅 Riru 在 GitHub 上的 wiki 以了解更多。已载入 %1$d 个模块 %2$s。</string>
</resources>
1 change: 1 addition & 0 deletions rirud/src/main/res/values-zh-rTW/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@
<string name="loaded">\uD83D\uDE0B Riru 正常工作中。已載入 %1$d 個模組 %2$s。</string>
<string name="bad_file_context">\u26A0\uFE0F Riru 和模組檔案的 SELinux 上下文不正確。Riru 已嘗試重設它們,但您看到了該提示意味著重設沒有起作用。這可能是由於您的 ROM 有不正確的 SELinux 規則。請參閱 Riru 在 GitHub 上的 wiki 以瞭解更多。</string>
<string name="empty">無</string>
<string name="bad_file_context_loaded">\\u26A0\\uFE0F Riru 和模組檔案的 SELinux 上下文不正確。Riru 已嘗試重設它們,但模組仍可能不能正常運作。這可能是由於您的 ROM 有不正確的 SELinux 規則。請參閱 Riru 在 GitHub 上的 wiki 以瞭解更多。已載入 %1$d 個模組 %2$s。</string>
</resources>
1 change: 1 addition & 0 deletions rirud/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
<string name="not_loaded">\u26A0\uFE0F Riru is not loaded and the reason in unknown.</string>
<string name="loaded">\uD83D\uDE0B Riru is working normally. Loaded %1$d modules, %2$s.</string>
<string name="bad_file_context">\u26A0\uFE0F SELinux context for Riru and modules files are incorrect. Riru has tried to reset them, but you see this prompt means the reset did not work. This is may because your ROM have incorrect SELinux rules. See Riru wiki at GitHub for more.</string>
<string name="bad_file_context_loaded">\u26A0\uFE0F SELinux context for Riru and modules files are incorrect. Riru has tried to reset them, but modules may not work properly. This is may because your ROM have incorrect SELinux rules. See Riru wiki at GitHub for more. Loaded %1$d modules, %2$s.</string>
<string name="empty">none</string>
</resources>

0 comments on commit 59dadd5

Please sign in to comment.