diff --git a/src/plugins/android/androiddeployqtstep.cpp b/src/plugins/android/androiddeployqtstep.cpp index 770f9566f3900b13526aa1af511316c9f352b01f..dd5ae88be2fa625228b3c16e4291bb58712d9168 100644 --- a/src/plugins/android/androiddeployqtstep.cpp +++ b/src/plugins/android/androiddeployqtstep.cpp @@ -203,12 +203,16 @@ bool AndroidDeployQtStep::init() m_avdName = info.avdname; m_serialNumber = info.serialNumber; m_appProcess = QLatin1String("readlink -f /system/bin/app_process"); - if (info.cpuAbi.contains(QLatin1String("arm64-v8a"))) { + m_libdir = QLatin1String("lib"); + if (info.cpuAbi.contains(QLatin1String("arm64-v8a")) || + info.cpuAbi.contains(QLatin1String("x86_64"))) { ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(target()->kit()); - if (tc && tc->targetAbi().wordWidth() == 64) + if (tc && tc->targetAbi().wordWidth() == 64) { m_appProcess += QLatin1String("64"); - else + m_libdir += QLatin1String("64"); + } else { m_appProcess += QLatin1String("32"); + } } AndroidManager::setDeviceSerialNumber(target(), m_serialNumber); @@ -436,9 +440,10 @@ void AndroidDeployQtStep::run(QFutureInterface<bool> &fi) emit addOutput(tr("Package deploy: Failed to pull \"%1\" to \"%2\".") .arg(remoteAppProcessFile).arg(localAppProcessFile), ErrorMessageOutput); } + runCommand(m_adbPath, AndroidDeviceInfo::adbSelector(m_serialNumber) << QLatin1String("pull") - << QLatin1String("/system/lib/libc.so") + << QLatin1String("/system/") + m_libdir + QLatin1String("/libc.so") << QString::fromLatin1("%1/libc.so").arg(m_buildDirectory)); fi.reportResult(returnValue == Success ? true : false); diff --git a/src/plugins/android/androiddeployqtstep.h b/src/plugins/android/androiddeployqtstep.h index 5dbd493f40c8d20f9ee609a3b86e0e5cc65a83dd..4dea717671b6e0d33928d7c00c1a1d7c61e48c3c 100644 --- a/src/plugins/android/androiddeployqtstep.h +++ b/src/plugins/android/androiddeployqtstep.h @@ -128,6 +128,7 @@ private: QString m_avdName; QString m_apkPath; QString m_appProcess; + QString m_libdir; QString m_targetArch; bool m_uninstallPreviousPackage;