Custom Chromium webview provider in AOSP 9.0

598 views
Skip to first unread message

d...@vittegleo.com

unread,
Aug 14, 2018, 12:12:05 AM8/14/18
to android-webview-dev
I'm was successfully building AOSP 8.1 with the stable version of Chromium 'monochrome_public_apk' target and replacing the standard AOSP webview with Chromium webview. To do this I was:

* Building Chromium the monochrome_public_apk target with this configuration:
target_os = "android"
target_cpu = "arm64"
is_debug = false

is_official_build = true
is_component_build = false
symbol_level = 0

ffmpeg_branding = "Chrome"
proprietary_codecs = true

android_channel = "stable"
android_default_version_name = "68.0.3440.81"
android_default_version_code = "344008152"

* Replacing the AOSP webview with Chromium in frameworks/base/core/res/res/xml/config_webview_packages.xml:
<?xml version="1.0" encoding="utf-8"?>
<webviewproviders>
    <webviewprovider description="Chromium" packageName="org.chromium.chrome" availableByDefault="true">
    </webviewprovider>
</webviewproviders>

* And including it in the AOSP build tree with this Android.mk file:
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE := chromium
LOCAL_MODULE_CLASS := APPS
LOCAL_MULTILIB := both
LOCAL_CERTIFICATE := $(DEFAULT_SYSTEM_DEV_CERTIFICATE)
LOCAL_REQUIRED_MODULES := \
        libwebviewchromium_loader \
        libwebviewchromium_plat_support

LOCAL_MODULE_TARGET_ARCH := arm64
my_src_arch := $(call get-prebuilt-src-arch,$(LOCAL_MODULE_TARGET_ARCH))
LOCAL_SRC_FILES := prebuilt/$(my_src_arch)/MonochromePublic.apk

This process worked fine in AOSP 8.1, but for some reason the Chromium webview is no longer being registered in 9.0. Chromium is still showing up as an installed application, but it is just not registering as a webview. Any ideas?


Bo Liu

unread,
Aug 14, 2018, 12:33:50 AM8/14/18
to d...@vittegleo.com, android-webview-dev
You are building M68? P support was upstreamed in M69. See history here: crbug.com/850652

--
You received this message because you are subscribed to the Google Groups "android-webview-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-webview...@chromium.org.
To post to this group, send email to android-w...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/android-webview-dev/86a81e43-b0fc-423a-8250-06d253cd02c6%40chromium.org.

d...@vittegleo.com

unread,
Aug 14, 2018, 12:38:20 AM8/14/18
to android-webview-dev, d...@vittegleo.com, bo...@chromium.org
Thanks so much for the reply and link to this bug Bo! I'm kicking off a build with M69 and will see if that solves the issue for me.
To unsubscribe from this group and stop receiving emails from it, send an email to android-webview-dev+unsub...@chromium.org.

d...@vittegleo.com

unread,
Aug 14, 2018, 5:01:31 PM8/14/18
to android-webview-dev, d...@vittegleo.com, bo...@chromium.org
Works again on M69! Thanks Bo!
Reply all
Reply to author
Forward
0 new messages