I am trying to follow the instructions to build the webview apk from chromium base. I am running a Android-7.0 build. I finished the compilation process for chromium and generated the APK. I have two questions related to steps after APK generation.
Firstly the library name is different from what I expected. The default webview.apk has a library name libwebviewchromium.so, but the APK I built from chromium (SystemWebView.apk) contains the lib libwebviewchromium.cr.so. I wanted to ask whether that can cause problems and if others also saw this.
Secondly, I am unable to uninstall the com.android.webview app from the device. The instructions require uninstallation of this app and deleting its folder before the new APK can be installed. I get the error:
$ adb uninstall com.android.webview
[DELETE_FAILED_INTERNAL_ERROR]
I wanted to ask if anyone knows how to resolve this. I saw a related question and want to ask if there is any other approach that doing what this answer suggests.
Android WebView is one of the six supported platforms for Chromium.
Our in-app browser for Facebook on Android has historically relied on an Android System WebView based on Chromium, the open source project that powers many browsers on Android and other operating systems.
Alternatives to WebView If you want to send users to a mobile site, build a progressive web app (PWA). If you want to display third-party web content, send an intent to installed web browsers. If you want to avoid leaving your app to open the browser, or if you want to customize the browser's UI, use Custom Tabs.
The following answer is related to the second part of my question.
I did the following steps to make the SystemWebView.apk work (note: the webview.apk was a system app in my build under /system/app; the steps below were used to install & test SystemWebView.apk as a third party app)
(Take a look at step 6 first for taking back up of 2 files)
packages.xml and packages.list files (I haven't pushed them yet)com.android.webview): /system/app/webview /data/data/com.android.webview /data/user/0/com.android.webview /data/misc/profiles/cur/0/com.android.webview /data/misc/profiles/ref/com.android.webview /data/user_de/0/com.android.webview
adb install SystemWebView.apk
I also had kept a back up of libwebviewchromium64.relro and libwebviewchromium32.relro files from /data/misc/shared_relro/. After the install, I noticed that these files get erased for some reason, so I copied them in again (first copying into sdcard and then moving into shared_relro folder).
adb shell start
After that I tested a simple app containing a WebView, and could see web pages loaded.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With