code: def ensure_opened(self, timeout):
      
      self._handle_message(self.adb_connection.read_for_stream(self, timeout),
                           handle_wrte=False)
      return self.is_open()
docs: Ensure this stream transport was successfully opened.
  
      Checks to make sure we receive our initial OKAY message.  This must be
      called after creating this AdbStreamTransport and before calling read() or
      write().
  
      Args:
        timeout: timeouts.PolledTimeout to use for this operation.
  
      Returns:
        True if this stream was successfully opened, False if the service was
      not recognized by the remote endpoint.  If False is returned, then this
      AdbStreamTransport will be already closed.
  
      Raises:
        AdbProtocolError: If we receive a WRTE message instead of OKAY/CLSE.