Android - Android system Webview installed but not used by apps
You can't change this without root.
The system framework is hard-coded to use a specific package for applications that request a WebView component. By default (in AOSP) it uses the value com.android.webview
, which is the version that is compiled during the AOSP build process. On devices from manufacturers that modify this component, the package name may differ. Regardless, in order to replace the WebView that shipped with your device, you have to modify this value to instead be com.google.android.webview
.
The "by hand" way of doing this would be to pull the framework-res.apk file from your device, de-compile it, and change the value of the config_webViewPackageName
resource variable. It should be located at /res/values/strings.xml
within the .apk. Once you've done this, you would need to re-package everything and push the new .apk to your device, replacing the old one.
An alternative method that you can attempt is to install the Xposed framework and then use the WebViewGoogle module. If you use a custom ROM, you may also be able to find a package that will permanently modify the necessary framework components (or it may be built to use Google's WebView by default).
My hypothesis would be that this restriction exists in part because the system relies on a WebView implementation existing in some form, so if it could be modified by a user it could break the system in odd ways. There would also be security implications to allowing apps to override the system WebView, such as a bad-actor attempting to provide a malicious one without the user knowing.
As a point of further explanation: the reason the System WebView is available in the Play Store to begin with is that Nexus devices (and possibly others) ship with it pre-installed, and configured to use it. It is, in effect, the system WebView for those devices.Thus, Google is able to provide WebView updates for these devices via the Play Store so that full system OTAs are not necessary just to update the browser/WebView. There are other components that Google has migrated to Play Store updating in a similar fashion, with the reasoning essentially being that it is faster. Phone and Contacts were two of the more recent ones, with the linked article providing some additional detail regarding why Google has taken this approach.