parameters: (self, adb, tool)
docstring: Initializes the device_forwarder daemon for a specific device (once).
  
      Note that the global lock must be acquired before calling this method. This
      method kills any existing device_forwarder daemon on the device that could
      be stale, pushes the latest version of the daemon (to the device) and starts
      it.
  
      Args:
        adb: An AndroidCommands instance.
        tool: Tool class to use to get wrapper, if necessary, for executing the
              forwarder (see valgrind_tools.py).
docstring_summary: Initializes the device_forwarder daemon for a specific device (once).
docstring_tokens: Initializes the device_forwarder daemon for a specific device ( once ) .
function: def _InitDeviceLocked(self, adb, tool):
      """Initializes the device_forwarder daemon for a specific device (once).
  
      Note that the global lock must be acquired before calling this method. This
      method kills any existing device_forwarder daemon on the device that could
      be stale, pushes the latest version of the daemon (to the device) and starts
      it.
  
      Args:
        adb: An AndroidCommands instance.
        tool: Tool class to use to get wrapper, if necessary, for executing the
              forwarder (see valgrind_tools.py).
      """
      device_serial = adb.Adb().GetSerialNumber()
      if device_serial in self._initialized_devices:
        return
      Forwarder._KillDeviceLocked(adb, tool)
      adb.PushIfNeeded(
          self._device_forwarder_path_on_host,
          Forwarder._DEVICE_FORWARDER_FOLDER)
      (exit_code, output) = adb.GetShellCommandStatusAndOutput(
          '%s %s %s' % (Forwarder._LD_LIBRARY_PATH, tool.GetUtilWrapper(),
                        Forwarder._DEVICE_FORWARDER_PATH))
      if exit_code != 0:
        raise Exception(
            'Failed to start device forwarder:\n%s' % '\n'.join(output))
      self._initialized_devices.add(device_serial)
function_tokens: def _InitDeviceLocked ( self , adb , tool ) : device_serial = adb . Adb ( ) . GetSerialNumber ( ) if device_serial in self . _initialized_devices : return Forwarder . _KillDeviceLocked ( adb , tool ) adb . PushIfNeeded ( self . _device_forwarder_path_on_host , Forwarder . _DEVICE_FORWARDER_FOLDER ) ( exit_code , output ) = adb . GetShellCommandStatusAndOutput ( '%s %s %s' % ( Forwarder . _LD_LIBRARY_PATH , tool . GetUtilWrapper ( ) , Forwarder . _DEVICE_FORWARDER_PATH ) ) if exit_code != 0 : raise Exception ( 'Failed to start device forwarder:\n%s' % '\n' . join ( output ) ) self . _initialized_devices . add ( device_serial )