소스 검색

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();
}



불러오는 중...
취소
저장