-
Notifications
You must be signed in to change notification settings - Fork 568
SQLCipher under Android 4.0.3 #53
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
Hi Alexander-Campbell, We have had support for Android 2.1 - 4.0.3 since the 1.1 release. Could you share some additional information that will help us debug what issue you are seeing. What Android platform version are you using? What version of the SQLCipher for Android libraries are you using? Could you provide us a stacktrace of the error you are getting? Thanks! |
Hello, Android version 4.0.3 Find enclosed three logcat traces there appears to be some issues on loading then a crash on first DB commands. Any help would be more than welcome, if not do you have a test App, like NoteCipher that works under Android 4.0.3, the one I got from Google play crashes. Thank you De : Nick Parker [email protected] Hi Alexander-Campbell, We have had support for Android 2.1 - 4.0.3 since the 1.1 release. Could you share some additional information that will help us debug what issue you are seeing. What Android platform version are you using? What version of the SQLCipher for Android libraries are you using? Could you provide us a stacktrace of the error you are getting? Thanks! Reply to this email directly or view it on GitHub: D:\dev\Android\android-sdk\platform-tools>adb logcat D/dalvikvm( 276): GC_CONCURRENT freed 543K, 54% free 9564K/20679K, paused 1ms+3 D/dalvikvm( 2337): GC_FOR_ALLOC freed 13K, 4% free 6932K/7175K, paused 25ms E/Database( 2337): E/Database( 2337): E/AndroidRuntime( 2337): E/AndroidRuntime( 2337): Caused by: info.guardianproject.database.sqlcipher.SQLi E/AndroidRuntime( 2337): D:\dev\Android\android-sdk\platform-tools>adb logcat D/OpenGLRenderer( 437): Flushing caches (mode 0) D/OpenGLRenderer( 276): Flushing caches (mode 0) D/TextView( 2461): Constructor - Got Res id for appearance for textColorPrimaryI E/Database( 2461): E/Database( 2461): E/AndroidRuntime( 2461): E/AndroidRuntime( 2461): Caused by: info.guardianproject.database.sqlcipher.SQLi E/AndroidRuntime( 2461): E/AndroidRuntime( 2337): Caused by: info.guardianproject.database.sqlcipher.SQLi E/AndroidRuntime( 2337): D:\dev\Android\android-sdk\platform-tools>adb logcat D/OpenGLRenderer( 437): Flushing caches (mode 0) D/OpenGLRenderer( 276): Flushing caches (mode 0) D/TextView( 2461): Constructor - Got Res id for appearance for textColorPrimaryI E/Database( 2461): E/Database( 2461): E/AndroidRuntime( 2461): E/AndroidRuntime( 2461): Caused by: info.guardianproject.database.sqlcipher.SQLi E/AndroidRuntime( 2461): D:\dev\Android\android-sdk\platform-tools>adb logcat D/Finsky ( 2023): [1] 5.onFinished: Installation state replication succeeded. I/ActivityManager( 168): START {act=android.intent.action.MAIN cat=[android.int D/dalvikvm( 2536): GC_FOR_ALLOC freed 18K, 3% free 6933K/7111K, paused 27ms D/OpenGLRenderer( 276): Flushing caches (mode 0) W/ActivityManager( 168): Force finishing activity vgp.pad.app/.VGPadActivity Microsoft Windows [version 6.1.7600] D:\dev\Android\android-sdk\platform-tools>adb logcat -c D:\dev\Android\android-sdk\platform-tools>adb logcat D/dalvikvm( 437): GC_CONCURRENT freed 2343K, 26% free 11611K/15687K, paused 2ms D:\dev\Android\android-sdk\platform-tools>adb logcat D/dalvikvm( 276): GC_CONCURRENT freed 543K, 54% free 9564K/20679K, paused 1ms+3 D/dalvikvm( 2337): GC_FOR_ALLOC freed 13K, 4% free 6932K/7175K, paused 25ms E/Database( 2337): E/Database( 2337): E/AndroidRuntime( 2337): E/AndroidRuntime( 2337): Caused by: info.guardianproject.database.sqlcipher.SQLi E/AndroidRuntime( 2337): |
Hi Alexander-Campbell, We publish build packages that contain all resources needed for proper integration. The 'not an error' error could be the cause of a different icu dat file being used. Could you attempt to recreate it with all the files provided in the 1.1 build release. This will include the icu zip file found in the assets directory in our distribution. You will want to leave the icudt46l.zip as is within your assets directory, SQLCipher will manage the extraction. Also, if you'd like a small sample that shows the 1.1 libraries integrated with an Android application, I've publish one you can view here: https://github.com/developernotes/sqlcipher-demo Please let us know your results. Thanks! |
Hello, Firstly the test app you provided works, phew !!! The 1.1 libraries you send are the same as the initial libraries I started with, I replaced these anyway, including assets zip file. I am getting the same error as before, can I ask you some questions about trace ... No JNI_OnLoad found in /data/data/vgp.pad.app/lib/libstlport_shared.so 0x410bd228, skipping init is this normal ? sqlite returned: error code = 21, msg = API called with NULL prepared statement What does error code 21 and 11 mean ? My gut feeling is that I calling the loadLibs in the wrong place, I am using SQLiteDatabase as a class with a sub class for the SQLiteOpenHelper, if you want I can send the an extract of the code. thanks again De : Nick Parker [email protected] Hi Alexander-Campbell, We publish build packages that contain all resources needed for proper integration. The 'not an error' error could be the cause of a different icu dat file being used. Could you attempt to recreate it with all the files provided in the 1.1 build release. This will include the icu zip file found in the assets directory in our distribution. You will want to leave the icudt46l.zip as is within your assets directory, SQLCipher will manage the extraction. Also, if you'd like a small sample that shows the 1.1 libraries integrated with an Android application, I've publish one you can view here: https://github.com/developernotes/sqlcipher-demo Please let us know your results. Thanks! Reply to this email directly or view it on GitHub: |
Hello Alexander, The log line "No JNI_OnLoad found ... skipping init" is normal. We would need to see how you are using the code to generate error code 21. In regards to error code 11, are you attempting to use an existing database, or is it new? If it is an existing database, is it a standard sqlite database or an existing sqlcipher database? You need to call SQLiteDatabase.loadLibs before you call any other database operation. Could you provide us with a code example that demonstrates the problem you are seeing via Gist [1]? |
Hello, VGPDatabase vgpdb; vgpdb = new VGPDatabase (context); With normal SQLLite this works fine, If I run this in DB mode it crashes in the vgpdb.open call. As ever De : Nick Parker [email protected] Hello Alexander, The log line "No JNI_OnLoad found ... skipping init" is normal. We would need to see how you are using the code to generate error code 21. In regards to error code 11, are you attempting to use an existing database, or is it new? If it is an existing database, is it a standard sqlite database or an existing sqlcipher database? You need to call SQLiteDatabase.loadLibs before you call any other database operation. Could you provide us with a code example that demonstrates the problem you are seeing via Gist [1]? Reply to this email directly or view it on GitHub: |
Hi Alex, Is there a link to the code you pushed to Github? I don't see anything listed on https://github.com/Alexander-Campbell. Could you please provide an example that demonstrates the error you are getting? Thanks! |
Hello, De : Nick Parker [email protected] Hi Alex, Is there a link to the code you pushed to Github? I don't see anything listed on https://github.com/Alexander-Campbell. Could you please provide an example that demonstrates the error you are getting? Thanks! Reply to this email directly or view it on GitHub: |
Hello Alexander, Did you try replacing all of the libraries and the icudt46l.zip in your assets directory with those found in the link I provided above? Could you try that and share your results? Thanks! |
Hello, thanks for the help. De : Nick Parker [email protected] Hello Alexander, Did you try replacing all of the libraries and the icudt46l.zip in your assets directory with those found in the link I provided above? Could you try that and share your results? Thanks! Reply to this email directly or view it on GitHub: |
Alexander, Thanks for getting back to us, glad to hear you resolved your issues. |
Hello,
I am writing an Android APP using SQLite, I looked at using SQLCipher but this crashes, on first DB commands, I have since sorted library loading issues and got the icu46.zip patch, still crashes.
I then downloaded NoteCipher to see if this worked and it did not.
Does this mean the SQLCipher will not work in my Android enviroment ?
I have looked at some other forum questions and some developers are re-building the SQLCipher from source themselves. If you want I can provide traces from logcat but it appears to be a similar issue as reported in issues #34 and #36.
Any suggestions ?
The text was updated successfully, but these errors were encountered: