Android: Parse APK to find package name and other information

Task-number: QDS-16
Change-Id: I228af0711fb2dd64ff96dcb5fc9bc634b556ffd9
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
Vikas Pachdha
2018-07-03 11:53:25 +02:00
parent f19a6e8ac2
commit 42754374b0
4 changed files with 89 additions and 1 deletions

View File

@@ -29,6 +29,7 @@
#include <QPair>
#include <QObject>
#include <QVersionNumber>
namespace ProjectExplorer {
class Kit;
@@ -48,7 +49,12 @@ class ANDROID_EXPORT AndroidManager : public QObject
public:
static QString packageName(ProjectExplorer::Target *target);
static QString packageName(const Utils::FileName &manifestFile);
static bool packageInstalled(const QString &deviceSerial,
const QString &packageName);
static void apkInfo(const Utils::FileName &apkPath,
QString *packageName = nullptr,
QVersionNumber *version = nullptr,
QString *activityPath = nullptr);
static QString intentName(ProjectExplorer::Target *target);
static QString activityName(ProjectExplorer::Target *target);
@@ -90,6 +96,7 @@ public:
static void runAdbCommandDetached(const QStringList &args);
static bool runAdbCommand(const QStringList &args, QString *output = nullptr);
static bool runAaptCommand(const QStringList &args, QString *output = nullptr);
};
} // namespace Android