summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjbudorick <jbudorick@chromium.org>2015-09-03 11:00:57 -0700
committerCommit bot <commit-bot@chromium.org>2015-09-03 18:02:10 +0000
commit06162944abfc0cba869f7e783a7c5a7d94246288 (patch)
treeb7172c78dfdeb730c65bd04591e946fa613c9083
parent5e8b151370a6c7da45eea3ebe9e0b7513c119a6b (diff)
downloadchromium_src-06162944abfc0cba869f7e783a7c5a7d94246288.zip
chromium_src-06162944abfc0cba869f7e783a7c5a7d94246288.tar.gz
chromium_src-06162944abfc0cba869f7e783a7c5a7d94246288.tar.bz2
[Android][telemetry] Update pylib imports for modules that moved into devil.
BUG=476719 Review URL: https://codereview.chromium.org/1314313004 Cr-Commit-Position: refs/heads/master@{#347187}
-rwxr-xr-xbuild/android/adb_install_apk.py10
-rwxr-xr-xbuild/android/adb_reverse_forwarder.py10
-rwxr-xr-xbuild/android/avd.py2
-rwxr-xr-xbuild/android/bb_run_sharded_steps.py2
-rwxr-xr-xbuild/android/buildbot/bb_device_status_check.py16
-rwxr-xr-xbuild/android/buildbot/bb_device_steps.py2
-rw-r--r--build/android/devil/android/ports.py (renamed from build/android/pylib/ports.py)25
-rw-r--r--build/android/devil/utils/reraiser_thread_unittest.py (renamed from build/android/pylib/utils/reraiser_thread_unittest.py)4
-rw-r--r--build/android/devil/utils/timeout_retry_unittest.py (renamed from build/android/pylib/utils/timeout_retry_unittest.py)4
-rwxr-xr-xbuild/android/emma_coverage_stats.py2
-rwxr-xr-xbuild/android/enable_asserts.py4
-rwxr-xr-xbuild/android/findbugs_diff.py2
-rwxr-xr-xbuild/android/generate_emma_html.py2
-rwxr-xr-xbuild/android/gyp/apk_install.py2
-rwxr-xr-xbuild/android/gyp/create_device_library_links.py2
-rw-r--r--build/android/gyp/util/build_device.py6
-rwxr-xr-xbuild/android/host_heartbeat.py2
-rwxr-xr-xbuild/android/install_emulator_deps.py4
-rwxr-xr-xbuild/android/method_count.py2
-rwxr-xr-xbuild/android/preprocess_google_play_services.py2
-rwxr-xr-xbuild/android/provision_devices.py13
-rw-r--r--build/android/pylib/base/base_test_runner.py4
-rw-r--r--build/android/pylib/base/test_dispatcher.py6
-rwxr-xr-xbuild/android/pylib/base/test_dispatcher_unittest.py6
-rw-r--r--build/android/pylib/chrome_test_server_spawner.py4
-rw-r--r--build/android/pylib/constants/__init__.py8
-rw-r--r--build/android/pylib/device_settings.py2
-rw-r--r--build/android/pylib/flag_changer.py2
-rw-r--r--build/android/pylib/forwarder.py4
-rw-r--r--build/android/pylib/gtest/gtest_test_instance.py2
-rw-r--r--build/android/pylib/gtest/local_device_gtest_run.py7
-rw-r--r--build/android/pylib/gtest/setup.py3
-rw-r--r--build/android/pylib/gtest/test_package_apk.py4
-rw-r--r--build/android/pylib/gtest/test_package_exe.py4
-rw-r--r--build/android/pylib/gtest/test_runner.py4
-rw-r--r--build/android/pylib/host_driven/test_case.py2
-rw-r--r--build/android/pylib/instrumentation/instrumentation_test_instance.py6
-rw-r--r--build/android/pylib/instrumentation/setup.py3
-rw-r--r--build/android/pylib/instrumentation/test_jar.py6
-rw-r--r--build/android/pylib/instrumentation/test_package.py2
-rw-r--r--build/android/pylib/instrumentation/test_runner.py2
-rw-r--r--build/android/pylib/junit/test_runner.py2
-rw-r--r--build/android/pylib/linker/test_case.py4
-rw-r--r--build/android/pylib/linker/test_runner.py2
-rw-r--r--build/android/pylib/local/device/local_device_environment.py10
-rw-r--r--build/android/pylib/local/device/local_device_instrumentation_test_run.py4
-rw-r--r--build/android/pylib/local/device/local_device_test_run.py2
-rw-r--r--build/android/pylib/monkey/test_runner.py4
-rw-r--r--build/android/pylib/perf/cache_control.py2
-rw-r--r--build/android/pylib/perf/perf_control.py4
-rw-r--r--build/android/pylib/perf/perf_control_unittest.py2
-rw-r--r--build/android/pylib/perf/setup.py4
-rw-r--r--build/android/pylib/perf/surface_stats_collector.py3
-rw-r--r--build/android/pylib/perf/test_runner.py6
-rw-r--r--build/android/pylib/perf/thermal_throttle.py3
-rw-r--r--build/android/pylib/remote/device/remote_device_environment.py4
-rw-r--r--build/android/pylib/remote/device/remote_device_helper.py2
-rw-r--r--build/android/pylib/remote/device/remote_device_instrumentation_test_run.py2
-rw-r--r--build/android/pylib/remote/device/remote_device_test_run.py3
-rw-r--r--build/android/pylib/results/flakiness_dashboard/results_uploader.py2
-rw-r--r--build/android/pylib/screenshot.py8
-rw-r--r--build/android/pylib/uiautomator/test_runner.py2
-rw-r--r--build/android/pylib/uirobot/uirobot_test_instance.py2
-rw-r--r--build/android/pylib/utils/emulator.py9
-rw-r--r--build/android/pylib/utils/findbugs.py2
-rw-r--r--build/android/pylib/utils/isolator.py2
-rw-r--r--build/android/pylib/utils/proguard.py2
-rw-r--r--build/android/pylib/utils/repo_utils.py2
-rw-r--r--build/android/pylib/utils/test_environment.py4
-rw-r--r--build/android/pylib/valgrind_tools.py2
-rwxr-xr-xbuild/android/screenshot.py6
-rwxr-xr-xbuild/android/test_runner.py17
-rwxr-xr-xbuild/android/tombstones.py10
-rwxr-xr-xbuild/android/update_verification.py10
-rw-r--r--tools/telemetry/telemetry/internal/app/android_app_unittest.py2
-rw-r--r--tools/telemetry/telemetry/internal/app/android_process.py2
-rw-r--r--tools/telemetry/telemetry/internal/backends/android_command_line_backend.py2
-rw-r--r--tools/telemetry/telemetry/internal/backends/android_command_line_backend_unittest.py2
-rw-r--r--tools/telemetry/telemetry/internal/backends/chrome/android_browser_backend.py2
-rw-r--r--tools/telemetry/telemetry/internal/backends/chrome/android_browser_finder.py2
-rw-r--r--tools/telemetry/telemetry/internal/backends/chrome/android_browser_finder_unittest.py2
-rw-r--r--tools/telemetry/telemetry/internal/backends/mandoline/android.py8
-rw-r--r--tools/telemetry/telemetry/internal/backends/mandoline/android_mandoline_finder.py2
-rw-r--r--tools/telemetry/telemetry/internal/forwarders/android_forwarder.py4
-rw-r--r--tools/telemetry/telemetry/internal/platform/android_device.py6
-rw-r--r--tools/telemetry/telemetry/internal/platform/android_device_unittest.py4
-rw-r--r--tools/telemetry/telemetry/internal/platform/android_platform_backend.py9
-rw-r--r--tools/telemetry/telemetry/internal/platform/android_platform_backend_unittest.py12
-rw-r--r--tools/telemetry/telemetry/internal/platform/power_monitor/android_temperature_monitor.py2
-rw-r--r--tools/telemetry/telemetry/internal/platform/power_monitor/power_monitor_controller_unittest.py2
-rw-r--r--tools/telemetry/telemetry/internal/platform/profiler/android_profiling_helper.py2
-rw-r--r--tools/telemetry/telemetry/internal/platform/profiler/android_traceview_profiler.py2
-rw-r--r--tools/telemetry/telemetry/internal/platform/profiler/java_heap_profiler.py2
-rw-r--r--tools/telemetry/telemetry/internal/platform/profiler/oomkiller_profiler.py2
-rw-r--r--tools/telemetry/telemetry/internal/platform/profiler/perf_profiler.py2
-rwxr-xr-xtools/telemetry/telemetry/internal/platform/profiler/screenshot.py4
-rw-r--r--tools/telemetry/telemetry/internal/platform/tracing_agent/chrome_tracing_agent_unittest.py2
97 files changed, 205 insertions, 216 deletions
diff --git a/build/android/adb_install_apk.py b/build/android/adb_install_apk.py
index 3000b81..e00981f 100755
--- a/build/android/adb_install_apk.py
+++ b/build/android/adb_install_apk.py
@@ -12,12 +12,12 @@ import logging
import os
import sys
+from devil.android import apk_helper
+from devil.android import device_blacklist
+from devil.android import device_errors
+from devil.android import device_utils
+from devil.utils import run_tests_helper
from pylib import constants
-from pylib.device import device_blacklist
-from pylib.device import device_errors
-from pylib.device import device_utils
-from pylib.utils import apk_helper
-from pylib.utils import run_tests_helper
def main():
diff --git a/build/android/adb_reverse_forwarder.py b/build/android/adb_reverse_forwarder.py
index a3bfaf0..44b1b97 100755
--- a/build/android/adb_reverse_forwarder.py
+++ b/build/android/adb_reverse_forwarder.py
@@ -16,13 +16,13 @@ import optparse
import sys
import time
+from devil.android import device_blacklist
+from devil.android import device_errors
+from devil.android import device_utils
+from devil.android.sdk import adb_wrapper
+from devil.utils import run_tests_helper
from pylib import constants
from pylib import forwarder
-from pylib.device import adb_wrapper
-from pylib.device import device_blacklist
-from pylib.device import device_errors
-from pylib.device import device_utils
-from pylib.utils import run_tests_helper
def main(argv):
diff --git a/build/android/avd.py b/build/android/avd.py
index c45544f..c51aba1 100755
--- a/build/android/avd.py
+++ b/build/android/avd.py
@@ -16,7 +16,7 @@ import os
import re
import sys
-from pylib import cmd_helper
+from devil.utils import cmd_helper
from pylib import constants
from pylib.utils import emulator
diff --git a/build/android/bb_run_sharded_steps.py b/build/android/bb_run_sharded_steps.py
index 6aeba5b..1775dc1 100755
--- a/build/android/bb_run_sharded_steps.py
+++ b/build/android/bb_run_sharded_steps.py
@@ -12,7 +12,7 @@ TODO(bulach): remove me once all other repositories reference
import optparse
import sys
-from pylib import cmd_helper
+from devil.utils import cmd_helper
def main(argv):
diff --git a/build/android/buildbot/bb_device_status_check.py b/build/android/buildbot/bb_device_status_check.py
index 4eaaf68..9409e6b 100755
--- a/build/android/buildbot/bb_device_status_check.py
+++ b/build/android/buildbot/bb_device_status_check.py
@@ -27,17 +27,17 @@ sys.path.append(os.path.join(os.path.dirname(__file__),
import perf_tests_results_helper # pylint: disable=F0401
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
+from devil.android import battery_utils
+from devil.android import device_blacklist
+from devil.android import device_errors
+from devil.android import device_list
+from devil.android import device_utils
+from devil.android.sdk import adb_wrapper
from devil.utils import reset_usb
+from devil.utils import run_tests_helper
+from devil.utils import timeout_retry
from pylib import constants
from pylib.cmd_helper import GetCmdOutput
-from pylib.device import adb_wrapper
-from pylib.device import battery_utils
-from pylib.device import device_blacklist
-from pylib.device import device_errors
-from pylib.device import device_list
-from pylib.device import device_utils
-from pylib.utils import run_tests_helper
-from pylib.utils import timeout_retry
_RE_DEVICE_ID = re.compile('Device ID = (\d+)')
diff --git a/build/android/buildbot/bb_device_steps.py b/build/android/buildbot/bb_device_steps.py
index b2eda0f..2e4c42e 100755
--- a/build/android/buildbot/bb_device_steps.py
+++ b/build/android/buildbot/bb_device_steps.py
@@ -18,8 +18,8 @@ import bb_annotations
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
import provision_devices
+from devil.android import device_utils
from pylib import constants
-from pylib.device import device_utils
from pylib.gtest import gtest_config
CHROME_SRC_DIR = bb_utils.CHROME_SRC
diff --git a/build/android/pylib/ports.py b/build/android/devil/android/ports.py
index fa0345b..49ee4e3 100644
--- a/build/android/pylib/ports.py
+++ b/build/android/devil/android/ports.py
@@ -12,7 +12,12 @@ import os
import socket
import traceback
-from pylib import constants
+# The net test server is started from port 10201.
+_TEST_SERVER_PORT_FIRST = 10201
+_TEST_SERVER_PORT_LAST = 30000
+# A file to record next valid port of test server.
+_TEST_SERVER_PORT_FILE = '/tmp/test_server_port'
+_TEST_SERVER_PORT_LOCKFILE = '/tmp/test_server_port.lock'
# The following two methods are used to allocate the port source for various
@@ -27,10 +32,10 @@ def ResetTestServerPortAllocation():
Returns True if reset successes. Otherwise returns False.
"""
try:
- with open(constants.TEST_SERVER_PORT_FILE, 'w') as fp:
- fp.write('%d' % constants.TEST_SERVER_PORT_FIRST)
- if os.path.exists(constants.TEST_SERVER_PORT_LOCKFILE):
- os.unlink(constants.TEST_SERVER_PORT_LOCKFILE)
+ with open(_TEST_SERVER_PORT_FILE, 'w') as fp:
+ fp.write('%d' % _TEST_SERVER_PORT_FIRST)
+ if os.path.exists(_TEST_SERVER_PORT_LOCKFILE):
+ os.unlink(_TEST_SERVER_PORT_LOCKFILE)
return True
except Exception as e:
logging.error(e)
@@ -47,19 +52,19 @@ def AllocateTestServerPort():
port = 0
ports_tried = []
try:
- fp_lock = open(constants.TEST_SERVER_PORT_LOCKFILE, 'w')
+ fp_lock = open(_TEST_SERVER_PORT_LOCKFILE, 'w')
fcntl.flock(fp_lock, fcntl.LOCK_EX)
# Get current valid port and calculate next valid port.
- if not os.path.exists(constants.TEST_SERVER_PORT_FILE):
+ if not os.path.exists(_TEST_SERVER_PORT_FILE):
ResetTestServerPortAllocation()
- with open(constants.TEST_SERVER_PORT_FILE, 'r+') as fp:
+ with open(_TEST_SERVER_PORT_FILE, 'r+') as fp:
port = int(fp.read())
ports_tried.append(port)
while not IsHostPortAvailable(port):
port += 1
ports_tried.append(port)
- if (port > constants.TEST_SERVER_PORT_LAST or
- port < constants.TEST_SERVER_PORT_FIRST):
+ if (port > _TEST_SERVER_PORT_LAST or
+ port < _TEST_SERVER_PORT_FIRST):
port = 0
else:
fp.seek(0, os.SEEK_SET)
diff --git a/build/android/pylib/utils/reraiser_thread_unittest.py b/build/android/devil/utils/reraiser_thread_unittest.py
index 567c5c2..a112e61 100644
--- a/build/android/pylib/utils/reraiser_thread_unittest.py
+++ b/build/android/devil/utils/reraiser_thread_unittest.py
@@ -7,8 +7,8 @@
import threading
import unittest
-from pylib.utils import reraiser_thread
-from pylib.utils import watchdog_timer
+from devil.utils import reraiser_thread
+from devil.utils import watchdog_timer
class TestException(Exception):
diff --git a/build/android/pylib/utils/timeout_retry_unittest.py b/build/android/devil/utils/timeout_retry_unittest.py
index dc36c42..c48deb6 100644
--- a/build/android/pylib/utils/timeout_retry_unittest.py
+++ b/build/android/devil/utils/timeout_retry_unittest.py
@@ -6,8 +6,8 @@
import unittest
-from pylib.utils import reraiser_thread
-from pylib.utils import timeout_retry
+from devil.utils import reraiser_thread
+from devil.utils import timeout_retry
class TestException(Exception):
diff --git a/build/android/emma_coverage_stats.py b/build/android/emma_coverage_stats.py
index b6620fe..dd50b3d 100755
--- a/build/android/emma_coverage_stats.py
+++ b/build/android/emma_coverage_stats.py
@@ -24,7 +24,7 @@ import re
import sys
from xml.etree import ElementTree
-from pylib.utils import run_tests_helper
+from devil.utils import run_tests_helper
NOT_EXECUTABLE = -1
NOT_COVERED = 0
diff --git a/build/android/enable_asserts.py b/build/android/enable_asserts.py
index b33e212..1c60277 100755
--- a/build/android/enable_asserts.py
+++ b/build/android/enable_asserts.py
@@ -9,8 +9,8 @@
import argparse
import sys
-from pylib.device import device_blacklist
-from pylib.device import device_utils
+from devil.android import device_blacklist
+from devil.android import device_utils
def main():
diff --git a/build/android/findbugs_diff.py b/build/android/findbugs_diff.py
index 06c689a..52c1e11 100755
--- a/build/android/findbugs_diff.py
+++ b/build/android/findbugs_diff.py
@@ -20,9 +20,9 @@ import argparse
import os
import sys
+from devil.utils import run_tests_helper
from pylib import constants
from pylib.utils import findbugs
-from pylib.utils import run_tests_helper
_DEFAULT_BASE_DIR = os.path.join(
constants.DIR_SOURCE_ROOT, 'build', 'android', 'findbugs_filter')
diff --git a/build/android/generate_emma_html.py b/build/android/generate_emma_html.py
index 93b0b0e..699abe5 100755
--- a/build/android/generate_emma_html.py
+++ b/build/android/generate_emma_html.py
@@ -12,7 +12,7 @@ import optparse
import os
import sys
-from pylib import cmd_helper
+from devil.utils import cmd_helper
from pylib import constants
diff --git a/build/android/gyp/apk_install.py b/build/android/gyp/apk_install.py
index d6c0e1a..33697ca 100755
--- a/build/android/gyp/apk_install.py
+++ b/build/android/gyp/apk_install.py
@@ -20,8 +20,8 @@ from util import md5_check
BUILD_ANDROID_DIR = os.path.join(os.path.dirname(__file__), '..')
sys.path.append(BUILD_ANDROID_DIR)
+from devil.android import apk_helper
from pylib import constants
-from pylib.utils import apk_helper
def GetNewMetadata(device, apk_package):
diff --git a/build/android/gyp/create_device_library_links.py b/build/android/gyp/create_device_library_links.py
index 3e630b6..8c155a0 100755
--- a/build/android/gyp/create_device_library_links.py
+++ b/build/android/gyp/create_device_library_links.py
@@ -21,8 +21,8 @@ from util import build_utils
BUILD_ANDROID_DIR = os.path.join(os.path.dirname(__file__), '..')
sys.path.append(BUILD_ANDROID_DIR)
+from devil.android import apk_helper
from pylib import constants
-from pylib.utils import apk_helper
def RunShellCommand(device, cmd):
output = device.RunShellCommand(cmd)
diff --git a/build/android/gyp/util/build_device.py b/build/android/gyp/util/build_device.py
index 7a7c743..a19045b 100644
--- a/build/android/gyp/util/build_device.py
+++ b/build/android/gyp/util/build_device.py
@@ -16,9 +16,9 @@ from util import build_utils
BUILD_ANDROID_DIR = os.path.join(os.path.dirname(__file__), '..', '..')
sys.path.append(BUILD_ANDROID_DIR)
-from pylib.device import adb_wrapper
-from pylib.device import device_errors
-from pylib.device import device_utils
+from devil.android import device_errors
+from devil.android import device_utils
+from devil.android.sdk import adb_wrapper
def GetAttachedDevices():
diff --git a/build/android/host_heartbeat.py b/build/android/host_heartbeat.py
index d5898ab..ced24b2 100755
--- a/build/android/host_heartbeat.py
+++ b/build/android/host_heartbeat.py
@@ -12,7 +12,7 @@ This heart beat lets the devices know that they are connected to a host.
import sys
import time
-from pylib.device import device_utils
+from devil.android import device_utils
PULSE_PERIOD = 20
diff --git a/build/android/install_emulator_deps.py b/build/android/install_emulator_deps.py
index 82d1c75..174faa7 100755
--- a/build/android/install_emulator_deps.py
+++ b/build/android/install_emulator_deps.py
@@ -17,10 +17,10 @@ import re
import shutil
import sys
-from pylib import cmd_helper
+from devil.utils import cmd_helper
+from devil.utils import run_tests_helper
from pylib import constants
from pylib import pexpect
-from pylib.utils import run_tests_helper
# Android API level
DEFAULT_ANDROID_API_LEVEL = constants.ANDROID_SDK_VERSION
diff --git a/build/android/method_count.py b/build/android/method_count.py
index 93250b5..a12fe6a 100755
--- a/build/android/method_count.py
+++ b/build/android/method_count.py
@@ -8,8 +8,8 @@ import os
import re
import sys
+from devil.android.sdk import dexdump
from pylib import constants
-from pylib.sdk import dexdump
sys.path.append(os.path.join(constants.DIR_SOURCE_ROOT, 'build', 'util', 'lib',
'common'))
diff --git a/build/android/preprocess_google_play_services.py b/build/android/preprocess_google_play_services.py
index 1888d22..852e409 100755
--- a/build/android/preprocess_google_play_services.py
+++ b/build/android/preprocess_google_play_services.py
@@ -73,7 +73,7 @@ import stat
import sys
from datetime import datetime
-from pylib import cmd_helper
+from devil.utils import cmd_helper
from pylib import constants
sys.path.append(
diff --git a/build/android/provision_devices.py b/build/android/provision_devices.py
index 96324ff..0a7f8fd7 100755
--- a/build/android/provision_devices.py
+++ b/build/android/provision_devices.py
@@ -21,16 +21,15 @@ import subprocess
import sys
import time
+from devil.android import battery_utils
+from devil.android import device_blacklist
+from devil.android import device_errors
+from devil.android import device_utils
from devil.android.sdk import version_codes
-
+from devil.utils import run_tests_helper
+from devil.utils import timeout_retry
from pylib import constants
from pylib import device_settings
-from pylib.device import battery_utils
-from pylib.device import device_blacklist
-from pylib.device import device_errors
-from pylib.device import device_utils
-from pylib.utils import run_tests_helper
-from pylib.utils import timeout_retry
_SYSTEM_WEBVIEW_PATHS = ['/system/app/webview', '/system/app/WebViewGoogle']
_CHROME_PACKAGE_REGEX = re.compile('.*chrom.*')
diff --git a/build/android/pylib/base/base_test_runner.py b/build/android/pylib/base/base_test_runner.py
index 2a7fdd3..1be178b 100644
--- a/build/android/pylib/base/base_test_runner.py
+++ b/build/android/pylib/base/base_test_runner.py
@@ -10,8 +10,8 @@
import logging
-from pylib import ports
-from pylib.device import device_utils
+from devil.android import device_utils
+from devil.android import ports
from pylib.forwarder import Forwarder
from pylib.valgrind_tools import CreateTool
# TODO(frankf): Move this to pylib/utils
diff --git a/build/android/pylib/base/test_dispatcher.py b/build/android/pylib/base/test_dispatcher.py
index 93df28c..b10fdec 100644
--- a/build/android/pylib/base/test_dispatcher.py
+++ b/build/android/pylib/base/test_dispatcher.py
@@ -21,12 +21,12 @@ Performs the following steps:
import logging
import threading
+from devil.android import device_errors
+from devil.utils import reraiser_thread
+from devil.utils import watchdog_timer
from pylib import constants
from pylib.base import base_test_result
from pylib.base import test_collection
-from pylib.device import device_errors
-from pylib.utils import reraiser_thread
-from pylib.utils import watchdog_timer
DEFAULT_TIMEOUT = 7 * 60 # seven minutes
diff --git a/build/android/pylib/base/test_dispatcher_unittest.py b/build/android/pylib/base/test_dispatcher_unittest.py
index cace9a6..1ec5f56 100755
--- a/build/android/pylib/base/test_dispatcher_unittest.py
+++ b/build/android/pylib/base/test_dispatcher_unittest.py
@@ -12,13 +12,13 @@ import sys
import unittest
+from devil.android import device_utils
+from devil.android.sdk import adb_wrapper
+from devil.utils import watchdog_timer
from pylib import constants
from pylib.base import base_test_result
from pylib.base import test_collection
from pylib.base import test_dispatcher
-from pylib.device import adb_wrapper
-from pylib.device import device_utils
-from pylib.utils import watchdog_timer
sys.path.append(
os.path.join(constants.DIR_SOURCE_ROOT, 'third_party', 'pymock'))
diff --git a/build/android/pylib/chrome_test_server_spawner.py b/build/android/pylib/chrome_test_server_spawner.py
index 052c2fd..99f4b5dc 100644
--- a/build/android/pylib/chrome_test_server_spawner.py
+++ b/build/android/pylib/chrome_test_server_spawner.py
@@ -21,9 +21,9 @@ import threading
import time
import urlparse
-from pylib import constants
-from pylib import ports
+from devil.android import ports
+from pylib import constants
from pylib.forwarder import Forwarder
diff --git a/build/android/pylib/constants/__init__.py b/build/android/pylib/constants/__init__.py
index 80d31b8..70020cf 100644
--- a/build/android/pylib/constants/__init__.py
+++ b/build/android/pylib/constants/__init__.py
@@ -139,14 +139,6 @@ TEST_SYNC_SERVER_PORT = 9031
TEST_SEARCH_BY_IMAGE_SERVER_PORT = 9041
TEST_POLICY_SERVER_PORT = 9051
-# The net test server is started from port 10201.
-# TODO(pliard): http://crbug.com/239014. Remove this dirty workaround once
-# http://crbug.com/239014 is fixed properly.
-TEST_SERVER_PORT_FIRST = 10201
-TEST_SERVER_PORT_LAST = 30000
-# A file to record next valid port of test server.
-TEST_SERVER_PORT_FILE = '/tmp/test_server_port'
-TEST_SERVER_PORT_LOCKFILE = '/tmp/test_server_port.lock'
TEST_EXECUTABLE_DIR = '/data/local/tmp'
# Directories for common java libraries for SDK build.
diff --git a/build/android/pylib/device_settings.py b/build/android/pylib/device_settings.py
index beabcff..698e8eb 100644
--- a/build/android/pylib/device_settings.py
+++ b/build/android/pylib/device_settings.py
@@ -4,9 +4,9 @@
import logging
+from devil.android import device_errors
from pylib import constants
from pylib import content_settings
-from pylib.device import device_errors
_LOCK_SCREEN_SETTINGS_PATH = '/data/system/locksettings.db'
_ALTERNATE_LOCK_SCREEN_SETTINGS_PATH = (
diff --git a/build/android/pylib/flag_changer.py b/build/android/pylib/flag_changer.py
index bdda779..ccc3c09 100644
--- a/build/android/pylib/flag_changer.py
+++ b/build/android/pylib/flag_changer.py
@@ -4,7 +4,7 @@
import logging
-from pylib.device import device_errors
+from devil.android import device_errors
class FlagChanger(object):
diff --git a/build/android/pylib/forwarder.py b/build/android/pylib/forwarder.py
index 568a925..94ad263 100644
--- a/build/android/pylib/forwarder.py
+++ b/build/android/pylib/forwarder.py
@@ -9,12 +9,10 @@ import logging
import os
import psutil
-from pylib import cmd_helper
+from devil.utils import cmd_helper
from pylib import constants
from pylib import valgrind_tools
-import pylib.device.device_utils
-
def _GetProcessStartTime(pid):
return psutil.Process(pid).create_time
diff --git a/build/android/pylib/gtest/gtest_test_instance.py b/build/android/pylib/gtest/gtest_test_instance.py
index 3285e0b..4cf7934 100644
--- a/build/android/pylib/gtest/gtest_test_instance.py
+++ b/build/android/pylib/gtest/gtest_test_instance.py
@@ -9,10 +9,10 @@ import shutil
import sys
import tempfile
+from devil.android import apk_helper
from pylib import constants
from pylib.base import base_test_result
from pylib.base import test_instance
-from pylib.utils import apk_helper
sys.path.append(os.path.join(
constants.DIR_SOURCE_ROOT, 'build', 'util', 'lib', 'common'))
diff --git a/build/android/pylib/gtest/local_device_gtest_run.py b/build/android/pylib/gtest/local_device_gtest_run.py
index 7dd396f..e7f6a12 100644
--- a/build/android/pylib/gtest/local_device_gtest_run.py
+++ b/build/android/pylib/gtest/local_device_gtest_run.py
@@ -7,16 +7,15 @@ import logging
import os
import posixpath
+from devil.android import device_errors
+from devil.android import device_temp_file
+from devil.android import ports
from pylib import constants
-from pylib import ports
from pylib.base import test_run
-from pylib.device import device_errors
from pylib.gtest import gtest_test_instance
-
from pylib.local import local_test_server_spawner
from pylib.local.device import local_device_environment
from pylib.local.device import local_device_test_run
-from pylib.utils import device_temp_file
_COMMAND_LINE_FLAGS_SUPPORTED = True
diff --git a/build/android/pylib/gtest/setup.py b/build/android/pylib/gtest/setup.py
index f563ccf..f114c3c 100644
--- a/build/android/pylib/gtest/setup.py
+++ b/build/android/pylib/gtest/setup.py
@@ -9,12 +9,11 @@ import logging
import os
import sys
+from devil.android import device_utils
from pylib import constants
-
from pylib.base import base_setup
from pylib.base import base_test_result
from pylib.base import test_dispatcher
-from pylib.device import device_utils
from pylib.gtest import gtest_test_instance
from pylib.gtest import test_package_apk
from pylib.gtest import test_package_exe
diff --git a/build/android/pylib/gtest/test_package_apk.py b/build/android/pylib/gtest/test_package_apk.py
index 1bf3913..fad4ab1 100644
--- a/build/android/pylib/gtest/test_package_apk.py
+++ b/build/android/pylib/gtest/test_package_apk.py
@@ -14,10 +14,10 @@ import sys
import tempfile
import time
+from devil.android import device_errors
+from devil.android.sdk import intent
from pylib import constants
from pylib import pexpect
-from pylib.device import device_errors
-from pylib.device import intent
from pylib.gtest import gtest_test_instance
from pylib.gtest import local_device_gtest_run
from pylib.gtest.test_package import TestPackage
diff --git a/build/android/pylib/gtest/test_package_exe.py b/build/android/pylib/gtest/test_package_exe.py
index 87071b5..d03a596 100644
--- a/build/android/pylib/gtest/test_package_exe.py
+++ b/build/android/pylib/gtest/test_package_exe.py
@@ -10,10 +10,10 @@ import posixpath
import sys
import tempfile
-from pylib import cmd_helper
+from devil.android import device_errors
+from devil.utils import cmd_helper
from pylib import constants
from pylib import pexpect
-from pylib.device import device_errors
from pylib.gtest import gtest_test_instance
from pylib.gtest.test_package import TestPackage
diff --git a/build/android/pylib/gtest/test_runner.py b/build/android/pylib/gtest/test_runner.py
index a48f18a..b22b076 100644
--- a/build/android/pylib/gtest/test_runner.py
+++ b/build/android/pylib/gtest/test_runner.py
@@ -7,11 +7,11 @@ import os
import re
import tempfile
+from devil.android import device_errors
+from devil.android import ports
from pylib import pexpect
-from pylib import ports
from pylib.base import base_test_result
from pylib.base import base_test_runner
-from pylib.device import device_errors
from pylib.gtest import gtest_test_instance
from pylib.local import local_test_server_spawner
from pylib.perf import perf_control
diff --git a/build/android/pylib/host_driven/test_case.py b/build/android/pylib/host_driven/test_case.py
index 817fce6..8d3913a 100644
--- a/build/android/pylib/host_driven/test_case.py
+++ b/build/android/pylib/host_driven/test_case.py
@@ -24,11 +24,11 @@ import logging
import os
import time
+from devil.android import device_utils
from pylib import constants
from pylib import forwarder
from pylib import valgrind_tools
from pylib.base import base_test_result
-from pylib.device import device_utils
from pylib.instrumentation import test_package
from pylib.instrumentation import test_result
from pylib.instrumentation import test_runner
diff --git a/build/android/pylib/instrumentation/instrumentation_test_instance.py b/build/android/pylib/instrumentation/instrumentation_test_instance.py
index f9957b0..10ed63b 100644
--- a/build/android/pylib/instrumentation/instrumentation_test_instance.py
+++ b/build/android/pylib/instrumentation/instrumentation_test_instance.py
@@ -8,15 +8,15 @@ import pickle
import re
import sys
-from pylib import cmd_helper
+from devil.android import apk_helper
+from devil.android import md5sum
+from devil.utils import cmd_helper
from pylib import constants
from pylib import flag_changer
from pylib.base import base_test_result
from pylib.base import test_instance
from pylib.instrumentation import test_result
from pylib.instrumentation import instrumentation_parser
-from pylib.utils import apk_helper
-from pylib.utils import md5sum
from pylib.utils import proguard
sys.path.append(
diff --git a/build/android/pylib/instrumentation/setup.py b/build/android/pylib/instrumentation/setup.py
index aacb6b3..7acfb62 100644
--- a/build/android/pylib/instrumentation/setup.py
+++ b/build/android/pylib/instrumentation/setup.py
@@ -7,11 +7,10 @@
import logging
import os
+from devil.android import device_utils
from pylib import constants
from pylib import valgrind_tools
-
from pylib.base import base_setup
-from pylib.device import device_utils
from pylib.instrumentation import test_package
from pylib.instrumentation import test_runner
diff --git a/build/android/pylib/instrumentation/test_jar.py b/build/android/pylib/instrumentation/test_jar.py
index 3a2116d..c31dae1 100644
--- a/build/android/pylib/instrumentation/test_jar.py
+++ b/build/android/pylib/instrumentation/test_jar.py
@@ -11,10 +11,10 @@ import pickle
import re
import sys
-from pylib import cmd_helper
+from devil.android import device_utils
+from devil.android import md5sum
+from devil.utils import cmd_helper
from pylib import constants
-from pylib.device import device_utils
-from pylib.utils import md5sum
from pylib.utils import proguard
sys.path.insert(0,
diff --git a/build/android/pylib/instrumentation/test_package.py b/build/android/pylib/instrumentation/test_package.py
index f32556f..af7b1e7 100644
--- a/build/android/pylib/instrumentation/test_package.py
+++ b/build/android/pylib/instrumentation/test_package.py
@@ -6,8 +6,8 @@
import os
+from devil.android import apk_helper
from pylib.instrumentation import test_jar
-from pylib.utils import apk_helper
class TestPackage(test_jar.TestJar):
diff --git a/build/android/pylib/instrumentation/test_runner.py b/build/android/pylib/instrumentation/test_runner.py
index 8731eb1..9383441 100644
--- a/build/android/pylib/instrumentation/test_runner.py
+++ b/build/android/pylib/instrumentation/test_runner.py
@@ -10,12 +10,12 @@ import re
import sys
import time
+from devil.android import device_errors
from pylib import constants
from pylib import flag_changer
from pylib import valgrind_tools
from pylib.base import base_test_result
from pylib.base import base_test_runner
-from pylib.device import device_errors
from pylib.instrumentation import instrumentation_test_instance
from pylib.instrumentation import json_perf_parser
from pylib.instrumentation import test_result
diff --git a/build/android/pylib/junit/test_runner.py b/build/android/pylib/junit/test_runner.py
index a6d3bf9..3966134 100644
--- a/build/android/pylib/junit/test_runner.py
+++ b/build/android/pylib/junit/test_runner.py
@@ -6,7 +6,7 @@ import json
import os
import tempfile
-from pylib import cmd_helper
+from devil.utils import cmd_helper
from pylib import constants
from pylib.base import base_test_result
from pylib.results import json_results
diff --git a/build/android/pylib/linker/test_case.py b/build/android/pylib/linker/test_case.py
index 0660a03..d25efcd 100644
--- a/build/android/pylib/linker/test_case.py
+++ b/build/android/pylib/linker/test_case.py
@@ -40,10 +40,10 @@ import os
import re
import time
+from devil.android import device_errors
+from devil.android.sdk import intent
from pylib import constants
from pylib.base import base_test_result
-from pylib.device import device_errors
-from pylib.device import intent
ResultType = base_test_result.ResultType
diff --git a/build/android/pylib/linker/test_runner.py b/build/android/pylib/linker/test_runner.py
index b6803e4..6366635 100644
--- a/build/android/pylib/linker/test_runner.py
+++ b/build/android/pylib/linker/test_runner.py
@@ -9,11 +9,11 @@ import os.path
import sys
import traceback
+from devil.android import apk_helper
from pylib import constants
from pylib.base import base_test_result
from pylib.base import base_test_runner
from pylib.linker import test_case
-from pylib.utils import apk_helper
# Name of the Android package to install for this to work.
diff --git a/build/android/pylib/local/device/local_device_environment.py b/build/android/pylib/local/device/local_device_environment.py
index 4a0d567..7a20903 100644
--- a/build/android/pylib/local/device/local_device_environment.py
+++ b/build/android/pylib/local/device/local_device_environment.py
@@ -2,12 +2,12 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+from devil.android import device_blacklist
+from devil.android import device_errors
+from devil.android import device_utils
+from devil.android.sdk import adb_wrapper
+from devil.utils import parallelizer
from pylib.base import environment
-from pylib.device import adb_wrapper
-from pylib.device import device_blacklist
-from pylib.device import device_errors
-from pylib.device import device_utils
-from pylib.utils import parallelizer
class LocalDeviceEnvironment(environment.Environment):
diff --git a/build/android/pylib/local/device/local_device_instrumentation_test_run.py b/build/android/pylib/local/device/local_device_instrumentation_test_run.py
index f8fc9bc..eacad08 100644
--- a/build/android/pylib/local/device/local_device_instrumentation_test_run.py
+++ b/build/android/pylib/local/device/local_device_instrumentation_test_run.py
@@ -6,11 +6,11 @@ import logging
import re
import time
+from devil.android import device_errors
+from devil.android.sdk import keyevent
from pylib import flag_changer
from pylib.base import base_test_result
from pylib.base import test_run
-from pylib.constants import keyevent
-from pylib.device import device_errors
from pylib.local.device import local_device_test_run
diff --git a/build/android/pylib/local/device/local_device_test_run.py b/build/android/pylib/local/device/local_device_test_run.py
index 8b593ab..994bd89 100644
--- a/build/android/pylib/local/device/local_device_test_run.py
+++ b/build/android/pylib/local/device/local_device_test_run.py
@@ -4,11 +4,11 @@
import logging
+from devil.android import device_errors
from pylib import valgrind_tools
from pylib.base import base_test_result
from pylib.base import test_run
from pylib.base import test_collection
-from pylib.device import device_errors
class LocalDeviceTestRun(test_run.TestRun):
diff --git a/build/android/pylib/monkey/test_runner.py b/build/android/pylib/monkey/test_runner.py
index 4815e3f..ff4c940 100644
--- a/build/android/pylib/monkey/test_runner.py
+++ b/build/android/pylib/monkey/test_runner.py
@@ -7,11 +7,11 @@
import logging
import random
+from devil.android import device_errors
+from devil.android.sdk import intent
from pylib import constants
from pylib.base import base_test_result
from pylib.base import base_test_runner
-from pylib.device import device_errors
-from pylib.device import intent
_CHROME_PACKAGE = constants.PACKAGE_INFO['chrome'].package
diff --git a/build/android/pylib/perf/cache_control.py b/build/android/pylib/perf/cache_control.py
index 8d17cff..e6461fa 100644
--- a/build/android/pylib/perf/cache_control.py
+++ b/build/android/pylib/perf/cache_control.py
@@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-from pylib.device import device_utils
+from devil.android import device_utils
class CacheControl(object):
_DROP_CACHES = '/proc/sys/vm/drop_caches'
diff --git a/build/android/pylib/perf/perf_control.py b/build/android/pylib/perf/perf_control.py
index 01c63d7..d8fb0ff 100644
--- a/build/android/pylib/perf/perf_control.py
+++ b/build/android/pylib/perf/perf_control.py
@@ -5,8 +5,8 @@
import atexit
import logging
-from pylib.device import device_errors
-from pylib.device import device_utils
+from devil.android import device_errors
+from devil.android import device_utils
class PerfControl(object):
diff --git a/build/android/pylib/perf/perf_control_unittest.py b/build/android/pylib/perf/perf_control_unittest.py
index 33088d3..425a69b 100644
--- a/build/android/pylib/perf/perf_control_unittest.py
+++ b/build/android/pylib/perf/perf_control_unittest.py
@@ -9,7 +9,7 @@ import unittest
sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir))
-from pylib.device import device_utils
+from devil.android import device_utils
from pylib.perf import perf_control
class TestPerfControl(unittest.TestCase):
diff --git a/build/android/pylib/perf/setup.py b/build/android/pylib/perf/setup.py
index 8635aca..4bb7dff 100644
--- a/build/android/pylib/perf/setup.py
+++ b/build/android/pylib/perf/setup.py
@@ -10,10 +10,10 @@ import logging
import os
import shutil
+from devil.android import device_list
+from devil.android import device_utils
from pylib import constants
from pylib import forwarder
-from pylib.device import device_list
-from pylib.device import device_utils
from pylib.perf import test_runner
from pylib.utils import test_environment
diff --git a/build/android/pylib/perf/surface_stats_collector.py b/build/android/pylib/perf/surface_stats_collector.py
index 6931a3d..4b7fa97 100644
--- a/build/android/pylib/perf/surface_stats_collector.py
+++ b/build/android/pylib/perf/surface_stats_collector.py
@@ -7,7 +7,8 @@ import datetime
import logging
import re
import threading
-from pylib.device import device_utils
+
+from devil.android import device_utils
# Log marker containing SurfaceTexture timestamps.
diff --git a/build/android/pylib/perf/test_runner.py b/build/android/pylib/perf/test_runner.py
index 6aa0f41..2e89e69 100644
--- a/build/android/pylib/perf/test_runner.py
+++ b/build/android/pylib/perf/test_runner.py
@@ -57,13 +57,13 @@ import tempfile
import threading
import time
-from pylib import cmd_helper
+from devil.android import battery_utils
+from devil.android import device_errors
+from devil.utils import cmd_helper
from pylib import constants
from pylib import forwarder
from pylib.base import base_test_result
from pylib.base import base_test_runner
-from pylib.device import battery_utils
-from pylib.device import device_errors
def GetPersistedResult(test_name):
diff --git a/build/android/pylib/perf/thermal_throttle.py b/build/android/pylib/perf/thermal_throttle.py
index cfc6a5c..623116a 100644
--- a/build/android/pylib/perf/thermal_throttle.py
+++ b/build/android/pylib/perf/thermal_throttle.py
@@ -3,7 +3,8 @@
# found in the LICENSE file.
import logging
-from pylib.device import device_utils
+
+from devil.android import device_utils
class OmapThrottlingDetector(object):
diff --git a/build/android/pylib/remote/device/remote_device_environment.py b/build/android/pylib/remote/device/remote_device_environment.py
index dc11845..e5bfa6a 100644
--- a/build/android/pylib/remote/device/remote_device_environment.py
+++ b/build/android/pylib/remote/device/remote_device_environment.py
@@ -11,12 +11,12 @@ import os
import random
import sys
+from devil.utils import reraiser_thread
+from devil.utils import timeout_retry
from pylib import constants
from pylib.base import environment
from pylib.remote.device import appurify_sanitized
from pylib.remote.device import remote_device_helper
-from pylib.utils import timeout_retry
-from pylib.utils import reraiser_thread
class RemoteDeviceEnvironment(environment.Environment):
"""An environment for running on remote devices."""
diff --git a/build/android/pylib/remote/device/remote_device_helper.py b/build/android/pylib/remote/device/remote_device_helper.py
index 896ae99..1b02207 100644
--- a/build/android/pylib/remote/device/remote_device_helper.py
+++ b/build/android/pylib/remote/device/remote_device_helper.py
@@ -4,7 +4,7 @@
"""Common functions and Exceptions for remote_device_*"""
-from pylib.utils import base_error
+from devil import base_error
class RemoteDeviceError(base_error.BaseError):
diff --git a/build/android/pylib/remote/device/remote_device_instrumentation_test_run.py b/build/android/pylib/remote/device/remote_device_instrumentation_test_run.py
index c03bb65..1af7a8f 100644
--- a/build/android/pylib/remote/device/remote_device_instrumentation_test_run.py
+++ b/build/android/pylib/remote/device/remote_device_instrumentation_test_run.py
@@ -8,10 +8,10 @@ import logging
import os
import tempfile
+from devil.android import apk_helper
from pylib import constants
from pylib.base import base_test_result
from pylib.remote.device import remote_device_test_run
-from pylib.utils import apk_helper
class RemoteDeviceInstrumentationTestRun(
diff --git a/build/android/pylib/remote/device/remote_device_test_run.py b/build/android/pylib/remote/device/remote_device_test_run.py
index b82b06a..df70a96 100644
--- a/build/android/pylib/remote/device/remote_device_test_run.py
+++ b/build/android/pylib/remote/device/remote_device_test_run.py
@@ -14,13 +14,12 @@ import tempfile
import time
import zipfile
-
+from devil.utils import zip_utils
from pylib.base import base_test_result
from pylib.base import test_run
from pylib.remote.device import appurify_constants
from pylib.remote.device import appurify_sanitized
from pylib.remote.device import remote_device_helper
-from pylib.utils import zip_utils
_DEVICE_OFFLINE_RE = re.compile('error: device not found')
_LONG_MSG_RE = re.compile('longMsg=')
diff --git a/build/android/pylib/results/flakiness_dashboard/results_uploader.py b/build/android/pylib/results/flakiness_dashboard/results_uploader.py
index b86d7ac..965ddcf 100644
--- a/build/android/pylib/results/flakiness_dashboard/results_uploader.py
+++ b/build/android/pylib/results/flakiness_dashboard/results_uploader.py
@@ -12,7 +12,7 @@ import tempfile
import xml
-from pylib import cmd_helper
+from devil.utils import cmd_helper
from pylib import constants
from pylib.results.flakiness_dashboard import json_results_generator
from pylib.utils import repo_utils
diff --git a/build/android/pylib/screenshot.py b/build/android/pylib/screenshot.py
index b04e735..793aa91 100644
--- a/build/android/pylib/screenshot.py
+++ b/build/android/pylib/screenshot.py
@@ -7,11 +7,9 @@ import os
import tempfile
import time
-from pylib import cmd_helper
-from pylib import device_signal
-from pylib.device import device_errors
-
-import pylib.device.device_utils
+from devil.android import device_errors
+from devil.android import device_signal
+from devil.utils import cmd_helper
class VideoRecorder(object):
diff --git a/build/android/pylib/uiautomator/test_runner.py b/build/android/pylib/uiautomator/test_runner.py
index bda6687..a2d002b 100644
--- a/build/android/pylib/uiautomator/test_runner.py
+++ b/build/android/pylib/uiautomator/test_runner.py
@@ -4,9 +4,9 @@
"""Class for running uiautomator tests on a single device."""
+from devil.android.sdk import intent
from pylib import constants
from pylib import flag_changer
-from pylib.device import intent
from pylib.instrumentation import test_options as instr_test_options
from pylib.instrumentation import test_runner as instr_test_runner
diff --git a/build/android/pylib/uirobot/uirobot_test_instance.py b/build/android/pylib/uirobot/uirobot_test_instance.py
index e3f6eb7..584c4dd 100644
--- a/build/android/pylib/uirobot/uirobot_test_instance.py
+++ b/build/android/pylib/uirobot/uirobot_test_instance.py
@@ -6,9 +6,9 @@ import os
import json
import logging
+from devil.android import apk_helper
from pylib import constants
from pylib.base import test_instance
-from pylib.utils import apk_helper
class UirobotTestInstance(test_instance.TestInstance):
diff --git a/build/android/pylib/utils/emulator.py b/build/android/pylib/utils/emulator.py
index c614d0d..162bcb8 100644
--- a/build/android/pylib/utils/emulator.py
+++ b/build/android/pylib/utils/emulator.py
@@ -14,13 +14,12 @@ import signal
import subprocess
import time
-# TODO(craigdh): Move these pylib dependencies to pylib/utils/.
-from pylib import cmd_helper
+from devil.android import device_errors
+from devil.android import device_utils
+from devil.android.sdk import adb_wrapper
+from devil.utils import cmd_helper
from pylib import constants
from pylib import pexpect
-from pylib.device import adb_wrapper
-from pylib.device import device_errors
-from pylib.device import device_utils
from pylib.utils import time_profile
import errors
diff --git a/build/android/pylib/utils/findbugs.py b/build/android/pylib/utils/findbugs.py
index 6ad856f..07b4def 100644
--- a/build/android/pylib/utils/findbugs.py
+++ b/build/android/pylib/utils/findbugs.py
@@ -10,7 +10,7 @@ import shlex
import sys
import xml.dom.minidom
-from pylib import cmd_helper
+from devil.utils import cmd_helper
from pylib import constants
diff --git a/build/android/pylib/utils/isolator.py b/build/android/pylib/utils/isolator.py
index b9a222d..20b5407 100644
--- a/build/android/pylib/utils/isolator.py
+++ b/build/android/pylib/utils/isolator.py
@@ -8,7 +8,7 @@ import os
import shutil
import sys
-from pylib import cmd_helper
+from devil.utils import cmd_helper
from pylib import constants
diff --git a/build/android/pylib/utils/proguard.py b/build/android/pylib/utils/proguard.py
index 99d5e26..91ded99 100644
--- a/build/android/pylib/utils/proguard.py
+++ b/build/android/pylib/utils/proguard.py
@@ -6,8 +6,8 @@ import os
import re
import tempfile
+from devil.utils import cmd_helper
from pylib import constants
-from pylib import cmd_helper
_PROGUARD_CLASS_RE = re.compile(r'\s*?- Program class:\s*([\S]+)$')
diff --git a/build/android/pylib/utils/repo_utils.py b/build/android/pylib/utils/repo_utils.py
index e0c7d2c..5a0efa8 100644
--- a/build/android/pylib/utils/repo_utils.py
+++ b/build/android/pylib/utils/repo_utils.py
@@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-from pylib import cmd_helper
+from devil.utils import cmd_helper
def GetGitHeadSHA1(in_directory):
diff --git a/build/android/pylib/utils/test_environment.py b/build/android/pylib/utils/test_environment.py
index 9fc8ee5..5976755 100644
--- a/build/android/pylib/utils/test_environment.py
+++ b/build/android/pylib/utils/test_environment.py
@@ -6,8 +6,8 @@ import logging
import psutil
import signal
-from pylib.device import device_errors
-from pylib.device import device_utils
+from devil.android import device_errors
+from devil.android import device_utils
def _KillWebServers():
diff --git a/build/android/pylib/valgrind_tools.py b/build/android/pylib/valgrind_tools.py
index 8e34adf..2ecaa19 100644
--- a/build/android/pylib/valgrind_tools.py
+++ b/build/android/pylib/valgrind_tools.py
@@ -28,8 +28,8 @@ import os.path
import subprocess
import sys
+from devil.android import device_errors
from pylib.constants import DIR_SOURCE_ROOT
-from pylib.device import device_errors
def SetChromeTimeoutScale(device, scale):
diff --git a/build/android/screenshot.py b/build/android/screenshot.py
index b52b706..b039796 100755
--- a/build/android/screenshot.py
+++ b/build/android/screenshot.py
@@ -11,10 +11,10 @@ import optparse
import os
import sys
+from devil.android import device_blacklist
+from devil.android import device_errors
+from devil.android import device_utils
from pylib import screenshot
-from pylib.device import device_blacklist
-from pylib.device import device_errors
-from pylib.device import device_utils
def _PrintMessage(heading, eol='\n'):
sys.stdout.write('%s%s' % (heading, eol))
diff --git a/build/android/test_runner.py b/build/android/test_runner.py
index 8bae397..204c81c 100755
--- a/build/android/test_runner.py
+++ b/build/android/test_runner.py
@@ -16,17 +16,22 @@ import sys
import threading
import unittest
+from devil import base_error
+from devil.android import apk_helper
+from devil.android import device_blacklist
+from devil.android import device_errors
+from devil.android import device_utils
+from devil.android import ports
+from devil.utils import reraiser_thread
+from devil.utils import run_tests_helper
+
from pylib import constants
from pylib import forwarder
-from pylib import ports
from pylib.base import base_test_result
from pylib.base import environment_factory
from pylib.base import test_dispatcher
from pylib.base import test_instance_factory
from pylib.base import test_run_factory
-from pylib.device import device_blacklist
-from pylib.device import device_errors
-from pylib.device import device_utils
from pylib.gtest import gtest_config
# TODO(jbudorick): Remove this once we stop selectively enabling platform mode.
from pylib.gtest import gtest_test_instance
@@ -47,10 +52,6 @@ from pylib.results import json_results
from pylib.results import report_results
from pylib.uiautomator import setup as uiautomator_setup
from pylib.uiautomator import test_options as uiautomator_test_options
-from pylib.utils import apk_helper
-from pylib.utils import base_error
-from pylib.utils import reraiser_thread
-from pylib.utils import run_tests_helper
def AddCommonOptions(parser):
diff --git a/build/android/tombstones.py b/build/android/tombstones.py
index a3eb2c8..b1c79d3 100755
--- a/build/android/tombstones.py
+++ b/build/android/tombstones.py
@@ -19,11 +19,11 @@ import subprocess
import sys
import optparse
-from pylib.device import adb_wrapper
-from pylib.device import device_blacklist
-from pylib.device import device_errors
-from pylib.device import device_utils
-from pylib.utils import run_tests_helper
+from devil.android import device_blacklist
+from devil.android import device_errors
+from devil.android import device_utils
+from devil.android.sdk import adb_wrapper
+from devil.utils import run_tests_helper
_TZ_UTC = {'TZ': 'UTC'}
diff --git a/build/android/update_verification.py b/build/android/update_verification.py
index 72d156d..c73a061 100755
--- a/build/android/update_verification.py
+++ b/build/android/update_verification.py
@@ -31,11 +31,11 @@ import sys
import time
from pylib import constants
-from pylib.device import device_blacklist
-from pylib.device import device_errors
-from pylib.device import device_utils
-from pylib.utils import apk_helper
-from pylib.utils import run_tests_helper
+from devil.android import apk_helper
+from devil.android import device_blacklist
+from devil.android import device_errors
+from devil.android import device_utils
+from devil.utils import run_tests_helper
def CreateAppData(device, old_apk, app_data, package_name):
device.Install(old_apk)
diff --git a/tools/telemetry/telemetry/internal/app/android_app_unittest.py b/tools/telemetry/telemetry/internal/app/android_app_unittest.py
index 673c83a..f63b2e0 100644
--- a/tools/telemetry/telemetry/internal/app/android_app_unittest.py
+++ b/tools/telemetry/telemetry/internal/app/android_app_unittest.py
@@ -12,7 +12,7 @@ from telemetry.internal.backends import android_app_backend
from telemetry.internal.platform import android_device
from telemetry.testing import options_for_unittests
-from pylib.device import intent
+from devil.android.sdk import intent
class AndroidAppTest(unittest.TestCase):
diff --git a/tools/telemetry/telemetry/internal/app/android_process.py b/tools/telemetry/telemetry/internal/app/android_process.py
index 190f584..0b0dee9 100644
--- a/tools/telemetry/telemetry/internal/app/android_process.py
+++ b/tools/telemetry/telemetry/internal/app/android_process.py
@@ -6,7 +6,7 @@ from telemetry.internal.backends.chrome_inspector import devtools_client_backend
from telemetry.internal.browser import web_contents
try:
- from pylib import ports
+ from devil.android import ports
except ImportError:
ports = None
diff --git a/tools/telemetry/telemetry/internal/backends/android_command_line_backend.py b/tools/telemetry/telemetry/internal/backends/android_command_line_backend.py
index e9a0dc0..6301831 100644
--- a/tools/telemetry/telemetry/internal/backends/android_command_line_backend.py
+++ b/tools/telemetry/telemetry/internal/backends/android_command_line_backend.py
@@ -6,7 +6,7 @@ import logging
import pipes
import sys
-from pylib.device import device_errors # pylint: disable=F0401
+from devil.android import device_errors # pylint: disable=F0401
def _QuoteIfNeeded(arg):
diff --git a/tools/telemetry/telemetry/internal/backends/android_command_line_backend_unittest.py b/tools/telemetry/telemetry/internal/backends/android_command_line_backend_unittest.py
index 4acbb0d..7f92519 100644
--- a/tools/telemetry/telemetry/internal/backends/android_command_line_backend_unittest.py
+++ b/tools/telemetry/telemetry/internal/backends/android_command_line_backend_unittest.py
@@ -9,7 +9,7 @@ from telemetry import decorators
from telemetry.internal.backends import android_command_line_backend
from telemetry.testing import options_for_unittests
-from pylib.device import device_utils
+from devil.android import device_utils
class _MockBackendSettings(object):
diff --git a/tools/telemetry/telemetry/internal/backends/chrome/android_browser_backend.py b/tools/telemetry/telemetry/internal/backends/chrome/android_browser_backend.py
index def73b7..177268a 100644
--- a/tools/telemetry/telemetry/internal/backends/chrome/android_browser_backend.py
+++ b/tools/telemetry/telemetry/internal/backends/chrome/android_browser_backend.py
@@ -14,7 +14,7 @@ from telemetry.internal.backends import browser_backend
from telemetry.internal.backends.chrome import chrome_browser_backend
from telemetry.internal import forwarders
-from pylib.device import intent
+from devil.android.sdk import intent
class AndroidBrowserBackend(chrome_browser_backend.ChromeBrowserBackend):
diff --git a/tools/telemetry/telemetry/internal/backends/chrome/android_browser_finder.py b/tools/telemetry/telemetry/internal/backends/chrome/android_browser_finder.py
index afc51e4..faf3e38 100644
--- a/tools/telemetry/telemetry/internal/backends/chrome/android_browser_finder.py
+++ b/tools/telemetry/telemetry/internal/backends/chrome/android_browser_finder.py
@@ -18,7 +18,7 @@ from telemetry.internal.browser import browser
from telemetry.internal.browser import possible_browser
from telemetry.internal.platform import android_device
-from pylib.utils import apk_helper
+from devil.android import apk_helper
CHROME_PACKAGE_NAMES = {
diff --git a/tools/telemetry/telemetry/internal/backends/chrome/android_browser_finder_unittest.py b/tools/telemetry/telemetry/internal/backends/chrome/android_browser_finder_unittest.py
index 9fd5b3b..2497207 100644
--- a/tools/telemetry/telemetry/internal/backends/chrome/android_browser_finder_unittest.py
+++ b/tools/telemetry/telemetry/internal/backends/chrome/android_browser_finder_unittest.py
@@ -26,7 +26,7 @@ class AndroidBrowserFinderTest(unittest.TestCase):
# Mock out what's needed for testing with exact APKs
self._android_browser_finder_stub = system_stub.Override(
android_browser_finder, ['os'])
- self._patcher = mock.patch('pylib.utils.apk_helper.GetPackageName')
+ self._patcher = mock.patch('devil.android.apk_helper.GetPackageName')
self._get_package_name_mock = self._patcher.start()
diff --git a/tools/telemetry/telemetry/internal/backends/mandoline/android.py b/tools/telemetry/telemetry/internal/backends/mandoline/android.py
index 0a799c3..fda9a00 100644
--- a/tools/telemetry/telemetry/internal/backends/mandoline/android.py
+++ b/tools/telemetry/telemetry/internal/backends/mandoline/android.py
@@ -17,11 +17,11 @@ import time
from .paths import Paths
+from devil import base_error
+from devil.android import apk_helper
+from devil.android import device_errors
+from devil.android import device_utils
from pylib import constants
-from pylib.device import device_errors
-from pylib.device import device_utils
-from pylib.utils import base_error
-from pylib.utils import apk_helper
# Tags used by the mojo shell application logs.
diff --git a/tools/telemetry/telemetry/internal/backends/mandoline/android_mandoline_finder.py b/tools/telemetry/telemetry/internal/backends/mandoline/android_mandoline_finder.py
index 40aa4b5..9777e2d 100644
--- a/tools/telemetry/telemetry/internal/backends/mandoline/android_mandoline_finder.py
+++ b/tools/telemetry/telemetry/internal/backends/mandoline/android_mandoline_finder.py
@@ -13,7 +13,7 @@ from telemetry.internal.browser import possible_browser
from telemetry.internal.platform import android_device
from telemetry.internal.util import path
-from pylib.utils import apk_helper
+from devil.android import apk_helper
class PossibleAndroidMandolineBrowser(possible_browser.PossibleBrowser):
diff --git a/tools/telemetry/telemetry/internal/forwarders/android_forwarder.py b/tools/telemetry/telemetry/internal/forwarders/android_forwarder.py
index c21db59..4e27e1b 100644
--- a/tools/telemetry/telemetry/internal/forwarders/android_forwarder.py
+++ b/tools/telemetry/telemetry/internal/forwarders/android_forwarder.py
@@ -21,8 +21,8 @@ try:
except ImportError:
forwarder = None
-from pylib.device import device_errors
-from pylib.device import device_utils
+from devil.android import device_errors
+from devil.android import device_utils
class AndroidForwarderFactory(forwarders.ForwarderFactory):
diff --git a/tools/telemetry/telemetry/internal/platform/android_device.py b/tools/telemetry/telemetry/internal/platform/android_device.py
index ebcc1dc..20608639 100644
--- a/tools/telemetry/telemetry/internal/platform/android_device.py
+++ b/tools/telemetry/telemetry/internal/platform/android_device.py
@@ -10,10 +10,10 @@ from telemetry.core import util
from telemetry.internal.platform import device
from telemetry.internal.platform.profiler import monsoon
+from devil.android import device_blacklist
+from devil.android import device_errors
+from devil.android import device_utils
from pylib import constants
-from pylib.device import device_blacklist
-from pylib.device import device_errors
-from pylib.device import device_utils
class AndroidDevice(device.Device):
diff --git a/tools/telemetry/telemetry/internal/platform/android_device_unittest.py b/tools/telemetry/telemetry/internal/platform/android_device_unittest.py
index 9788af9..f953b30 100644
--- a/tools/telemetry/telemetry/internal/platform/android_device_unittest.py
+++ b/tools/telemetry/telemetry/internal/platform/android_device_unittest.py
@@ -9,13 +9,13 @@ from telemetry.internal.platform import android_device
from telemetry.testing import system_stub
import mock
-from pylib.device import device_utils
+from devil.android import device_utils
class _BaseAndroidDeviceTest(unittest.TestCase):
def setUp(self):
self._healthy_device_patcher = mock.patch(
- 'pylib.device.device_utils.DeviceUtils.HealthyDevices')
+ 'devil.android.device_utils.DeviceUtils.HealthyDevices')
self._healthy_device_mock = self._healthy_device_patcher.start()
self._android_device_stub = system_stub.Override(
android_device, ['subprocess', 'logging'])
diff --git a/tools/telemetry/telemetry/internal/platform/android_platform_backend.py b/tools/telemetry/telemetry/internal/platform/android_platform_backend.py
index 124d9b9..b40b54f 100644
--- a/tools/telemetry/telemetry/internal/platform/android_platform_backend.py
+++ b/tools/telemetry/telemetry/internal/platform/android_platform_backend.py
@@ -35,13 +35,12 @@ import adb_install_cert
import certutils
import platformsettings
+from devil.android import battery_utils
+from devil.android import device_errors
+from devil.android import device_utils
from devil.android.sdk import version_codes
-
from pylib import constants
from pylib import screenshot
-from pylib.device import battery_utils
-from pylib.device import device_errors
-from pylib.device import device_utils
from pylib.perf import cache_control
from pylib.perf import perf_control
from pylib.perf import thermal_throttle
@@ -453,7 +452,7 @@ class AndroidPlatformBackend(
def PathExists(self, device_path, timeout=None, retries=None):
""" Return whether the given path exists on the device.
This method is the same as
- android.pylib.device.device_utils.DeviceUtils.PathExists.
+ devil.android.device_utils.DeviceUtils.PathExists.
"""
return self._device.PathExists(
device_path, timeout=timeout, retries=retries)
diff --git a/tools/telemetry/telemetry/internal/platform/android_platform_backend_unittest.py b/tools/telemetry/telemetry/internal/platform/android_platform_backend_unittest.py
index 8849a0d..84edc5c 100644
--- a/tools/telemetry/telemetry/internal/platform/android_platform_backend_unittest.py
+++ b/tools/telemetry/telemetry/internal/platform/android_platform_backend_unittest.py
@@ -11,8 +11,8 @@ from telemetry.testing import options_for_unittests
from telemetry.testing import system_stub
import mock
-from pylib.device import battery_utils
-from pylib.device import device_utils
+from devil.android import battery_utils
+from devil.android import device_utils
class AndroidPlatformBackendTest(unittest.TestCase):
def setUp(self):
@@ -57,7 +57,7 @@ class AndroidPlatformBackendTest(unittest.TestCase):
'4294967295 1074458624 1074463824 3197495984 3197494152 '
'1074767676 0 4612 0 38136 4294967295 0 0 17 0 0 0 0 0 0 '
'1074470376 1074470912 1102155776\n')
- with mock.patch('pylib.device.device_utils.DeviceUtils.ReadFile',
+ with mock.patch('devil.android.device_utils.DeviceUtils.ReadFile',
return_value=proc_stat_content):
backend = android_platform_backend.AndroidPlatformBackend(
android_device.AndroidDevice('12345'), self._options)
@@ -67,7 +67,7 @@ class AndroidPlatformBackendTest(unittest.TestCase):
@decorators.Disabled('chromeos')
def testGetCpuStatsInvalidPID(self):
# Mock an empty /proc/pid/stat.
- with mock.patch('pylib.device.device_utils.DeviceUtils.ReadFile',
+ with mock.patch('devil.android.device_utils.DeviceUtils.ReadFile',
return_value=''):
backend = android_platform_backend.AndroidPlatformBackend(
android_device.AndroidDevice('1234'), self._options)
@@ -217,7 +217,7 @@ class AndroidPlatformBackendPsutilTest(unittest.TestCase):
android_platform_backend.psutil = psutil
# Mock an empty /proc/pid/stat.
- with mock.patch('pylib.device.device_utils.DeviceUtils.ReadFile',
+ with mock.patch('devil.android.device_utils.DeviceUtils.ReadFile',
return_value=''):
backend = android_platform_backend.AndroidPlatformBackend(
android_device.AndroidDevice('1234'), self._options)
@@ -231,7 +231,7 @@ class AndroidPlatformBackendPsutilTest(unittest.TestCase):
android_platform_backend.psutil = psutil
# Mock an empty /proc/pid/stat.
- with mock.patch('pylib.device.device_utils.DeviceUtils.ReadFile',
+ with mock.patch('devil.android.device_utils.DeviceUtils.ReadFile',
return_value=''):
backend = android_platform_backend.AndroidPlatformBackend(
android_device.AndroidDevice('1234'), self._options)
diff --git a/tools/telemetry/telemetry/internal/platform/power_monitor/android_temperature_monitor.py b/tools/telemetry/telemetry/internal/platform/power_monitor/android_temperature_monitor.py
index d94f698..436dac4 100644
--- a/tools/telemetry/telemetry/internal/platform/power_monitor/android_temperature_monitor.py
+++ b/tools/telemetry/telemetry/internal/platform/power_monitor/android_temperature_monitor.py
@@ -5,7 +5,7 @@
from telemetry.internal.platform import power_monitor
try:
- from pylib.device import device_errors # pylint: disable=F0401
+ from devil.android import device_errors # pylint: disable=F0401
except ImportError:
device_errors = None
diff --git a/tools/telemetry/telemetry/internal/platform/power_monitor/power_monitor_controller_unittest.py b/tools/telemetry/telemetry/internal/platform/power_monitor/power_monitor_controller_unittest.py
index 4a1ccfc..c0f6b87 100644
--- a/tools/telemetry/telemetry/internal/platform/power_monitor/power_monitor_controller_unittest.py
+++ b/tools/telemetry/telemetry/internal/platform/power_monitor/power_monitor_controller_unittest.py
@@ -7,7 +7,7 @@ import unittest
from telemetry.internal.platform import power_monitor as power_monitor
from telemetry.internal.platform.power_monitor import power_monitor_controller
import mock
-from pylib.device import battery_utils # pylint: disable=import-error
+from devil.android import battery_utils # pylint: disable=import-error
class PowerMonitorControllerTest(unittest.TestCase):
diff --git a/tools/telemetry/telemetry/internal/platform/profiler/android_profiling_helper.py b/tools/telemetry/telemetry/internal/platform/profiler/android_profiling_helper.py
index b78a75d..9ad2e01 100644
--- a/tools/telemetry/telemetry/internal/platform/profiler/android_profiling_helper.py
+++ b/tools/telemetry/telemetry/internal/platform/profiler/android_profiling_helper.py
@@ -17,7 +17,7 @@ from telemetry.core import util
from telemetry import decorators
from telemetry.internal.platform.profiler import android_prebuilt_profiler_helper
-from pylib.utils import md5sum # pylint: disable=F0401
+from devil.android import md5sum # pylint: disable=F0401
try:
diff --git a/tools/telemetry/telemetry/internal/platform/profiler/android_traceview_profiler.py b/tools/telemetry/telemetry/internal/platform/profiler/android_traceview_profiler.py
index eec4ff9..17d63f1 100644
--- a/tools/telemetry/telemetry/internal/platform/profiler/android_traceview_profiler.py
+++ b/tools/telemetry/telemetry/internal/platform/profiler/android_traceview_profiler.py
@@ -10,7 +10,7 @@ from telemetry.internal.backends.chrome import android_browser_finder
from telemetry.internal.platform import profiler
try:
- from pylib.device import device_errors # pylint: disable=F0401
+ from devil.android import device_errors # pylint: disable=F0401
except ImportError:
device_errors = None
diff --git a/tools/telemetry/telemetry/internal/platform/profiler/java_heap_profiler.py b/tools/telemetry/telemetry/internal/platform/profiler/java_heap_profiler.py
index 602b59e..da81244 100644
--- a/tools/telemetry/telemetry/internal/platform/profiler/java_heap_profiler.py
+++ b/tools/telemetry/telemetry/internal/platform/profiler/java_heap_profiler.py
@@ -12,8 +12,8 @@ from telemetry.internal.backends.chrome import android_browser_finder
from telemetry.internal.platform import profiler
try:
+ from devil.android import device_errors # pylint: disable=F0401
from pylib import constants # pylint: disable=F0401
- from pylib.device import device_errors # pylint: disable=F0401
except ImportError:
constants = None
device_errors = None
diff --git a/tools/telemetry/telemetry/internal/platform/profiler/oomkiller_profiler.py b/tools/telemetry/telemetry/internal/platform/profiler/oomkiller_profiler.py
index 9c80ee2..614fccb 100644
--- a/tools/telemetry/telemetry/internal/platform/profiler/oomkiller_profiler.py
+++ b/tools/telemetry/telemetry/internal/platform/profiler/oomkiller_profiler.py
@@ -8,7 +8,7 @@ from telemetry.internal.util import binary_manager
from telemetry.internal.backends.chrome import android_browser_finder
from telemetry.internal.platform import profiler
-from pylib.device import intent # pylint: disable=F0401
+from devil.android.sdk import intent # pylint: disable=F0401
class UnableToFindApplicationException(Exception):
"""Exception when unable to find a launched application"""
diff --git a/tools/telemetry/telemetry/internal/platform/profiler/perf_profiler.py b/tools/telemetry/telemetry/internal/platform/profiler/perf_profiler.py
index b582c28..353435e 100644
--- a/tools/telemetry/telemetry/internal/platform/profiler/perf_profiler.py
+++ b/tools/telemetry/telemetry/internal/platform/profiler/perf_profiler.py
@@ -10,7 +10,7 @@ import subprocess
import sys
import tempfile
-from pylib.device import device_errors # pylint: disable=F0401
+from devil.android import device_errors # pylint: disable=F0401
from telemetry.internal.util import binary_manager
from telemetry.core import platform
diff --git a/tools/telemetry/telemetry/internal/platform/profiler/screenshot.py b/tools/telemetry/telemetry/internal/platform/profiler/screenshot.py
index 097739f..a1085d8 100755
--- a/tools/telemetry/telemetry/internal/platform/profiler/screenshot.py
+++ b/tools/telemetry/telemetry/internal/platform/profiler/screenshot.py
@@ -11,9 +11,9 @@ import optparse
import os
import sys
+from devil.android import device_errors
+from devil.android import device_utils
from pylib import screenshot
-from pylib.device import device_errors
-from pylib.device import device_utils
def _PrintMessage(heading, eol='\n'):
sys.stdout.write('%s%s' % (heading, eol))
diff --git a/tools/telemetry/telemetry/internal/platform/tracing_agent/chrome_tracing_agent_unittest.py b/tools/telemetry/telemetry/internal/platform/tracing_agent/chrome_tracing_agent_unittest.py
index 34c3327..d692107 100644
--- a/tools/telemetry/telemetry/internal/platform/tracing_agent/chrome_tracing_agent_unittest.py
+++ b/tools/telemetry/telemetry/internal/platform/tracing_agent/chrome_tracing_agent_unittest.py
@@ -14,7 +14,7 @@ from telemetry.timeline import tracing_category_filter
from telemetry.timeline import tracing_config
from telemetry.timeline import tracing_options
-from pylib.device import device_utils
+from devil.android import device_utils
class FakePlatformBackend(object):