diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-03-09 01:36:01 +0800 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-03-09 01:36:01 +0800 |
commit | 840c7ea560020111dd3e89aa3d976229104974be (patch) | |
tree | 0801b0002847dec6cfd9a5bd07b371599e3f2d18 /app/src/main/java/com/wireguard/android/util/ModuleLoader.java | |
parent | ModuleDownloaderPreference: properly use errormessages (diff) | |
download | wireguard-android-840c7ea560020111dd3e89aa3d976229104974be.tar.xz wireguard-android-840c7ea560020111dd3e89aa3d976229104974be.zip |
RootShell: properly use errormessages
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'app/src/main/java/com/wireguard/android/util/ModuleLoader.java')
-rw-r--r-- | app/src/main/java/com/wireguard/android/util/ModuleLoader.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/src/main/java/com/wireguard/android/util/ModuleLoader.java b/app/src/main/java/com/wireguard/android/util/ModuleLoader.java index 7794dd5c..7c943d26 100644 --- a/app/src/main/java/com/wireguard/android/util/ModuleLoader.java +++ b/app/src/main/java/com/wireguard/android/util/ModuleLoader.java @@ -10,7 +10,7 @@ import android.system.OsConstants; import android.util.Base64; import com.wireguard.android.Application; -import com.wireguard.android.util.RootShell.NoRootException; +import com.wireguard.android.util.RootShell.RootShellException; import net.i2p.crypto.eddsa.EdDSAEngine; import net.i2p.crypto.eddsa.EdDSAPublicKey; @@ -55,7 +55,7 @@ public class ModuleLoader { return moduleDir.exists() && moduleDir.isDirectory(); } - public void loadModule() throws IOException, NoRootException { + public void loadModule() throws IOException, RootShellException { Application.getRootShell().run(null, String.format("insmod \"%s/wireguard-$(sha256sum /proc/version|cut -d ' ' -f 1).ko\"", moduleDir.getAbsolutePath())); } @@ -122,7 +122,7 @@ public class ModuleLoader { return hashes; } - public Integer download() throws IOException, NoRootException, NoSuchAlgorithmException { + public Integer download() throws IOException, RootShellException, NoSuchAlgorithmException { final List<String> output = new ArrayList<>(); Application.getRootShell().run(output, "sha256sum /proc/version|cut -d ' ' -f 1"); if (output.size() != 1 || output.get(0).length() != 64) |