From d9aa870e5d509cc7309ab82dd102a937ab58613a Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Thu, 9 Feb 2017 04:36:04 -0500 Subject: Imported Upstream version 3.1.1+dfsg1 --- Plugins/DbAndroid/adbmanager.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'Plugins/DbAndroid/adbmanager.cpp') 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(); -- cgit v1.2.3