-
Notifications
You must be signed in to change notification settings - Fork 569
Missing Android N compatibility because of behavior changes #216
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 @TheNephilim88 Thank you for your early report of SQLCipher for Android on Android N. We hope to begin looking into the Android N build soon. Take care! |
As per https://developer.android.com/preview/behavior-changes.html#ndk
So instead of OpenSSL being compiled for each arch and being statically linked in the .so, I believe now that the bordingSSL library so (or a?) should be linked directly through the ndk from the user's OS. OpenSSL has been deprecated and removed in favour of boringssl |
Hi @staticfish We have historically built a static OpenSSL because of the differing versions of OpenSSL bundled across the various Android OS's. We will consider this change in the future. |
Did anyone found time to look into this? |
The changes required to address this problem are not trivial and will likely require some major modifications to the library. We are currently in the middle of release preparation for an unrelated update. Once that is complete we will switch over to work on this issue.
I understand that this problem is an inconvenience, however, as you mentioned N is still an early developer release.
|
But that's what dev previews are for, make issues appear early and fix them. I really would like to continune testing the N dev preview, but i need a app based on this lib urgently and it's very annoying to being able to use it. PLEASE start on fixing this problem as soon as possible. |
Hopefully this gets prioritized soon. The ease for user's to install the latest dev preview has resulted in quite a few people not being able to run anything using your library. |
Hello guys, |
@smarkovik we just finished up a release of SQLCipher yesterday. Now that is out of the way, we'll be switching over to look at this issue as a priority. |
Hello @sjlombardo, |
Hi @smarkovik We are actively working on this project and will make our changes available as soon as everything is working. Thanks! |
Hi @sjlombardo We are also in same situation. Not able use our app on Android N because of this issue. Just want to check with you if you have any update or tentative dates of a possible update. Thanks |
@mvojjala we're making appreciable progress on this issue, but it does involve some fairly major changes. Keep an eye on this ticket, and/or at https://discuss.zetetic.net/c/sqlcipher for information about upcoming availability for testing. |
I appreciate the effort and the update @sjlombardo. |
Hi folks, We have just announced a beta of SQLCipher for Android with support for Android Developer N Preview here. Please take a look if you are interested in helping test out these changes. Thanks! |
Awsome work guys ! |
Thanks, we'll give it a try! |
Tnx. I think it will work, but I have also a dependency on IOCipher. It's crashing while loading |
Hi @zokipirlo It sounds as if IOCipher may need to be rebuilt referencing the new version of SQLCipher for Android. IOCipher has publish build instructions on their README here. |
It works great. Everything looks fine. Thank you. |
Hello @zokipirlo Thanks for the report, we are glad to hear it is working well for you! |
I am also really happy that you guys made the solution. I am especially happy that you guys removed the ICU and native setLocale parts, though it may be nice to have a version with ICU for those who may need it. I encounter 3 minor failures when I ran the SQLCipher test suite:
The following change would the invalid password test: --- a/src/main/java/net/zetetic/ZeteticApplication.java
+++ b/src/main/java/net/zetetic/ZeteticApplication.java
@@ -53,7 +53,10 @@ public class ZeteticApplication extends Application {
public SQLiteDatabase createDatabase(File databaseFile){
Log.i(TAG, "Entered ZeteticApplication::createDatabase");
Log.i(TAG, "Before SQLiteDatabase.openOrCreateDatabase");
- return SQLiteDatabase.openOrCreateDatabase(databaseFile, DATABASE_PASSWORD, null);
+ SQLiteDatabase database = SQLiteDatabase.openOrCreateDatabase(databaseFile, DATABASE_PASSWORD, null);
+ Log.i(TAG, "Populating the database");
+ database.rawExecSQL("CREATE TABLE IF NOT EXISTS MyTest (TestData)");
+ return database;
}
public void extractAssetToDatabaseDirectory(String fileName) throws IOException { The closed database test fails because it tries the SQLiteDatabase.setLocale function which then throws an java.lang.UnsatisfiedLinkError with a "Native method not found" message. Considering the native_setLocale method is no longer implemented, I would favor fixing SQLiteDatabase.setLocale to just throw a runtime exception with a message that the method is no longer implemented. |
Hi @brodybits Thank you for your feedback, it is much appreciated! Have you pulled down the latest changes to the SQLCipher for Android test suite? It should address those tests and also include a few new tests too. |
I missed it, I definitely like the changes to the test suite. I will give it a try sometime next week and let you know if I find anything else. An extra point is that I wish you guys would consider supporting a version that something like BoringSSL which supports 64-bit builds out of the box. |
Sounds good.
The 1.1.0 release of OpenSSL, currently scheduled for release on May 12th, 2016 will include support for x64. |
I just ran the test suite and it seems to run faster than before. Assuming that OpenSSL 1.1.0 is available next week will you release this change first or wait to include OpenSSL 1.1.0? (I would favor waiting for OpenSSL 1.1.0.) |
Hi @brodybits Yes, we would like to include the OpenSSL 1.1.0 release in a future beta build. We would like to gather ample feedback from the community regarding these changes before we integrate them forward as a public release. |
Internal testing looks fine. I released an app update on Play Store with this version of Sqlcipher :) Will tell you soon if any crash reports will occur. |
@developernotes |
I am using this code-branch on Android 5.1.1 and encountered a crash cannot reproduce. 06-02 14:29:24.558 W/linker: libsqlcipher.so: unused DT entry: type 0x6ffffffe arg 0x1f5f8 06-02 14:29:24.558 W/linker: libsqlcipher.so: unused DT entry: type 0x6fffffff arg 0x3` |
Hello @lena8912 Is it correct that you only received this error once, you haven't been able to reproduce it again? What device did you experience this on, or was it on an emulator? |
Yes I receive this error once and not able to reproduce it again. I'm using lg nexus 4, it's a real device and running 5.1.1 and I used android-n-preview branch code. |
Hello @lena8912 If you find you are able to reproduce this again, it would be beneficial to build the binaries locally and symbolicate the native stack trace from the adb logs. You can do this by executing the following before you run your application:
The above |
Hello @developernotes
since the first crash dump's :
Is this information useful? Thanks for ur reply!! |
Hi @lena8912 Thanks for looking into this further. The crash appears to be sourced within libc, and your log above references a linker warning for libsqlcipher.so. Do you still see the linker warnings even if there is no crash? Thanks |
@developernotes
it is shown in yellow color in logcat, so I think it might be just a warning. |
Building and usage on the x86 emulator works for me, however, building onto my Nexus 5x on newest Android M seems to produce this:
Issues with loading the sqlcipher.so it seems, any reason it can't find the symbol that I'm missing? For some more information, I was building with the newest ndk and targeting the android N final release for my application |
Hi @jaredpetker What branch of SQLCipher for Android are you compiling? What is the version number of your Android NDK? Are you running Android "M" (i.e., Marshmallow), or Android "N", the current beta OS on your Nexus 5X? |
@developernotes So it seems like the issue has to do with compiling sqlcipher with the newest (r12) ndk, using r11c seems to work fine (across x86 and arm for me). Seems to be an issue only for arm devices as my x86 emulator worked fine with the sqlcipher compiled with r12. |
Hi @jaredpetker Thanks for the quick response, I'm glad to hear that the issue was due to the NDK toolchain (unfortunately that is). Our building instructions suggest using r11c, glad to hear that is working well for you, too! |
Yea, I saw that initially and decided to live on the wild side which sadly bit me back, I assume you all have some pipeline internally for worrying about building with newer toolchains, until then yea, seems like all is well thanks! |
Hey @developernotes, do we know when will the update with this fix be released? Do we have a timeline in place? Looks like Google froze the APIs for N and is encouraging developers to get their apps ready for N soon. Any timeline would really help us plan! Thanks! |
I second that! On Tue, Jun 21, 2016, 08:10 ashishmody [email protected] wrote:
Tancho |
We are planning a release soon, now that the N API has been finalized, and we've tested the library against the latest Developer Preview 4 (i.e., NPD56N). We appreciate your patience and enthusiasm! |
Hi folks, This is just an update, we have just release SQLCipher for Android 3.5.0 with support for Android N. More information can be found here. Thanks! |
Will there be official binaries? The link in https://www.zetetic.net/sqlcipher/sqlcipher-for-android/ doesn't work for anything newer than 3.1.0 and when I build my own binaries, they are much larger (5 MB for armeabi and armeabi-v7a and 7 MB for x86) than the 1.6 MB mentioned in the blog post. |
Nevermind, found the aar at http://central.maven.org/maven2/net/zetetic/android-database-sqlcipher/3.5.0/android-database-sqlcipher-3.5.0.aar which is just a renamed zip file. (I just need the .so files for a .NET project) |
Hi @dfyx The native libraries included in the AAR package are compiled for the Android OS specifically and will not run on another environment. |
@developernotes I know. I was talking about a Xamarin Android project. |
@developernotes |
Hi @liuzhihuinb I was not able to reproduce the problem you describe with the SQLCipher for Android test suite. Are you doing something different? |
@developernotes |
Hi @liuzhihuinb It appears your application may have a problem with the |
Hi @developernotes |
Hello,
Google changed some things regarding linking/loading libs: https://developer.android.com/preview/behavior-changes.html#ndk
This also affects SQLCipher. E.g. the Test-Suite failed 10 out of 32 tests.

Log show up following:
The text was updated successfully, but these errors were encountered: