summaryrefslogtreecommitdiff
path: root/adb/client/adb_install.cpp
diff options
context:
space:
mode:
authorHenry Daitx <daitx@google.com>2018-12-12 10:40:57 +0000
committerHenry Daitx <daitx@google.com>2018-12-14 15:25:15 +0000
commitee01c80afe54ece71e2da5eb86de1e7c655488f6 (patch)
treedc9fa7fd784815ddfb2d1af9d517910c098cc86b /adb/client/adb_install.cpp
parent73d03dc8047edd1b3a39ebff6770826deec6c956 (diff)
Change --fastdeploy behaviour
--fastdeploy does not require -r anymore, and reverts to a normal install if the application is not already on the device. Bug: 120828611 Test: mm -j72 Test: adb install --fastdeploy --force-agent --local-agent /mnt/raid/boat-attack-apk/boat-attack-swappy.apk Change-Id: Ice2a71493a34ee7d0debabcce6a9aebb0af79e62
Diffstat (limited to 'adb/client/adb_install.cpp')
-rw-r--r--adb/client/adb_install.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/adb/client/adb_install.cpp b/adb/client/adb_install.cpp
index 7f37c454b..b62ef6a8b 100644
--- a/adb/client/adb_install.cpp
+++ b/adb/client/adb_install.cpp
@@ -341,11 +341,6 @@ int install_app(int argc, const char** argv) {
error_exit("Attempting to use streaming install on unsupported device");
}
- if (use_fastdeploy == true && is_reinstall == false) {
- printf("Fast Deploy is only available with -r.\n");
- use_fastdeploy = false;
- }
-
if (use_fastdeploy == true && get_device_api_level() < kFastDeployMinApi) {
printf("Fast Deploy is only compatible with devices of API version %d or higher, "
"ignoring.\n",
@@ -360,10 +355,17 @@ int install_app(int argc, const char** argv) {
passthrough_argv.push_back(argv[i]);
}
}
+ if (passthrough_argv.size() < 2) {
+ error_exit("install requires an apk argument");
+ }
if (use_fastdeploy == true) {
fastdeploy_set_local_agent(use_localagent);
update_agent(agent_update_strategy);
+
+ // The last argument must be the APK file
+ const char* file = passthrough_argv.back();
+ use_fastdeploy = find_package(file);
}
switch (installMode) {