Use android properties to pass capture options to the device

This commit is contained in:
baldurk
2018-02-14 19:22:23 +00:00
parent 468c6c1e80
commit 04fac1d6f8
8 changed files with 44 additions and 14 deletions
+5 -5
View File
@@ -1223,6 +1223,10 @@ public:
uint32_t ExecuteAndInject(const char *a, const char *w, const char *c,
const rdcarray<EnvironmentModification> &env, const CaptureOptions &opts)
{
std::string app = a && a[0] ? a : "";
std::string workingDir = w && w[0] ? w : "";
std::string cmdline = c && c[0] ? c : "";
const char *host = hostname().c_str();
if(Android::IsHostADB(host))
{
@@ -1235,7 +1239,7 @@ public:
ok = Ping();
});
uint32_t ret = Android::StartAndroidPackageForCapture(host, a);
uint32_t ret = Android::StartAndroidPackageForCapture(host, app.c_str(), opts);
Atomic::Inc32(&done);
@@ -1245,10 +1249,6 @@ public:
return ret;
}
std::string app = a && a[0] ? a : "";
std::string workingDir = w && w[0] ? w : "";
std::string cmdline = c && c[0] ? c : "";
{
WRITE_DATA_SCOPE();
SCOPED_SERIALISE_CHUNK(eRemoteServer_ExecuteAndInject);