Name Description Size
__init__.py 0
app_bundle_utils.py Generate an .apks archive from a an app bundle if needed. Args: bundle_path: Input bundle file path. bundle_apks_path: Output bundle .apks archive path. Name must end with '.apks' or this operation will fail. aapt2_path: Path to aapt2 build tool. keystore_path: Path to keystore. keystore_password: Keystore password, as a string. keystore_alias: Keystore signing key alias. mode: Build mode, which must be either None or one of BUILD_APKS_MODES. minimal: Create the minimal set of apks possible (english-only). minimal_sdk_version: Use this sdkVersion when |minimal| or |system_image_locales| args are present. check_for_noop: Use md5_check to short-circuit when inputs have not changed. system_image_locales: Locales to package in the APK when mode is "system" or "system_compressed". optimize_for: Overrides split configuration, which must be None or one of OPTIMIZE_FOR_OPTIONS. 6716
argparse_utils.py Allows defining custom help actions. Help actions can run even when the parser would otherwise fail on missing arguments. The first help or custom help command mentioned on the command line will have its help text displayed. Usage: parser = argparse.ArgumentParser(...) CustomHelpAction.EnableFor(parser) parser.add_argument('--foo-help', action='custom_help', custom_help_text='this is the help message', help='What this helps with') 1805
chrome_proxy_utils.py Utilities for setting up and tear down WPR and TsProxy service. 5307
chrome_proxy_utils_test.py Tests for chrome_proxy_utils. 9589
decorators.py Decorator to cache return values of function. 1080
decorators_test.py Unit tests for decorators.py. 2869
device_dependencies.py Returns the device path components for a given host path. This returns the device path as a list of joinable path components, with None as the first element to indicate that the path should be rooted at $EXTERNAL_STORAGE. e.g., given '$RUNTIME_DEPS_ROOT_DIR/foo/bar/baz.txt' this would return [None, 'foo', 'bar', 'baz.txt'] This handles a couple classes of paths differently than it otherwise would: - All .pak files get mapped to top-level paks/ - All other dependencies get mapped to the top level directory - If a file is not in the output directory then it's relative path to the output directory will start with .. strings, so we remove those and then the path gets mapped to the top-level directory - If a file is in the output directory then the relative path to the output directory gets mapped to the top-level directory e.g. given '$RUNTIME_DEPS_ROOT_DIR/out/Release/icu_fake_dir/icudtl.dat' this would return [None, 'icu_fake_dir', 'icudtl.dat'] Args: host_path: The absolute path to the host file. Returns: A list of device path components. 4614
device_dependencies_test.py 2058
dexdump.py Dumps class and method information from a APK into a dict via dexdump. Args: apk_path: An absolute path to an APK file to dump. Returns: A dict in the following format: { <package_name>: { 'classes': { <class_name>: { 'methods': [<method_1>, <method_2>] } } } } 4001
dexdump_test.py 3658
gold_utils.py //build/android implementations of //testing/skia_gold_common. Used for interacting with the Skia Gold image diffing service. 3128
gold_utils_test.py Tests for gold_utils. 4964
google_storage_helper.py Helper functions to upload data to Google Storage. Text data should be streamed to logdog using |logdog_helper| module. Due to logdog not having image or HTML viewer, those instead should be uploaded to Google Storage directly using this module. 4385
instrumentation_tracing.py Functions to instrument all Python function calls. This generates a JSON file readable by Chrome's about:tracing. To use it, either call start_instrumenting and stop_instrumenting at the appropriate times, or use the Instrument context manager. A function is only traced if it is from a Python module that matches at least one regular expression object in to_include, and does not match any in to_exclude. In between the start and stop events, every function call of a function from such a module will be added to the trace. 6201
local_utils.py Utilities for determining if a test is being run locally or not. 687
logdog_helper.py Helper functions to upload data to logdog. 2927
logging_utils.py Wraps a |logging.Formatter| and adds color. 4019
maven_downloader.py Downloads and installs the requested artifacts from the Google Maven repo. The artifacts are expected to be specified in the format "group_id:artifact_id:version:file_type", as the default file type is JAR but most Android libraries are provided as AARs, which would otherwise fail downloading. See Install() 4865
proguard.py Dumps class and method information from a JAR into a dict via proguard. Args: jar_path: An absolute path to the JAR file to dump. Returns: A dict in the following format: { 'classes': [ { 'class': '', 'superclass': '', 'annotations': {/* dict -- see below */}, 'methods': [ { 'method': '', 'annotations': {/* dict -- see below */}, }, ... ], }, ... ], } Annotations dict format: { 'empty-annotation-class-name': None, 'annotation-class-name': { 'field': 'primitive-value', 'field': [ 'array-item-1', 'array-item-2', ... ], 'field': { /* Object value */ 'field': 'primitive-value', 'field': [ 'array-item-1', 'array-item-2', ... ], 'field': { /* Object value */ } } } } Note that for top-level annotations their class names are used for identification, whereas for any nested annotations the corresponding field names are used. One drawback of this approach is that an array containing empty annotation classes will be represented as an array of 'None' values, thus it will not be possible to find out annotation class names. On the other hand, storing both annotation class name and the field name would produce a very complex JSON. 9029
proguard_test.py 18265
repo_utils.py Returns the git hash tag for the given directory. Args: in_directory: The directory where git is to be run. 707
shared_preference_utils.py Utility functions for modifying an app's settings file using JSON. 3484
simpleperf.py 9744
test_filter.py Raised when both filter file and filter argument have positive filters. 5184
test_filter_test.py 9216
time_profile.py Class for simple profiling of action, with logging of cost. 1149
xvfb.py Return True if on Linux; else False. 1551