forked from qt-creator/qt-creator
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: Daniel Teske <daniel.teske@theqtcompany.com>
This commit is contained in:
@@ -48,6 +48,7 @@
|
|||||||
#include <projectexplorer/projectexplorerconstants.h>
|
#include <projectexplorer/projectexplorerconstants.h>
|
||||||
#include <projectexplorer/project.h>
|
#include <projectexplorer/project.h>
|
||||||
#include <projectexplorer/target.h>
|
#include <projectexplorer/target.h>
|
||||||
|
#include <projectexplorer/toolchain.h>
|
||||||
|
|
||||||
#include <qtsupport/qtkitinformation.h>
|
#include <qtsupport/qtkitinformation.h>
|
||||||
|
|
||||||
@@ -201,6 +202,14 @@ bool AndroidDeployQtStep::init()
|
|||||||
|
|
||||||
m_avdName = info.avdname;
|
m_avdName = info.avdname;
|
||||||
m_serialNumber = info.serialNumber;
|
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);
|
AndroidManager::setDeviceSerialNumber(target(), m_serialNumber);
|
||||||
|
|
||||||
@@ -464,7 +473,7 @@ QString AndroidDeployQtStep::systemAppProcessFilePath() const
|
|||||||
QProcess proc;
|
QProcess proc;
|
||||||
const QStringList args =
|
const QStringList args =
|
||||||
QStringList() << AndroidDeviceInfo::adbSelector(m_serialNumber) << QLatin1String("shell")
|
QStringList() << AndroidDeviceInfo::adbSelector(m_serialNumber) << QLatin1String("shell")
|
||||||
<< QLatin1String("readlink -f -s /system/bin/app_process");
|
<< m_appProcess;
|
||||||
proc.start(m_adbPath, args);
|
proc.start(m_adbPath, args);
|
||||||
proc.waitForFinished();
|
proc.waitForFinished();
|
||||||
return QString::fromUtf8(proc.readAll()).trimmed();
|
return QString::fromUtf8(proc.readAll()).trimmed();
|
||||||
|
|||||||
@@ -127,6 +127,7 @@ private:
|
|||||||
QString m_buildDirectory;
|
QString m_buildDirectory;
|
||||||
QString m_avdName;
|
QString m_avdName;
|
||||||
QString m_apkPath;
|
QString m_apkPath;
|
||||||
|
QString m_appProcess;
|
||||||
|
|
||||||
QString m_targetArch;
|
QString m_targetArch;
|
||||||
bool m_uninstallPreviousPackage;
|
bool m_uninstallPreviousPackage;
|
||||||
|
|||||||
Reference in New Issue
Block a user