Index: build/android/pylib/forwarder.py |
diff --git a/build/android/pylib/forwarder.py b/build/android/pylib/forwarder.py |
index 17a0114ee8acf8cdd88eaf4aebe59c7002249c20..ba4d51a5e36837af1be1e314a0430ee0d60aed2f 100644 |
--- a/build/android/pylib/forwarder.py |
+++ b/build/android/pylib/forwarder.py |
@@ -9,6 +9,7 @@ import logging |
import os |
import psutil |
+from devil import devil_env |
from devil.utils import cmd_helper |
from pylib import constants |
from pylib import valgrind_tools |
@@ -77,7 +78,7 @@ class Forwarder(object): |
device_serial = str(device) |
redirection_commands = [ |
- ['--adb=' + constants.GetAdbPath(), |
+ ['--adb=' + devil_env.config.adb_path, |
'--serial-id=' + device_serial, |
'--map', str(device_port), str(host_port)] |
for device_port, host_port in port_pairs] |
@@ -197,11 +198,10 @@ class Forwarder(object): |
self._initialized_devices = set() |
self._device_to_host_port_map = dict() |
self._host_to_device_port_map = dict() |
- self._host_forwarder_path = os.path.join( |
- constants.GetOutDirectory(), 'host_forwarder') |
+ self._host_forwarder_path = devil_env.config.forwarder_host_path |
assert os.path.exists(self._host_forwarder_path), 'Please build forwarder2' |
- self._device_forwarder_path_on_host = os.path.join( |
- constants.GetOutDirectory(), 'forwarder_dist') |
+ self._device_forwarder_path_on_host = ( |
+ devil_env.config.forwarder_device_path) |
self._InitHostLocked() |
@staticmethod |
@@ -216,7 +216,7 @@ class Forwarder(object): |
if not serial_with_port in instance._device_to_host_port_map: |
logging.error('Trying to unmap non-forwarded port %d', device_port) |
return |
- redirection_command = ['--adb=' + constants.GetAdbPath(), |
+ redirection_command = ['--adb=' + devil_env.config.adb_path, |
'--serial-id=' + serial, |
'--unmap', str(device_port)] |
logging.info('Undo forwarding using command: %s', redirection_command) |