English | 简体中文
This library implements the functionality of upgrading the WebView kernel on Android without installation.
The library is integrated into your app and only changes how your app resolves its WebView implementation. It does not replace the system WebView or affect other installed applications.
For vendor builds, architectures, and version metadata (Google, AOSP, Chrome as provider, Huawei, Amazon, etc.), see the companion repository WebViewPackage — it ships webview_packages.json for scripted downloads and CI.
After Android 5.0, upgrading WebView requires installing an APK from Google Play, and even after installation, it may not work as expected. For special device models like Huawei and Amazon, the Chromium version of WebView is generally lower, making it impossible to use Google's WebView instead of the device's own WebView.
I encountered a situation on Huawei devices where H265 video playback was not possible due to the Chromium version of the WebView kernel being lower than 107. To address this issue, H265 playback can be implemented using JavaScript, but this approach may lead to performance issues. At this point, I wondered if WebView could utilize the APK within the application as its kernel. The image below shows the before and after effects of upgrading the WebView kernel:
Before the upgrade, the WebView kernel package name on Huawei devices was com.huawei.webview, with a version of 14.0.0.331. The Chromium version in the UserAgent was actually 99.0.4844.88, as shown in the image below, which does not support H265 playback as it is less than 107:
The demo System environment screen shows the system WebView, installed Chrome, the kernel in use by the host app, upgrade progress, and actions:
Choose / change kernel opens a list with bundled, installed, downloaded, and online sources:
After a successful upgrade, the package name of the WebView kernel changes to com.google.android.webview, and the Chromium version in the UserAgent also changes to 122.0.6261.64:
implementation 'io.github.jonanorman.android.webviewup:core:0.1.0'Everything ships in core — add that dependency only.
There are four UpgradeSource types: UpgradeDownloadSource (HTTP(S) URL), UpgradeFileSource (local .apk file), UpgradeAssetSource (.apk under assets/), UpgradePackageSource (installed package name, e.g. Chrome). Construct one as source, then:
WebViewUpgrade.upgrade(source);Optional: WebViewUpgrade.addUpgradeCallback(...) before upgrade for progress / success / error.
Android devices vary greatly. The following features and device models have been tested. Contributions through issue submissions and Merge Requests to this project are welcomed.
- Multi-process WebView — supported.
- Android 15 and 16 — supported as target / runtime platforms (always validate on your own devices and ROMs).
- Kernel sources — local file (
UpgradeFileSource), assets (UpgradeAssetSource), installed package e.g. Chrome (UpgradePackageSource), or remote URL (UpgradeDownloadSource, included incore).
WebView binds to a provider the first time it is created in the process; switching to another kernel also cannot hot-swap in the same process — restart the app (exit and cold-start) before the new kernel applies. For the first upgrade to take effect without a restart, perform it before any WebView is created (e.g. before the user opens a screen that instantiates WebView). If WebView was already used and you upgrade or switch afterward, fully cold-start the app so the new implementation can take effect.
Only a single, full (monolithic) Chrome APK can be used as the kernel source. Split / multi-APK installs produced by Play app bundles (base + splits) are not supported for this use case — use a standalone full APK matching the archive in WebViewPackage.
| Manufacturer | System Version |
|---|---|
| Huawei Mate30 | 12 |
| Xiaomi 10 | 11 |
| VIVO NEX A | 10 |
| OPPO FIND X5 | 14 |




