瀏覽代碼

ToolsInstaller: restrict to only main app usage

We don't want lots of different packages fighting over who gets to
install the tools.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
master
Jason A. Donenfeld 4 年之前
父節點
當前提交
fd573f6c1c
共有 1 個檔案被更改,包括 2 行新增0 行删除
  1. +2
    -0
      app/src/main/java/com/wireguard/android/util/ToolsInstaller.java

+ 2
- 0
app/src/main/java/com/wireguard/android/util/ToolsInstaller.java 查看文件

@@ -105,6 +105,8 @@ public final class ToolsInstaller {
}

public int install() throws RootShellException, IOException {
if (!context.getPackageName().startsWith("com.wireguard."))
throw new SecurityException("The tools may only be installed system-wide from the main WireGuard app.");
return willInstallAsMagiskModule() ? installMagisk() : installSystem();
}



Loading…
取消
儲存