aboutsummaryrefslogtreecommitdiffstats
path: root/Plugins/DbAndroid/adbmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Plugins/DbAndroid/adbmanager.cpp')
-rw-r--r--Plugins/DbAndroid/adbmanager.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/Plugins/DbAndroid/adbmanager.cpp b/Plugins/DbAndroid/adbmanager.cpp
index 462e91f..bbcf8fc 100644
--- a/Plugins/DbAndroid/adbmanager.cpp
+++ b/Plugins/DbAndroid/adbmanager.cpp
@@ -135,12 +135,19 @@ QString AdbManager::findAdb()
}
#endif
+ QString fullPath;
+ for (const QString& path : candidates)
+ {
+ fullPath = QDir::cleanPath(path);
+ if (testAdb(fullPath, true))
+ return fullPath;
+ }
+
#ifdef Q_OS_WIN32
if (testAdb("adb.exe", true))
return "adb.exe";
static_qstring(winAdbPath, "/../Android/sdk/platform-tools/adb.exe");
- QString fullPath;
for (const QString& path : QStandardPaths::standardLocations(QStandardPaths::AppLocalDataLocation))
{
fullPath = QDir::cleanPath(path + winAdbPath);
@@ -286,6 +293,7 @@ bool AdbManager::execLongCommand(const QStringList& arguments, QProcess& proc, Q
// Take off initial arguments from ADB, store it to use with "push".
QStringList primaryArguments;
QStringList args = arguments;
+
while (args.first() != "shell")
primaryArguments << args.takeFirst();