{"action":"created","issue":{"url":"https://api.github.com/repos/opengapps/aosp_build/issues/21","repository_url":"https://api.github.com/repos/opengapps/aosp_build","labels_url":"https://api.github.com/repos/opengapps/aosp_build/issues/21/labels{/name}","comments_url":"https://api.github.com/repos/opengapps/aosp_build/issues/21/comments","events_url":"https://api.github.com/repos/opengapps/aosp_build/issues/21/events","html_url":"https://github.com/opengapps/aosp_build/issues/21","id":130893450,"number":21,"title":"Chrome crashing because cannot load libchrome.so","user":{"login":"aaboyd","id":859286,"avatar_url":"https://avatars.githubusercontent.com/u/859286?v=3","gravatar_id":"","url":"https://api.github.com/users/aaboyd","html_url":"https://github.com/aaboyd","followers_url":"https://api.github.com/users/aaboyd/followers","following_url":"https://api.github.com/users/aaboyd/following{/other_user}","gists_url":"https://api.github.com/users/aaboyd/gists{/gist_id}","starred_url":"https://api.github.com/users/aaboyd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaboyd/subscriptions","organizations_url":"https://api.github.com/users/aaboyd/orgs","repos_url":"https://api.github.com/users/aaboyd/repos","events_url":"https://api.github.com/users/aaboyd/events{/privacy}","received_events_url":"https://api.github.com/users/aaboyd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-02-03T02:50:36Z","updated_at":"2016-04-11T08:55:22Z","closed_at":null,"body":"Any clue where I could look to figure out why libchrome.so isn't loaded?\r\n\r\nI'm doing a build based off of CM 12 ( Android 5.0.2 ).\r\n\r\n```\r\nI/cr_LibraryLoader(10337): Using linker: org.chromium.base.library_loader.LegacyLinker\r\nI/cr_LibraryLoader(10337): Loading chrome from within /system/app/Chrome/Chrome.apk\r\nE/cr_ChromiumAndroidLinker(10337): Open: Could not open libchrome.so in zip file /system/app/Chrome/Chrome.apk: (null)\r\nE/cr_LibraryLoader(10337): Unable to load library: libchrome.so, in: /system/app/Chrome/Chrome.apk\r\nE/NativeInitializationController(10337): Unable to load native library.\r\nE/NativeInitializationController(10337): org.chromium.base.library_loader.ProcessInitException\r\nE/NativeInitializationController(10337):        at org.chromium.base.library_loader.LibraryLoader.loadAlreadyLocked(LibraryLoader.java:271)\r\nE/NativeInitializationController(10337):        at org.chromium.base.library_loader.LibraryLoader.ensureInitialized(LibraryLoader.java:123)\r\nE/NativeInitializationController(10337):        at org.chromium.chrome.browser.init.NativeInitializationController$1.run(NativeInitializationController.java:84)\r\nE/NativeInitializationController(10337): Caused by: java.lang.UnsatisfiedLinkError: Unable to load library: libchrome.so, in: /system/app/Chrome/Chrome.apk\r\nE/NativeInitializationController(10337):        at org.chromium.base.library_loader.LegacyLinker.loadLibraryImpl(LegacyLinker.java:500)\r\nE/NativeInitializationController(10337):        at org.chromium.base.library_loader.Linker.loadLibrary(Linker.java:569)\r\nE/NativeInitializationController(10337):        at org.chromium.base.library_loader.LibraryLoader.loadLibrary(LibraryLoader.java:205)\r\nE/NativeInitializationController(10337):        at org.chromium.base.library_loader.LibraryLoader.loadAlreadyLocked(LibraryLoader.java:250)\r\nE/NativeInitializationController(10337):        ... 2 more\r\n```"},"comment":{"url":"https://api.github.com/repos/opengapps/aosp_build/issues/comments/208237590","html_url":"https://github.com/opengapps/aosp_build/issues/21#issuecomment-208237590","issue_url":"https://api.github.com/repos/opengapps/aosp_build/issues/21","id":208237590,"user":{"login":"Blystad","id":324506,"avatar_url":"https://avatars.githubusercontent.com/u/324506?v=3","gravatar_id":"","url":"https://api.github.com/users/Blystad","html_url":"https://github.com/Blystad","followers_url":"https://api.github.com/users/Blystad/followers","following_url":"https://api.github.com/users/Blystad/following{/other_user}","gists_url":"https://api.github.com/users/Blystad/gists{/gist_id}","starred_url":"https://api.github.com/users/Blystad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Blystad/subscriptions","organizations_url":"https://api.github.com/users/Blystad/orgs","repos_url":"https://api.github.com/users/Blystad/repos","events_url":"https://api.github.com/users/Blystad/events{/privacy}","received_events_url":"https://api.github.com/users/Blystad/received_events","type":"User","site_admin":false},"created_at":"2016-04-11T08:55:22Z","updated_at":"2016-04-11T08:55:22Z","body":"I'm for fixing it, but against spending lots of time on it :)\r\n\r\n```\r\nmake: Entering directory `/home/pixavi/x7k/android/lollipop'\r\ntarget Prebuilt: Chrome (/home/pixavi/x7k/android/lollipop/out/target/product/x7k/obj/APPS/Chrome_intermediates/package.apk)\r\n/home/pixavi/x7k/android/lollipop/out/host/linux-x86/bin/acp -fp vendor/opengapps/sources/arm/app/com.android.chrome/21/nodpi/249007601.apk /home/pixavi/x7k/android/lollipop/out/target/product/x7k/obj/APPS/Chrome_intermediates/package.apk\r\nunzip -Z -1 /home/pixavi/x7k/android/lollipop/out/target/product/x7k/obj/APPS/Chrome_intermediates/package.apk | grep \"lib/\" | grep -v \"/crazy.\" | xargs zip -d /home/pixavi/x7k/android/lollipop/out/target/product/x7k/obj/APPS/Chrome_intermediates/package.apk # strip embedded JNI libraries.\r\ndeleting: lib/armeabi-v7a/libchrome.1847.114.so\r\ndeleting: lib/armeabi-v7a/libchrome.1916.122.so\r\ndeleting: lib/armeabi-v7a/libchrome.1916.138.so\r\ndeleting: lib/armeabi-v7a/libchrome.1916.141.so\r\ndeleting: lib/armeabi-v7a/libchrome.1985.122.so\r\ndeleting: lib/armeabi-v7a/libchrome.1985.128.so\r\ndeleting: lib/armeabi-v7a/libchrome.1985.131.so\r\ndeleting: lib/armeabi-v7a/libchrome.1985.135.so\r\ndeleting: lib/armeabi-v7a/libchrome.2062.117.so\r\ndeleting: lib/armeabi-v7a/libchrome.2125.102.so\r\ndeleting: lib/armeabi-v7a/libchrome.2125.114.so\r\ndeleting: lib/armeabi-v7a/libchrome.2171.37.so\r\ndeleting: lib/armeabi-v7a/libchrome.2171.59.so\r\ndeleting: lib/armeabi-v7a/libchromeview.so\r\ndeleting: lib/armeabi-v7a/libchromium_android_linker.so\r\nmv /home/pixavi/x7k/android/lollipop/out/target/product/x7k/obj/APPS/Chrome_intermediates/package.apk /home/pixavi/x7k/android/lollipop/out/target/product/x7k/obj/APPS/Chrome_intermediates/package.apk.unaligned\r\n/home/pixavi/x7k/android/lollipop/out/host/linux-x86/bin/zipalign -f 4 /home/pixavi/x7k/android/lollipop/out/target/product/x7k/obj/APPS/Chrome_intermediates/package.apk.unaligned /home/pixavi/x7k/android/lollipop/out/target/product/x7k/obj/APPS/Chrome_intermediates/package.apk.aligned\r\nmv /home/pixavi/x7k/android/lollipop/out/target/product/x7k/obj/APPS/Chrome_intermediates/package.apk.aligned /home/pixavi/x7k/android/lollipop/out/target/product/x7k/obj/APPS/Chrome_intermediates/package.apk\r\nExtract JNI libs (/home/pixavi/x7k/android/lollipop/out/target/product/x7k/system/google/app/Chrome/lib/arm/libchrome.1847.114.so <- vendor/opengapps/sources/arm/app/com.android.chrome/21/nodpi/249007601.apk)\r\nunzip -j -o -d /home/pixavi/x7k/android/lollipop/out/target/product/x7k/system/google/app/Chrome/lib/arm/ vendor/opengapps/sources/arm/app/com.android.chrome/21/nodpi/249007601.apk lib/armeabi-v7a/libchrome.1847.114.so lib/armeabi-v7a/libchrome.1916.122.so lib/armeabi-v7a/libchrome.1916.138.so lib/armeabi-v7a/libchrome.1916.141.so lib/armeabi-v7a/libchrome.1985.122.so lib/armeabi-v7a/libchrome.1985.128.so lib/armeabi-v7a/libchrome.1985.131.so lib/armeabi-v7a/libchrome.1985.135.so lib/armeabi-v7a/libchrome.2062.117.so lib/armeabi-v7a/libchrome.2125.102.so lib/armeabi-v7a/libchrome.2125.114.so lib/armeabi-v7a/libchrome.2171.37.so lib/armeabi-v7a/libchrome.2171.59.so lib/armeabi-v7a/libchromeview.so lib/armeabi-v7a/libchromium_android_linker.so && touch /home/pixavi/x7k/android/lollipop/out/target/product/x7k/system/google/app/Chrome/lib/arm/libchrome.1847.114.so\r\nArchive:  vendor/opengapps/sources/arm/app/com.android.chrome/21/nodpi/249007601.apk\r\n  inflating: /home/pixavi/x7k/android/lollipop/out/target/product/x7k/system/google/app/Chrome/lib/arm/libchrome.1847.114.so  \r\n  inflating: /home/pixavi/x7k/android/lollipop/out/target/product/x7k/system/google/app/Chrome/lib/arm/libchrome.1916.122.so  \r\n  inflating: /home/pixavi/x7k/android/lollipop/out/target/product/x7k/system/google/app/Chrome/lib/arm/libchrome.1916.138.so  \r\n  inflating: /home/pixavi/x7k/android/lollipop/out/target/product/x7k/system/google/app/Chrome/lib/arm/libchrome.1916.141.so  \r\n  inflating: /home/pixavi/x7k/android/lollipop/out/target/product/x7k/system/google/app/Chrome/lib/arm/libchrome.1985.122.so  \r\n  inflating: /home/pixavi/x7k/android/lollipop/out/target/product/x7k/system/google/app/Chrome/lib/arm/libchrome.1985.128.so  \r\n  inflating: /home/pixavi/x7k/android/lollipop/out/target/product/x7k/system/google/app/Chrome/lib/arm/libchrome.1985.131.so  \r\n  inflating: /home/pixavi/x7k/android/lollipop/out/target/product/x7k/system/google/app/Chrome/lib/arm/libchrome.1985.135.so  \r\n  inflating: /home/pixavi/x7k/android/lollipop/out/target/product/x7k/system/google/app/Chrome/lib/arm/libchrome.2062.117.so  \r\n  inflating: /home/pixavi/x7k/android/lollipop/out/target/product/x7k/system/google/app/Chrome/lib/arm/libchrome.2125.102.so  \r\n  inflating: /home/pixavi/x7k/android/lollipop/out/target/product/x7k/system/google/app/Chrome/lib/arm/libchrome.2125.114.so  \r\n  inflating: /home/pixavi/x7k/android/lollipop/out/target/product/x7k/system/google/app/Chrome/lib/arm/libchrome.2171.37.so  \r\n  inflating: /home/pixavi/x7k/android/lollipop/out/target/product/x7k/system/google/app/Chrome/lib/arm/libchrome.2171.59.so  \r\n  inflating: /home/pixavi/x7k/android/lollipop/out/target/product/x7k/system/google/app/Chrome/lib/arm/libchromeview.so  \r\n  inflating: /home/pixavi/x7k/android/lollipop/out/target/product/x7k/system/google/app/Chrome/lib/arm/libchromium_android_linker.so  \r\nInstall: /home/pixavi/x7k/android/lollipop/out/target/product/x7k/system/google/app/Chrome/Chrome.apk\r\n/home/pixavi/x7k/android/lollipop/out/host/linux-x86/bin/acp -fp /home/pixavi/x7k/android/lollipop/out/target/product/x7k/obj/APPS/Chrome_intermediates/package.apk /home/pixavi/x7k/android/lollipop/out/target/product/x7k/system/google/app/Chrome/Chrome.apk\r\nmake: Leaving directory `/home/pixavi/x7k/android/lollipop'\r\n```\r\n\r\nWith the following patch:\r\n```\r\ndiff --git a/core/prebuilt_internal.mk b/core/prebuilt_internal.mk\r\nindex bc6088f..03bcf1f 100644\r\n--- a/core/prebuilt_internal.mk\r\n+++ b/core/prebuilt_internal.mk\r\n@@ -183,7 +183,7 @@ include $(BUILD_SYSTEM)/dex_preopt_odex_install.mk\r\n $(built_module) : $(my_prebuilt_src_file) | $(ACP) $(ZIPALIGN) $(SIGNAPK_JAR)\r\n        $(transform-prebuilt-to-target)\r\n ifdef extracted_jni_libs\r\n-       $(hide) zip -d $@ 'lib/*.so'  # strip embedded JNI libraries.\r\n+       $(hide) unzip -Z -1 $@ | grep \"lib/\" | grep -v \"/crazy.\" | xargs zip -d $@ # strip embedded JNI libraries.\r\n endif\r\n ifneq ($(LOCAL_CERTIFICATE),PRESIGNED)\r\n        $(sign-package)\r\n```\r\n\r\nI guess that's closer to what you expect?"}}