android_webview/tools/run_simpleperf.py
def GetWebViewLibraryNameAndPath(self, package_name):
    """Get WebView library name and path on the device."""
    apk_path = self._GetWebViewApkPath(package_name)
    logging.debug('WebView APK path:' + apk_path)
    # TODO(changwan): check if we need support for bundle.
    tmp_apk_path = os.path.join(self.tmp_dir, 'base.apk')
    self.device.adb.Pull(apk_path, tmp_apk_path)
    self.apk_helper = apk_helper.ToHelper(tmp_apk_path)
    metadata = self.apk_helper.GetAllMetadata()
    lib_name = None
    for key, value in metadata:
      if key == 'com.android.webview.WebViewLibrary':
        lib_name = value

    lib_path = os.path.join(apk_path, 'lib', self._GetFormattedArch(), lib_name)
    logging.debug("WebView's library path on the device should be:" + lib_path)
    return lib_name, lib_path
Get WebView library name and path on the device.
Get WebView library name and path on the device.
Get WebView library name and path on the device .
def GetWebViewLibraryNameAndPath(self, package_name):
    apk_path = self._GetWebViewApkPath(package_name)
    logging.debug('WebView APK path:' + apk_path)
    tmp_apk_path = os.path.join(self.tmp_dir, 'base.apk')
    self.device.adb.Pull(apk_path, tmp_apk_path)
    self.apk_helper = apk_helper.ToHelper(tmp_apk_path)
    metadata = self.apk_helper.GetAllMetadata()
    lib_name = None
    for key, value in metadata:
      if key == 'com.android.webview.WebViewLibrary':
        lib_name = value
    lib_path = os.path.join(apk_path, 'lib', self._GetFormattedArch(), lib_name)
    logging.debug("WebView's library path on the device should be:" + lib_path)
    return lib_name, lib_path
def GetWebViewLibraryNameAndPath ( self , package_name ) : apk_path = self . _GetWebViewApkPath ( package_name ) logging . debug ( 'WebView APK path:' + apk_path ) tmp_apk_path = os . path . join ( self . tmp_dir , 'base.apk' ) self . device . adb . Pull ( apk_path , tmp_apk_path ) self . apk_helper = apk_helper . ToHelper ( tmp_apk_path ) metadata = self . apk_helper . GetAllMetadata ( ) lib_name = None for key , value in metadata : if key == 'com.android.webview.WebViewLibrary' : lib_name = value lib_path = os . path . join ( apk_path , 'lib' , self . _GetFormattedArch ( ) , lib_name ) logging . debug ( "WebView's library path on the device should be:" + lib_path ) return lib_name , lib_path
Get WebView library name and path on the device.
Get WebView library name and path on the device .
"""Get WebView library name and path on the device.""" # TODO(changwan): check if we need support for bundle.
self
package_name