diff options
-rw-r--r-- | adb/commandline.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/adb/commandline.c b/adb/commandline.c index 7af8163..47c9bec 100644 --- a/adb/commandline.c +++ b/adb/commandline.c @@ -120,10 +120,12 @@ void help() " dev:<character device name>\n" " jdwp:<process pid> (remote only)\n" " adb jdwp - list PIDs of processes hosting a JDWP transport\n" - " adb install [-l] [-r] [-s] <file> - push this package file to the device and install it\n" + " adb install [-l] [-r] [-s] [--algo <algorithm name> --key <hex-encoded key> --iv <hex-encoded iv>] <file>\n" + " - push this package file to the device and install it\n" " ('-l' means forward-lock the app)\n" " ('-r' means reinstall the app, keeping its data)\n" " ('-s' means install on SD card instead of internal storage)\n" + " ('--algo', '--key', and '--iv' mean the file is encrypted already)\n" " adb uninstall [-k] <package> - remove this app package from the device\n" " ('-k' means keep the data and cache directories)\n" " adb bugreport - return all information from the device\n" @@ -1532,6 +1534,7 @@ int install_app(transport_type transport, char* serial, int argc, char** argv) int file_arg = -1; int err; int i; + int verify_apk = 1; for (i = 1; i < argc; i++) { if (*argv[i] != '-') { @@ -1542,6 +1545,15 @@ int install_app(transport_type transport, char* serial, int argc, char** argv) i++; } else if (!strcmp(argv[i], "-s")) { where = SD_DEST; + } else if (!strcmp(argv[i], "--algo")) { + verify_apk = 0; + i++; + } else if (!strcmp(argv[i], "--iv")) { + verify_apk = 0; + i++; + } else if (!strcmp(argv[i], "--key")) { + verify_apk = 0; + i++; } } @@ -1573,7 +1585,7 @@ int install_app(transport_type transport, char* serial, int argc, char** argv) } } - err = do_sync_push(apk_file, apk_dest, 1 /* verify APK */); + err = do_sync_push(apk_file, apk_dest, verify_apk); if (err) { goto cleanup_apk; } else { |