ekke / android-openssl-qt

scripts to generate openssl .so to be used from Qt Android Projects
50 stars 18 forks source link

Crash when start on mobile #3

Open mabedMRD opened 7 years ago

mabedMRD commented 7 years ago

Hello Thanks for the awesome work the files generated and i copied them into my project but app crash when start! i didnt change any configuration , just i changed the location of NDK

also i am using QR 5.9 Armv7

any ideas?

Thanks

ekke commented 7 years ago

which NDK version are you using ?

mabedMRD commented 7 years ago

android-ndk-r14b

ekke commented 7 years ago

you must use r10e https://wiki.qt.io/Qt_5.9_Tools_and_Versions

mabedMRD commented 7 years ago

the build show error on terminal, but it generates openSSL files "Error: FIPS_SIG does not specify incore module. Please edit this script."

shall i ignore it? also the run crash on mobile with this log


 Starting remote process.I MultiDex: VM with version 2.1.0 has multidex support I MultiDex: install I MultiDex: VM has multidex support, MultiDex support library is disabled. D NetworkSecurityConfig: No Network Security Config specified, using platform default W System : ClassLoader referenced unknown path: V BoostFramework: mAcquireFunc method = public int com.qualcomm.qti.Performance.perfLockAcquire(int,int[]) V BoostFramework: mReleaseFunc method = public int com.qualcomm.qti.Performance.perfLockRelease() V BoostFramework: mAcquireTouchFunc method = public int com.qualcomm.qti.Performance.perfLockAcquireTouch(android.view.MotionEvent,android.util.DisplayMetrics,int,int[]) V BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance@fb5ec7d V BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance@431f772 I QtCore : Start W linker : /data/app/com.comp.game-1/lib/arm/libQt5Network.so: unsupported flags DT_FLAGS_1=0x81 W linker : /data/app/com.comp.game-1/lib/arm/libQt5Qml.so: unsupported flags DT_FLAGS_1=0x81 W linker : /data/app/com.comp.game-1/lib/arm/libQt5Gui.so: unsupported flags DT_FLAGS_1=0x81 W linker : /data/app/com.comp.game-1/lib/arm/libQt5Quick.so: unsupported flags DT_FLAGS_1=0x81 W linker : /data/app/com.comp.game-1/lib/arm/libQt5Sql.so: unsupported flags DT_FLAGS_1=0x81 W linker : /data/app/com.comp.game-1/lib/arm/libQt5AndroidExtras.so: unsupported flags DT_FLAGS_1=0x81 W linker : /data/app/com.comp.game-1/lib/arm/libQt5Purchasing.so: unsupported flags DT_FLAGS_1=0x81 W linker : /data/app/com.comp.game-1/lib/arm/libQt5QuickParticles.so: unsupported flags DT_FLAGS_1=0x81 W linker : /data/app/com.comp.game-1/lib/arm/libQt5Multimedia.so: unsupported flags DT_FLAGS_1=0x81 W linker : /data/app/com.comp.game-1/lib/arm/libQt5MultimediaQuick_p.so: unsupported flags DT_FLAGS_1=0x81 W linker : /data/app/com.comp.game-1/lib/arm/libQt5Widgets.so: unsupported flags DT_FLAGS_1=0x81 W linker : /data/data/com.comp.game/qt-reserved-files/plugins/platforms/android/libqtforandroid.so: unsupported flags DT_FLAGS_1=0x81 I Qt : qt start W linker : /data/data/com.comp.game/qt-reserved-files/plugins/bearer/libqandroidbearer.so: unsupported flags DT_FLAGS_1=0x81 W linker : /data/data/com.comp.game/qt-reserved-files/plugins/mediaservice/libqtmedia_android.so: unsupported flags DT_FLAGS_1=0x81 W System.err: java.lang.reflect.InvocationTargetException W System.err: at java.lang.reflect.Method.invoke(Native Method) W System.err: at org.qtproject.qt5.android.bindings.QtLoader.loadApplication(QtLoader.java:237) W System.err: at org.qtproject.qt5.android.bindings.QtLoader.startApp(QtLoader.java:649) W System.err: at org.qtproject.qt5.android.bindings.QtActivityLoader.onCreate(QtActivityLoader.java:183) W System.err: at org.qtproject.qt5.android.bindings.QtActivity.onCreateHook(QtActivity.java:266) W System.err: at org.qtproject.qt5.android.bindings.QtActivity.onCreate(QtActivity.java:273) W System.err: at android.MainActivity.onCreate(MainActivity.java:35) W System.err: at android.app.Activity.performCreate(Activity.java:6705) W System.err: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119) W System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2664) W System.err: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2772) W System.err: at android.app.ActivityThread.-wrap12(ActivityThread.java) W System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1515) W System.err: at android.os.Handler.dispatchMessage(Handler.java:102) W System.err: at android.os.Looper.loop(Looper.java:241) W System.err: at android.app.ActivityThread.main(ActivityThread.java:6217) W System.err: at java.lang.reflect.Method.invoke(Native Method) W System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865) W System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755) W System.err: Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "obj_cleanup_defer" referenced by "/data/app/com.comp.game-1/lib/arm/libcrypto.so"... W System.err: at java.lang.Runtime.load0(Runtime.java:897) W System.err: at java.lang.System.load(System.java:1505) W System.err: at org.qtproject.qt5.android.QtNative.loadBundledLibraries(QtNative.java:191) W System.err: at org.qtproject.qt5.android.QtActivityDelegate.loadApplication(QtActivityDelegate.java:588) W System.err: ... 19 more V BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance@9f9ae88 V BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance@7acf021 I Adreno : QUALCOMM build : 7d18700, I8ee426a9a2 I Adreno : Build Date : 10/07/16 I Adreno : OpenGL ES Shader Compiler Version: XE031.09.00.03 I Adreno : Local Branch : I Adreno : Remote Branch : quic/LA.BR.1.3.6_rb1.6 I Adreno : Remote Branch : NONE I Adreno : Reconstruct Branch : NOTHING I OpenGLRenderer: Initialized EGL, version 1.4 D OpenGLRenderer: Swap behavior 1 I Timeline: Timeline: Activity_idle id: android.os.BinderProxy@44242be time:6411020 D GraphRequest: Warning: Request without access token missing application ID or client token. I Timeline: Timeline: Activity_idle id: android.os.BinderProxy@44242be time:6413263 I Timeline: Timeline: Activity_idle id: android.os.BinderProxy@44242be time:6417482

mabedMRD commented 7 years ago

Hi The app is working now , looks it was cache issue, i cleared every thing and run successfully, the bad news is that not solved the problem, because i got popup message in first run to inform me that QT cant access opesSSL libs!, can i work around on it Thanks

here log also ..

W linker : library "libssl.so" ("/system/lib/libssl.so") needed or dlopened by "/data/app/com.maysalward.Balot-1/lib/arm/libQt5Core.so" is not accessible for the namespace "classloader-namespace" - the access is temporarily granted as a workaround for http://b/26394120, note that the access will be removed in future releases of Android. W linker : library "/system/lib/libcrypto.so" ("/system/lib/libcrypto.so") needed or dlopened by "/data/app/com.maysalward.Balot-1/lib/arm/libQt5Core.so" is not accessible for the namespace "classloader-namespace" - the access is temporarily granted as a workaround for http://b/26394120, note that the access will be removed in future releases of Android. W linker : library "/system/lib/libssl.so" ("/system/lib/libssl.so") needed or dlopened by "/data/app/com.maysalward.Balot-1/lib/arm/libQt5Core.so" is not accessible for the namespace "classloader-namespace" - the access is temporarily granted as a workaround for http://b/26394120, note that the access will be removed in future releases of Android.

mabedMRD commented 7 years ago

i would like to thank you for this great work its working perfectly now, i had a mistake in importing openSSL lib

Thanks

alexgarret commented 6 years ago

Hi guys, Thank's for your work. I have cross compiled libcrypto for android using NDK 15 with your scripts and I have bundled it in my apk, but I still have the same error log library "/system/lib/libcrypto.so" ("/system/lib/libcrypto.so") needed or dlopened by ... Do you have any idea why ?

ekke commented 6 years ago

@alexgarret you must use NDK r10e see https://wiki.qt.io/Qt_for_Android_known_issues - perhaps this is the reason

alexgarret commented 6 years ago

@ekke same problem when using NDK r10e unfortunately... @mabedMRD It seems I have the problem you had, how did you fix it ?

mabedMRD commented 6 years ago

Hi I used already builded libs, i can share it with you when I back home

On Thu, Oct 19, 2017 at 7:42 PM Alexandre Garret notifications@github.com wrote:

@ekke https://github.com/ekke same problem when using NDK r10e unfortunately... @mabedMRD https://github.com/mabedmrd It seems I have the problem you had, how did you fix it ?

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/ekke/android-openssl-qt/issues/3#issuecomment-337966971, or mute the thread https://github.com/notifications/unsubscribe-auth/AWS4pAzoSl_qWLIDfixCacFk-JMW3cYOks5st3v_gaJpZM4NuXIa .

--

*Check our awesome games *https://goo.gl/WuVer3 https://goo.gl/WuVer3 Eng. Mohammad Alabed | Mobile Games Developer

mfa01 commented 6 years ago

sorry for late reply here you can go with it https://www.dropbox.com/s/w6cm09niyj185fb/openSSL.zip?dl=0 add those 3 files beside .pro file and add this line to your .pro file include(android-openssl.pri)

those libs builded for armv7-a7a arch

stef-vo commented 6 years ago

mfa01 thank you very much!

esutton commented 6 years ago

@mfa01 Did you build on macOS? Do you have x86 libs you can share too?

I am having a challenging time trying to build OpenSSL on macOS. I may have to setup a Linux or Cygwin Android build environment.

How to build OpenSSL on macOS for Android Arm / x86 ? ( removing '-mandroid' from Makefile helps )

akontsevich commented 5 years ago

Had same error with my script variant: https://github.com/akontsevich/openssl-android-build Solved adding .so name stripping down from the script in current repo:

    # patch SONAME
    perl -pi -e 's/SHLIB_EXT=\.so\.\$\(SHLIB_MAJOR\)\.\$\(SHLIB_MINOR\)/SHLIB_EXT=\.so/g' Makefile
    perl -pi -e 's/SHARED_LIBS_LINK_EXTS=\.so\.\$\(SHLIB_MAJOR\) \.so//g' Makefile
    # quote injection for proper SONAME, fuck...
    perl -pi -e 's/SHLIB_MAJOR=1/SHLIB_MAJOR=`/g' Makefile
    perl -pi -e 's/SHLIB_MINOR=0.0/SHLIB_MINOR=`/g' Makefile