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>
This commit is contained in:
parent
1235e966d2
commit
fd573f6c1c
@ -105,6 +105,8 @@ public final class ToolsInstaller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int install() throws RootShellException, IOException {
|
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();
|
return willInstallAsMagiskModule() ? installMagisk() : installSystem();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user