summaryrefslogtreecommitdiff
path: root/adb/client/adb_install.cpp
diff options
context:
space:
mode:
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) {