summaryrefslogtreecommitdiffhomepage
path: root/app/src/main/java/com
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-07-24 13:52:18 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-07-24 17:57:56 +0200
commit284e42647c375894fa0baf17080680a8545be7a6 (patch)
tree85d7bf543f62253b0e01d3455966a7221a09e186 /app/src/main/java/com
parent3a16c088210733e07ffe6e1b2cc966ddae3fb19b (diff)
tools: pass in debug package name
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'app/src/main/java/com')
-rw-r--r--app/src/main/java/com/wireguard/android/util/RootShell.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/src/main/java/com/wireguard/android/util/RootShell.java b/app/src/main/java/com/wireguard/android/util/RootShell.java
index 18e04102..9216d475 100644
--- a/app/src/main/java/com/wireguard/android/util/RootShell.java
+++ b/app/src/main/java/com/wireguard/android/util/RootShell.java
@@ -10,6 +10,7 @@ import android.content.Context;
import android.support.annotation.Nullable;
import android.util.Log;
+import com.wireguard.android.BuildConfig;
import com.wireguard.android.R;
import java.io.BufferedReader;
@@ -45,8 +46,8 @@ public class RootShell {
final File cacheDir = context.getCacheDir();
localBinaryDir = new File(cacheDir, "bin");
localTemporaryDir = new File(cacheDir, "tmp");
- preamble = String.format("export CALLING_PACKAGE=com.wireguard.android PATH=\"%s:$PATH\" TMPDIR='%s'; id -u\n",
- localBinaryDir, localTemporaryDir);
+ preamble = String.format("export CALLING_PACKAGE=%s PATH=\"%s:$PATH\" TMPDIR='%s'; id -u\n",
+ BuildConfig.APPLICATION_ID, localBinaryDir, localTemporaryDir);
}
private static boolean isExecutableInPath(final String name) {