6

I have an Android 6 device, where I have full root access. On this device, we are using an app which basically uses a WebView to display a website. The app is installed as a privileged system app. It is working good, however the webview-version on the stock device has a few bugs and we would like to upgrade to a more recent version.

I could update system.android.webview via Google Play, but due to the number of devices that need to be udpated this is not a viable solution.

So my question is: How can I update the system webview on android 6 without google playstore? I need a way to extract the updated app from one device and install it on another without Google Play.

Ideally, we want to install without internet access but over adb so that we could script it easily for reliable installation on a larger number of devices.

The method suggested here for Android 5.1 seems to not work anymore on Android 6.

5
  • This is my answer. It's working on 6.
    – iBug
    Commented Jun 7, 2017 at 14:04
  • /data/app/com.google.android.webview does not exist on my devices, could you give me a hint where to find the apk on the updated device?
    – MaSiMan
    Commented Jun 7, 2017 at 14:48
  • I assume just copying over the .apk and trying to install it as a normal app doesn't work? Commented Jun 8, 2017 at 6:39
  • @AnishMajumder: I tried installing the apk via adb install -r .... Installation was successful, but my app could no longer instantiante the WebView, the causing exception seen in logcat was 06-08 10:20:39.878 3467 3467 E WebViewFactory: Caused by: java.lang.RuntimeException: Cannot load WebView 06-08 10:20:39.878 3467 3467 E WebViewFactory: at com.android.webview.chromium.WebViewChromiumFactoryProvider.initialize(WebViewChromiumFactoryProvider.java:5068)
    – MaSiMan
    Commented Jun 8, 2017 at 8:28
  • @iBug I could actually make a slightly extended version of your answer work. I took /data/app/com.google.android.webview-1 from a device updated via play store and put it on the new device. To make it use the updated webview, I had to remove /system/app/WebViewGoogle/. Do you want to put this as an answer here?
    – MaSiMan
    Commented Jun 13, 2017 at 7:46

1 Answer 1

1

If you don't mind factory resetting your phone, you can try to unlock your phone's bootloader, flash TWRP Recovery and then install Open GApps, which installs/reinstalls Google apps and can give you ones that you cannot get from Google play. Disclaimer:- I am not responsible for what may happen to your device during this process. It installs WebView with it (if selected) and can remove stock (AOSP) Apps (Your default WebView). If it does not work you can still flash SuperSU and uninstall the system app. -Daniel ✓

Edit: Since you already have full root access, you can try to uninstall WebView and install a fresh one from the web. Just be sure to download one prior to uninstalling.

1
  • Thanks for the answer, this sounds interesting! The main point, however, (and I realize that I did not point that out in the question), is that the ideal solution would work without internet access but over adb so that we could script it easily for reliable installation on a larger number of devices. I will update the question accordingly.
    – MaSiMan
    Commented Jun 9, 2017 at 9:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .