code: def _ps(self, search=''):
          
          if not self.available:
              return
          result = []
          ps = self.adb_streaming_shell('ps')
          try:
              for bad_line in ps:
                  # The splitting of the StreamingShell doesn't always work
                  # this is to ensure that we get only one line
                  for line in bad_line.splitlines():
                      if search in line:
                          result.append(line.strip().rsplit(' ', 1)[-1])
              return result
          except InvalidChecksumError as e:
              print(e)
              self.connect()
              raise IOError
docs: Perform a ps command with optional filtering.
  
          :param search: Check for this substring.
          :returns: List of matching fields