parameters: (self, apk_path, forward_lock=False, allow_downgrade=False,
                reinstall=False, sd_card=False, timeout=60 * 2,
                retries=DEFAULT_RETRIES)
docstring: Install an apk on the device.
  
      Args:
        apk_path: Host path to the APK file.
        forward_lock: (optional) If set forward-locks the app.
        allow_downgrade: (optional) If set, allows for downgrades.
        reinstall: (optional) If set reinstalls the app, keeping its data.
        sd_card: (optional) If set installs on the SD card.
        timeout: (optional) Timeout per try in seconds.
        retries: (optional) Number of retries to attempt.
docstring_summary: Install an apk on the device.
docstring_tokens: Install an apk on the device .
function: def Install(self, apk_path, forward_lock=False, allow_downgrade=False,
                reinstall=False, sd_card=False, timeout=60 * 2,
                retries=DEFAULT_RETRIES):
      """Install an apk on the device.
  
      Args:
        apk_path: Host path to the APK file.
        forward_lock: (optional) If set forward-locks the app.
        allow_downgrade: (optional) If set, allows for downgrades.
        reinstall: (optional) If set reinstalls the app, keeping its data.
        sd_card: (optional) If set installs on the SD card.
        timeout: (optional) Timeout per try in seconds.
        retries: (optional) Number of retries to attempt.
      """
      VerifyLocalFileExists(apk_path)
      cmd = ['install']
      if forward_lock:
        cmd.append('-l')
      if reinstall:
        cmd.append('-r')
      if sd_card:
        cmd.append('-s')
      if allow_downgrade:
        cmd.append('-d')
      cmd.append(apk_path)
      output = self._RunDeviceAdbCmd(cmd, timeout, retries)
      if 'Success' not in output:
        raise device_errors.AdbCommandFailedError(
            cmd, output, device_serial=self._device_serial)
function_tokens: def Install ( self , apk_path , forward_lock = False , allow_downgrade = False , reinstall = False , sd_card = False , timeout = 60 * 2 , retries = DEFAULT_RETRIES ) : VerifyLocalFileExists ( apk_path ) cmd = [ 'install' ] if forward_lock : cmd . append ( '-l' ) if reinstall : cmd . append ( '-r' ) if sd_card : cmd . append ( '-s' ) if allow_downgrade : cmd . append ( '-d' ) cmd . append ( apk_path ) output = self . _RunDeviceAdbCmd ( cmd , timeout , retries ) if 'Success' not in output : raise device_errors . AdbCommandFailedError ( cmd , output , device_serial = self . _device_serial )