Commit a88636bd authored by BogDan Vatra's avatar BogDan Vatra
Browse files

Make sure we pull the right app_process from device.



On arm64 devices /system/bin/app_process is a symlink to /system/bin/
app_process64, the problem is that we are pulling it also for 32bit
apps, which will make the debugging impossible because arm-linux-
androideabi-gdb 32bit can't mix the architectures.

Change-Id: I37e071456fb89051b0433ee2e7635085257616ea
Reviewed-by: default avatarDaniel Teske <daniel.teske@theqtcompany.com>
parent 6d67f942
......@@ -48,6 +48,7 @@
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/project.h>
#include <projectexplorer/target.h>
#include <projectexplorer/toolchain.h>
#include <qtsupport/qtkitinformation.h>
......@@ -201,6 +202,14 @@ bool AndroidDeployQtStep::init()
m_avdName = info.avdname;
m_serialNumber = info.serialNumber;
m_appProcess = QLatin1String("readlink -f -s /system/bin/app_process");
if (info.cpuAbi.contains(QLatin1String("arm64-v8a"))) {
ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(target()->kit());
if (tc && tc->targetAbi().wordWidth() == 64)
m_appProcess += QLatin1String("64");
else
m_appProcess += QLatin1String("32");
}
AndroidManager::setDeviceSerialNumber(target(), m_serialNumber);
......@@ -464,7 +473,7 @@ QString AndroidDeployQtStep::systemAppProcessFilePath() const
QProcess proc;
const QStringList args =
QStringList() << AndroidDeviceInfo::adbSelector(m_serialNumber) << QLatin1String("shell")
<< QLatin1String("readlink -f -s /system/bin/app_process");
<< m_appProcess;
proc.start(m_adbPath, args);
proc.waitForFinished();
return QString::fromUtf8(proc.readAll()).trimmed();
......
......@@ -127,6 +127,7 @@ private:
QString m_buildDirectory;
QString m_avdName;
QString m_apkPath;
QString m_appProcess;
QString m_targetArch;
bool m_uninstallPreviousPackage;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment