how to fix "Unable to load library: libwebviewchromium.so"?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

how to fix "Unable to load library: libwebviewchromium.so"?

Xuefer H
i have nougat built and runs almost just fine except the prebuilt webview is built with some CPU features enabled in compiler but not supported by my cpu so i have to rebuilt one myself with these features disabled
i checked out chromium 56.0.2924.73 and built android apk one for x64, copied it into the box, launch browser, it says missing libchromium_android_linker.so. so i build again for target libchromium_android_linker.so and copy it to /system/lib64/
restart browser in android, logcat says can't find libwebviewchromium.so. the lib is in webview.apk, why it can't find/load the lib inside apk but the prebuilt webview.apk can? maybe some patch/config is required in kernel? using strace i can see it tried to load "/system/app/webview/webview.apk!/lib/x86_64/libwebviewchromium.so

i retry with libwebviewchromium.so unzipped to /system/app/webview/lib/x86_64/libwebviewchromium.so, restart browser, logcat says 

01-24 23:18:37.911 17999 17999 D ApplicationLoaders: ignored Vulkan layer search path /system/app/webview/lib/x86_64:/system/app/webview/webview.apk!/lib/x86_64:/system/lib64:/vendor/lib64 f
or namespace 0x7ff8eb33b0f0
01-24 23:18:37.915 17999 17999 I WebViewFactory: Loading com.android.webview version 55.0.2883.91 (code 1)
01-24 23:18:38.507 17999 17999 I cr_LibraryLoader: Using linker: org.chromium.base.library_loader.ModernLinker
01-24 23:18:38.652 17999 17999 I cr_LibraryLoader: Loading webviewchromium
01-24 23:18:38.869 17999 17999 E cr_ChromiumAndroidLinker: GetLibraryLoadSize: Failed to find library at address 0x7ff8b4ba4000
01-24 23:18:38.869 17999 17999 E cr_ChromiumAndroidLinker: LoadLibrary: Unable to find size for load at 0x7ff8b4ba4000
01-24 23:18:38.870 17999 17999 E cr_LibraryLoader: Unable to load library: libwebviewchromium.so
01-24 23:18:38.965 17999 17999 E WebViewFactory: error instantiating provider
01-24 23:18:38.965 17999 17999 E WebViewFactory: java.lang.reflect.InvocationTargetException
01-24 23:18:38.965 17999 17999 E WebViewFactory:        at java.lang.reflect.Constructor.newInstance0(Native Method)
01-24 23:18:38.965 17999 17999 E WebViewFactory:        at java.lang.reflect.Constructor.newInstance(Constructor.java:430)
01-24 23:18:38.965 17999 17999 E WebViewFactory:        at android.webkit.WebViewFactory.getProvider(WebViewFactory.java:198)
01-24 23:18:38.965 17999 17999 E WebViewFactory:        at android.webkit.WebIconDatabase.getInstance(WebIconDatabase.java:102)
01-24 23:18:38.965 17999 17999 E WebViewFactory:        at com.android.browser.Controller.openIconDatabase(Controller.java:469)
01-24 23:18:38.965 17999 17999 E WebViewFactory:        at com.android.browser.Controller.<init>(Controller.java:266)
01-24 23:18:38.965 17999 17999 E WebViewFactory:        at com.android.browser.BrowserActivity.createController(BrowserActivity.java:90)
01-24 23:18:38.965 17999 17999 E WebViewFactory:        at com.android.browser.BrowserActivity.onCreate(BrowserActivity.java:79)
--
01-24 23:18:38.965 17999 17999 E WebViewFactory:        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726)
01-24 23:18:38.965 17999 17999 E WebViewFactory:        at android.app.ActivityThread.-wrap12(ActivityThread.java)
01-24 23:18:38.965 17999 17999 E WebViewFactory:        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1477)
01-24 23:18:38.965 17999 17999 E WebViewFactory:        at android.os.Handler.dispatchMessage(Handler.java:102)
01-24 23:18:38.965 17999 17999 E WebViewFactory:        at android.os.Looper.loop(Looper.java:154)
01-24 23:18:38.965 17999 17999 E WebViewFactory:        at android.app.ActivityThread.main(ActivityThread.java:6126)
01-24 23:18:38.965 17999 17999 E WebViewFactory:        at java.lang.reflect.Method.invoke(Native Method)
01-24 23:18:38.965 17999 17999 E WebViewFactory:        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:887)
01-24 23:18:38.965 17999 17999 E WebViewFactory:        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:777)
01-24 23:18:38.965 17999 17999 E WebViewFactory: Caused by: java.lang.RuntimeException: Cannot load WebView
01-24 23:18:38.965 17999 17999 E WebViewFactory:        at org.chromium.android_webview.AwBrowserProcess.loadLibrary(AwBrowserProcess.java:56)
01-24 23:18:38.965 17999 17999 E WebViewFactory:        at com.android.webview.chromium.WebViewChromiumFactoryProvider.initialize(WebViewChromiumFactoryProvider.java:233)
01-24 23:18:38.965 17999 17999 E WebViewFactory:        at com.android.webview.chromium.WebViewChromiumFactoryProvider.<init>(WebViewChromiumFactoryProvider.java:194)
01-24 23:18:38.965 17999 17999 E WebViewFactory:        ... 20 more
01-24 23:18:38.965 17999 17999 E WebViewFactory: Caused by: org.chromium.base.library_loader.ProcessInitException
01-24 23:18:38.965 17999 17999 E WebViewFactory:        at org.chromium.base.library_loader.LibraryLoader.loadAlreadyLocked(LibraryLoader.java:325)
01-24 23:18:38.965 17999 17999 E WebViewFactory:        at org.chromium.base.library_loader.LibraryLoader.loadNowOverrideApplicationContext(LibraryLoader.java:180)
01-24 23:18:38.965 17999 17999 E WebViewFactory:        at org.chromium.android_webview.AwBrowserProcess.loadLibrary(AwBrowserProcess.java:1164)
01-24 23:18:38.965 17999 17999 E WebViewFactory:        ... 22 more
01-24 23:18:38.965 17999 17999 E WebViewFactory: Caused by: java.lang.UnsatisfiedLinkError: Unable to load library: libwebviewchromium.so
01-24 23:18:38.965 17999 17999 E WebViewFactory:        at org.chromium.base.library_loader.ModernLinker.loadLibraryImpl(ModernLinker.java:415)
01-24 23:18:38.965 17999 17999 E WebViewFactory:        at org.chromium.base.library_loader.LibraryLoader.loadAlreadyLocked(LibraryLoader.java:2569)
01-24 23:18:38.965 17999 17999 E WebViewFactory:        ... 24 more
01-24 23:18:38.966 17999 17999 D AndroidRuntime: Shutting down VM

i have no idea about the error "Failed to find library at address" and "Unable to find size for load"
is there anything i can do to fix it?

--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/android-platform.
For more options, visit https://groups.google.com/d/optout.