tools/cr/cr/actions/adb.py
def Kill(cls, target, _):
    """Kill all running processes for a target."""
    target_name = target.build_target
    if target_name in cls._kills:
      # already killed this target, do nothing
      return
    pids = cls.GetPids(target)
    if pids:
      with target:
        cr.Host.Execute('{CR_ADB}', 'shell', 'kill', *pids)
    elif target.verbose:
      print(target.Substitute('{CR_TARGET_NAME} not running'))
    cls._kills[target_name] = True
Kill all running processes for a target.
Kill all running processes for a target.
Kill all running processes for a target .
def Kill(cls, target, _):
    target_name = target.build_target
    if target_name in cls._kills:
      return
    pids = cls.GetPids(target)
    if pids:
      with target:
        cr.Host.Execute('{CR_ADB}', 'shell', 'kill', *pids)
    elif target.verbose:
      print(target.Substitute('{CR_TARGET_NAME} not running'))
    cls._kills[target_name] = True
def Kill ( cls , target , _ ) : target_name = target . build_target if target_name in cls . _kills : return pids = cls . GetPids ( target ) if pids : with target : cr . Host . Execute ( '{CR_ADB}' , 'shell' , 'kill' , * pids ) elif target . verbose : print ( target . Substitute ( '{CR_TARGET_NAME} not running' ) ) cls . _kills [ target_name ] = True
Kill all running processes for a target.
Kill all running processes for a target .
"""Kill all running processes for a target.""" # already killed this target, do nothing
cls
target
_