Sunday, October 4, 2015

5.1 lollipop - How to update webview without using google playstore?


I have an Android 5.1 device, where I have full root access. For this device I have written a cordova application and installed it as a system app. It is working good, however the webview-version of Android 5.1 is very old and unfortunately has a few bugs.


I know that you can update the webview with the playstore, but unfortunately the device does not have the google apps and therefore I am not able to update the webview with the playstore.


So my question is: How can I update the system webview without google playstore?


I already tried it with a rather naive approach, which unfortunately killed my application:



I have downloaded the latest webview.apk from the playstore (https://play.google.com/store/apps/details?id=com.google.android.webview&hl=de)


Then I did:


adb remount
adb push webview.apk /system/webview/
adb reboot

Now I get errors when I try to start my cordova application and the app itself doesn't show up anymore:


I/CordovaActivity( 1931): Apache Cordova native platform version 6.1.1 is starting
D/CordovaActivity( 1931): CordovaActivity.onCreate()
E/WebViewFactory( 1931): Failed to list WebView package libraries for loadNativeLibrary

E/WebViewFactory( 1931): android.content.pm.PackageManager$NameNotFoundException: com.android.webview
E/WebViewFactory( 1931): at android.app.ApplicationPackageManager.getApplicationInfo(ApplicationPackageManager.java:281)
E/WebViewFactory( 1931): at android.webkit.WebViewFactory.getWebViewNativeLibraryPaths(WebViewFactory.java:282)
E/WebViewFactory( 1931): at android.webkit.WebViewFactory.loadNativeLibrary(WebViewFactory.java:397)
E/WebViewFactory( 1931): at android.webkit.WebViewFactory.getProvider(WebViewFactory.java:103)
E/WebViewFactory( 1931): at android.webkit.WebView.getFactory(WebView.java:2194)
E/WebViewFactory( 1931): at android.webkit.WebView.ensureProviderCreated(WebView.java:2189)
E/WebViewFactory( 1931): at android.webkit.WebView.setOverScrollMode(WebView.java:2248)
E/WebViewFactory( 1931): at android.view.View.(View.java:3595)
E/WebViewFactory( 1931): at android.view.View.(View.java:3689)


How is the correct way to update the webview.apk without google playstore?




No comments:

Post a Comment

samsung galaxy s 2 - Cannot restore Kies backup after firmware upgrade

I backed up my Samsung Galaxy S2 on Kies before updating to Ice Cream Sandwich. After the upgrade I tried to restore, but the restore fails ...