Skip to content

neoblackxt/AnyWebView

Repository files navigation

AnyWebView

Any WebView is OK!

Feature

It tries to detect all system webviews and add them to the developer options -> WebView implementation list.

Usage

Android Framework should be selected in LSPosed.

A webview app must be installed for all users (or in all spaces, so-called Dual app, Second space, etc.) to be selectable. Maybe deleting redundant users is alternative. adb command:

Enable "redundant packages" (Maybe it won't work, but that's OK.):

adb shell cmd webviewupdate enable-redundant-packages

Get USER_ID list:

adb shell pm list users

Each user entry is as follow: UserInfo{USER_ID:USERNAME:INT} , USER_ID 0 is the main user.

Install apk for specific USER_ID:

adb install --user USER_ID PATH/TO/APK/ON/COMPUTER

or

adb shell pm install-existing --user USER_ID PACKAGE.NAME.OF.APK (for apks already installed for one user)

or

adb push PATH/TO/APK/ON/COMPUTER PATH/TO/APK/ON/PHONE (copy an apk file to phone from computer)

adb shell pm install --user USER_ID PATH/TO/APK/ON/PHONE

Delete a user (NOT RECOMENDED, be careful, you may lose important data):

adb shell pm remove-user USER_ID

All the adb shell pm ... commands above can be run in an Android terminal simulator(root access granted) as pm ...

Reboot to take effect.

FAQ

Can I set Chrome as the system webview implementation?

Only supported on Android 8-9, not supported on Android 10+. It is Google's policy that Google Chrome app is no longer the WebView provider in Android 10. Even though it is listed in the WebView implementation, it does not work on Android 10+. Related discussion: AnyWebView#12

Is Bromite/Mulch/Vanadium etc. system webview supported?

Yes.

Does the WebView need to be installed as a system app?

No — a normally installed WebView APK is enough. Stock Android treats being a system app merely as a signature-check bypass, not a requirement, and AnyWebView registers each provider with its own signature so it passes validation either way.

Does this still work on Android 17?

It should, in theory. The internal interfaces behind this are unchanged on the AOSP master branch (Android 17) and have been stable since Android 7 — but this is theoretical analysis only, not tested on real hardware. Details: Discussion #31

Learn More (For Developers)

WebView quick start

WebView for AOSP system integrators

WebView Architecture

Installing SystemWebView

android_webview/nonembedded

WebView Providers

WebViewFactory.java

Releases

Used by

Contributors

Languages