def GetTargetAndroidVersionNumber(lines):
  """Return the Android major version number from the build fingerprint.

  Args:
    lines: Lines read from the tombstone file, before preprocessing.
  Returns:
    5, 6, etc, or None if not determinable (developer build?)
  """
  # For example, "Build fingerprint: 'Android/aosp_flo/flo:5.1.1/...'" is 5.
  for line in lines:
    if line.startswith('Build fingerprint: '):
      fingerprint = line.split()[2]
      version = fingerprint.split('/')[2].split(':')[1].split('.')[0]
      try:
        return int(version)
      except ValueError:
        return None
  return None