diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-07-24 13:52:18 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-07-24 17:57:56 +0200 |
commit | f815e970464d733b39746384c8f3a96dd5f35d58 (patch) | |
tree | 85d7bf543f62253b0e01d3455966a7221a09e186 /app/src/main | |
parent | d5e2ccce6d829c7875a09df6677c0f85bc685c57 (diff) |
tools: pass in debug package name
Diffstat (limited to 'app/src/main')
-rw-r--r-- | app/src/main/java/com/wireguard/android/util/RootShell.java | 5 |
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) { |