code: function buildInstallArgs (apiLevel, options = {}) {
    const result = [];
  
    if (!util.hasValue(options.replace) || options.replace) {
      result.push('-r');
    }
    if (options.allowTestPackages) {
      result.push('-t');
    }
    if (options.useSdcard) {
      result.push('-s');
    }
    if (options.grantPermissions) {
      if (apiLevel < 23) {
        log.debug(`Skipping permissions grant option, since ` +
                  `the current API level ${apiLevel} does not support applications ` +
                  `permissions customization`);
      } else {
        result.push('-g');
      }
    }
  
    return result;
  }
docs: @typedef {Object} InstallOptions
  @property {boolean} allowTestPackages [false] - Set to true in order to allow test
  packages installation.
  @property {boolean} useSdcard [false] - Set to true to install the app on sdcard
  instead of the device memory.
  @property {boolean} grantPermissions [false] - Set to true in order to grant all the
  permissions requested in the application's manifest
  automatically after the installation is completed
  under Android 6+.
  @property {boolean} replace [true] - Set it to false if you don't want
  the application to be upgraded/reinstalled
  if it is already present on the device.
   
  Transforms given options into the list of `adb install.install-multiple` command arguments
  
  @param {number} apiLevel - The current API level
  @param {?InstallOptions} options - The options mapping to transform
  @returns {Array<String>} The array of arguments