From 284e42647c375894fa0baf17080680a8545be7a6 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Tue, 24 Jul 2018 13:52:18 +0200 Subject: tools: pass in debug package name Signed-off-by: Jason A. Donenfeld --- app/src/main/java/com/wireguard/android/util/RootShell.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'app/src/main') 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) { -- cgit v1.2.3