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.
The following answer is related to the second part of my question.
I did the following steps to make the
SystemWebView.apkwork (note: thewebview.apkwas a system app in my build under/system/app; the steps below were used to install & testSystemWebView.apkas a third party app)(Take a look at step 6 first for taking back up of 2 files)
packages.xmlandpackages.listfiles (I haven't pushed them yet)com.android.webview):adb install SystemWebView.apk
I also had kept a back up of
libwebviewchromium64.relroandlibwebviewchromium32.relrofiles 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 intoshared_relrofolder).adb shell start
After that I tested a simple app containing a
WebView, and could see web pages loaded.