aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chimpchat/src/com/android/chimpchat/adb/AdbBackend.java13
1 files changed, 6 insertions, 7 deletions
diff --git a/chimpchat/src/com/android/chimpchat/adb/AdbBackend.java b/chimpchat/src/com/android/chimpchat/adb/AdbBackend.java
index 9354737..68e17dc 100644
--- a/chimpchat/src/com/android/chimpchat/adb/AdbBackend.java
+++ b/chimpchat/src/com/android/chimpchat/adb/AdbBackend.java
@@ -17,10 +17,10 @@ package com.android.chimpchat.adb;
import com.google.common.collect.Lists;
-import com.android.ddmlib.AndroidDebugBridge;
-import com.android.ddmlib.IDevice;
import com.android.chimpchat.core.IChimpBackend;
import com.android.chimpchat.core.IChimpDevice;
+import com.android.ddmlib.AndroidDebugBridge;
+import com.android.ddmlib.IDevice;
import com.android.sdklib.SdkConstants;
import java.io.File;
@@ -56,9 +56,9 @@ public class AdbBackend implements IChimpBackend {
}
private String findAdb() {
- File location =
- new File(AdbBackend.class.getProtectionDomain().getCodeSource().getLocation().getPath());
- String mrParentLocation = new File(location.getParent()).getParent();
+ String mrParentLocation =
+ System.getProperty("com.android.monkeyrunner.bindir"); //$NON-NLS-1$
+
// in the new SDK, adb is in the platform-tools, but when run from the command line
// in the Android source tree, then adb is next to monkeyrunner.
@@ -70,8 +70,7 @@ public class AdbBackend implements IChimpBackend {
return platformTools.getAbsolutePath() + File.separator + SdkConstants.FN_ADB;
}
- return mrParentLocation + File.separator + SdkConstants.FD_OUTPUT +
- File.separator + SdkConstants.FN_ADB;
+ return mrParentLocation + File.separator + SdkConstants.FN_ADB;
}
return SdkConstants.FN_ADB;