Update Android System WebView on SDK Emulator

10.4k views Asked by At

I have a problem with my cordova app after the latest Android System WebView update (44.0.2403.39) on Android 5.x devices.

I would like to update the replicate the problem on the SDK Emulator. But the standard image of Android 5.1 comes with the WebView version 39.

Is there any way to update this component on the emulator?

I've found the APK for the update here but after installing it shows two entries on the App list on System Settings and it's not updating. So I can't replicate the problem.

Two System WebView

The first one is the view that comes with the emulator v39 and the second one is the v44

  • Also is there any way to modify the system files on the emulator to update it manually?
  • Or a programatically way to change Webview with adb shell?
1

There are 1 answers

3
Mikhail Naganov On BEST ANSWER

Did you try the M preview SDK? It contains WebView 44.

And while we are here, some more background:

  • WebView in Android AOSP (which comes with the SDK) and WebView in Android GMS (Google-branded devices) are different packages, and the OS is wired to use the corresponding package. Thus, even though it's possible to install these apks criss-cross on a different OS flavour, they will not work there.

  • WebView is updated via Play Store, which only exists on GMS devices, not on the emulator. So the AOSP version can only be updated manually.

  • But besides these package name differences, both WebView AOSP and WebView GMS are essentially the same.

  • You can even build WebView AOSP yourself. Although, this will require a beefy Linux machine to pull out.