Commit 387c32e3 authored by Sam Maier's avatar Sam Maier Committed by Commit Bot

Allowing Android dex verification script to work with emulators

Bug: 855796
Change-Id: If28592206e8eb5f985600b9932b81885a3baa01d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1634802Reviewed-by: default avatarNate Fischer <ntfschr@chromium.org>
Reviewed-by: default avatarJohn Budorick <jbudorick@chromium.org>
Commit-Queue: Sam Maier <smaier@chromium.org>
Cr-Commit-Position: refs/heads/master@{#665166}
parent 42de53dc
......@@ -95,7 +95,8 @@ def PathToDexForPlatformVersion(device, package_name):
if version_codes.LOLLIPOP <= sdk_level <= version_codes.LOLLIPOP_MR1:
# Of the form "com.example.foo-\d", where \d is some digit (usually 1 or 2)
package_with_suffix = os.path.basename(os.path.dirname(path_to_apk))
dalvik_prefix = '/data/dalvik-cache/arm'
arch = _GetFormattedArch(device)
dalvik_prefix = '/data/dalvik-cache/{arch}'.format(arch=arch)
odex_file = '{prefix}/data@app@{package}@base.apk@classes.dex'.format(
prefix=dalvik_prefix,
package=package_with_suffix)
......@@ -113,7 +114,7 @@ def PathToDexForPlatformVersion(device, package_name):
raise DeviceOSError(
'Unable to find odex file: you must run dex2oat on debuggable apps '
'on >= P after installation.')
raise DeviceOSError('Unable to find odex file')
raise DeviceOSError('Unable to find odex file ' + odex_file)
def _AdbOatDumpForPackage(device, package_name, out_file):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment