Android System Webview crashes

@Brot123 We have managed to install version 108 on the vim4 in order to test if a newer version resolved our issue (which it did). The new version of the webview worked well for us, but rooting the system is not viable long-term for us.

The steps we did for testing the new version of the webview were:

  1. Install Magisk (like super-su) GitHub - topjohnwu/Magisk: The Magic Mask for Android
  2. Install riru GitHub - RikkaApps/Riru: Inject into zygote process
  3. Install LSPosed GitHub - LSPosed/LSPosed: LSPosed Framework
  4. Install AnyWebView module in LSPosed (either through in-app browser or from GitHub - neoblackxt/AnyWebView: Any WebView is OK!)

If you are unable to install the modules (.zip) in Magisk for some reason, try doing it in a root adb shell with the ‘magisk’ command.

1 Like

@PeterLin I sent you another email with only the source code since the APK was quite large. Did you get my latest email?

@Tomas Still did not receive the email.Please send to my another email again or upload the resources to netdisc.

@PeterLin Ok. I have forwarded my original emails to the new adress.

@Tomas I think your email service may have some problem.Mail never received.Try to upload the resources to netdisc?

@PeterLin What is the url of netdisc?

@Tomas Choose your usual network disk that can free download resources preferably and upload the apk and source code.

@PeterLin Can you try this link? khadas - Google Drive

I have downloaded the apk and source code successfully.And I will try to analyze the reason of crash.

1 Like

@Tomas if you have downloaded the vim4 source code,please edit frameworks/base/core/res/res/xml/config_webview_packages.xml to replace webviewproviders packageName to

    <!-- The default WebView implementation -->
    <!--<webviewprovider description="Android WebView" packageName="" availableByDefault="true">
    </webviewprovider> -->
    <webviewprovider description="Android WebView" packageName="" availableByDefault="true">

And then use your newest webview apk to replace external/chromium-webview/prebuilt/arm64/webview.apk.
At last,build Android code.
If you need the firmware,please consult @goenjoy .


@PeterLin Thank you for that solution. I will try that. As a side note, do you know if I can change something in the build process to enable 4K UI on the vim4?

The default code is 4K UI(device/khadas/kvim/ PRODUCT_SUPPORT_4K_UI := true).

VIM4:/ $ wm size
Physical size: 3840x2160
VIM4:/ $

Hello dear Khadas team, I hope you enjoyed the New Year. I have now bought a Vim4 in addition to a Vim1s, I followed @Tomas instructions to update Webview.
I use the [Fully Kiosk Browser]
(Fully Kiosk Browser Lockdown | Android Kiosk Mode App) to display my Home Assistant dashboard. Unfortunately it freezes every now and then I read errors in logcat Webview. Is there any way to get an image with a new webview version cleanly integrated? With the preinstalled version I can not display my Frigate cameras but with a V108 version works for me. That would be really nice.

@Brot123 You mean to include the firmware modified above, right? Our next version of firmware will be included. If you need it urgently, you can download the firmware in the link below.

Hi @goenjoy,

I just tried installing the 230428 release from 8th of May. After installing the new OS image and then checking the WebView it looks like it is still using version 83. Was that intended?

Tomas Christiansson

@Tomas yes. Because I cannot reproduce the problem you mentioned. Additionally, this APK exceeds the github limit of 100M.

Hi @goenjoy,

Thanks for the swift response and clarification.

We used the image from this thread to get the HDMI input to work, VIM4 HDMI input as camera? - #25 by goenjoy. That image used a newer webview iirc. However, testing this on our latest demo setup give a black screen on the Vx1 output.

Tomas Christiansson

@Tomas Due to the previous latest APK exceeding 100M, I would like to confirm if this 80M APK can meet your needs? If satisfied, I will submit this version of APK for the next version. So can you help me test it? thanks!

Hi @goenjoy ,

I will test it ASAP and get back to you shortly.

Thank you in advance,
Tomas Christiansson

Hi @goenjoy,

The OS image you posted works like a charm, thank you so much :pray:

The webview version included is 108 which is the same as we have used for most of our testing.

Tomas Christiansson

1 Like