Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit efc70215 authored by Kenny Root's avatar Kenny Root Committed by Android Git Automerger
Browse files

am bb2cba56: Merge "Add encryption parameters to adb install" into jb-dev

* commit 'bb2cba56':
  Add encryption parameters to adb install
parents 03768b36 bb2cba56
Loading
Loading
Loading
Loading
+14 −2
Original line number Diff line number Diff line
@@ -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 {