tools/android/native_lib_memory/extract_resident_pages.py
def _ReadFileFromDevice(device_serial, file_path):
  """Reads the file from the device, and returns its content.

  Args:
    device_serial: (str) Device identifier
    file_path: (str) On-device path to the residency file.

  Returns:
    (str or None) The file content.
  """
  content = None
  try:
    device = device_utils.DeviceUtils(device_serial)
    content = device.ReadFile(file_path, True)
  except device_errors.CommandFailedError:
    logging.exception(
        'Possible failure reaching the device or reading the file')

  return content
Reads the file from the device, and returns its content.

  Args:
    device_serial: (str) Device identifier
    file_path: (str) On-device path to the residency file.

  Returns:
    (str or None) The file content.
  
Reads the file from the device, and returns its content.
Reads the file from the device and returns its content .
def _ReadFileFromDevice(device_serial, file_path):
  content = None
  try:
    device = device_utils.DeviceUtils(device_serial)
    content = device.ReadFile(file_path, True)
  except device_errors.CommandFailedError:
    logging.exception(
        'Possible failure reaching the device or reading the file')
  return content
def _ReadFileFromDevice ( device_serial , file_path ) : content = None try : device = device_utils . DeviceUtils ( device_serial ) content = device . ReadFile ( file_path , True ) except device_errors . CommandFailedError : logging . exception ( 'Possible failure reaching the device or reading the file' ) return content
Reads the file from the device, and returns its content.
Reads the file from the device and returns its content .
"""Reads the file from the device, and returns its content.

  Args:
    device_serial: (str) Device identifier
    file_path: (str) On-device path to the residency file.

  Returns:
    (str or None) The file content.
  """
(str or None) The file content.
( str or None ) The file content .
device_serial
(str) Device identifier
( str ) Device identifier
file_path
(str) On-device path to the residency file.
( str ) On - device path to the residency file .