-
Notifications
You must be signed in to change notification settings - Fork 569
Crash on Android 6.0 emulator #190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hello @TomAtRB Are you certain you have integrated the library according to the documentation here? I was just able to run the SQLCipher for Android test suite on the x86 emulator for API 23 successfully. |
I am able to replicate the crash in the test suite by updating the "targetSdkVersion" and "compileSdkVersion" to "23"
|
Hello @TomAtRB I was able to reproduce this by adjusting the |
@developernotes any chance it's because of
https://developer.android.com/preview/behavior-changes.html#behavior-apache-http-client |
Hi @ErnestG It is unlikely due to the libcrypto dependency. We are actually building our own version of libcrypto and linking that directly into the library, so we are not dependency on any specific version of libcrypto being available on a given Android device. |
I am also getting the same error with the same environment. |
Hello @kmusham We are looking into the issue, at the time being we recommend that you do not target API 23 until this issue is resolved. |
I have the same error too. I remain waiting for its solution. Thank you @developernotes for the info. |
Hello @developernotes, I've tested the library with the fix and work fine with the API 23 (emulator and hardware preview-3). Thanks! |
Hi @jdzuri Thank you for reporting your success with the latest changes. |
Where do I get the new jniLibs files (+ icudt46l.zip)? The last version here is from Jul 13 v3.3.1: https://github.com/sqlcipher/android-database-sqlcipher/releases |
Hello @powder366 We have just released the latest version of SQLCipher for Android, more information can be found here. |
Thanks worked great. It seems one don't need the ".so" files anymore? |
@powder366 you still need them, the .so files are bundled with the .aar package. |
Hi, I am trying to apply this fix, but I don't understand. Does this bug only occurs in emulator? I don't have a real device with API 23. Anyway, which files do I have to update in my project to add this fix solution? |
Hello @maniacs-engineerica The issue was verified within the emulator when running with a target SDK set to 23. The specific commit that addressed the issue can be found here: 098ecdb. |
Thank you for your help. I am not sure on how to include new libcrypto.a in my project, can you help me? |
Hello @maniacs-engineerica The static libraries are already built into the binary distribution, you can just reference the AAR package that is available through jcenter or Maven Central. |
That's perfect. It works! Thank you. |
I m having Android App that uses SQL cipher 2.2.0 library to encrypt the db. After Android 6.0 upgrade we updated to SQL cipher 3.3.1 since previous library was giving problem on android 6.0. After the sql cipher upgrade the app started working on android 6.0 as well. But the problem is it is not able to read the already encrypted DB (encrypted using cipher 2.2.0). compile file('build/intermediates/rs/debug/lib.sqlcipher.jar') compile 'com.android.support:support-v4:23.0.0' Is it that encryption algorithm has changed or am i doing some mistake. Please help. |
Did you migrate your db to new v3-format? |
Hello @sagarkakad @TheNephilim88 is correct, you will need to upgrade the database file to the new 3.x format using the |
how can i upgrade database file to new 3.x format using PRAGMA cipher_migrate; I cannot use command i have to do it through android program. Currently i m using sqlcipher 3.3.1 version please guide me... |
Hello @sagarkakad There is an example of the usage within the SQLCipher for Android test suite here. |
Thanks @developernotes & @TheNephilim88 . I had to do few changes ,
After this updates My APP is working 👍 , but I am facing 2 problem
Please suggest me to sort out above problem. I am more concern about speed Thanks Again!!! 👍 |
Hello @sagarkakad
Just for clarification, the correct AAR reference name should be:
It is not recommended that you mix and match jars and .so files from different distributions. This behavior could certainly cause issues. Is there a reason you are opting to not use the binaries distributed in AAR package provided? With regard to the performance impact of SQLCipher within your application, I would recommend reviewing the SQLCipher performance guidance we have posted here. The binary size of your application will increase due to the various components of SQLCipher. |
Hello @developernotes Thanks for support When i am using sqlcipher 2.2 my app responds very fast, their is no time delay. now i am replace only sqlcipher2.2 with sqlcipher 3.3.1 using because sqlcipher 2.2 it not supporting to Android 6.0 now my app with same code gets very slow. Thanks |
Hello @sagarkakad Have you reviewed the SQLCipher performance guidance provided here? If not, I would recommend evaluating your application to identify specifically where the slowness is occurring and make the appropriate adjustments. |
compile 'net.zetetic:android-database-sqlcipher:3.3.1-2@aar' give me error:
|
Ahh. nvm.. Thank you very much. |
Thanks for getting back to us, we are glad to hear the issue has been resolved. |
I steel have the issue on android 6.0 with 3.4.0 and 3.3.1 on x86 platform(genymotion). |
@zamesilyasa double check that the so file that is being installed on the device is the same within the AAR, and that the older so, is not being re-installed. Use adb pull then run a checksum. In my case Android Studio was aggressively caching the SO file. Had to wipe the genymotion VM, clean the build, delete build folder then searched and deleted all occurrences of libsqlcipher_android.so It eventually worked. |
@developernotes is there anything different with so file ? I run my apps on marshmallow device and using compile 'net.zetetic:android-database-sqlcipher:3.3.1-2@aar', it's working just fine ( no so file in the project ). But when i run the project into < marshmallow, i got the error db file is not a database or encrypted file. But when i add so file into the project, there's no problem with it. But when i run into Marshmallow, it give me error java.lang.UnsatisfiedLinkError: dlopen failed: /data/app/com.grey.project/lib/arm/libstlport_shared.so: has text relocations |
Hello @greyowly The latest version of the library is currently 3.5.2, would you try that? |
I am getting a crash on launch when trying to test on an Android 6.0 emulator
java.lang.UnsatisfiedLinkError: dlopen failed: ... lib/x86/libsqlcipher_android.so: has text relocations
Using:
sqlcipher-for-android-v3.3.1
Android emulator x86 API 23 (6.0)
The text was updated successfully, but these errors were encountered: