SQLCipher for Android ver.4.1.3 crashes on Android 5.1.1

Dear Team,

After updating SQL Chipper from 3.1.0 to 4.1.3 and releasing it to the market for 64 bit support, many Android 5.1.1 users have reported crashes.

As a result that we analyzed with Android 5.1.1,
It seems to be crashing with SQLiteDatabase.loadLibs.


W / linker: ourapp / lib / arm64 / libsqlcipher.so: unused DT entry: type 0x6ffffffe arg 0x7768
W / linker: ourapp / lib / arm64 / libsqlcipher.so: unused DT entry: type 0x6fffffff arg 0x3

As a trial, I incorporated an AAR using elf cleaner posted at the following URL, but it did not improve.

Finally, the problem was solved when a new application that incorporated SQL Chiper ver.4.0.1 was installed.
However, applications incorporating SQL Chipper ver.4.1.3 have already been released to the market and can not be easily downgraded.

Is there a problem with compatibility between SQL Chiper ver.4.1.3 and Android 5.1.1?
Please tell me the solution.

1 Like

Hello @Shintaro,

We just restored a factory image of Android OS 5.1.1 onto a Nexus 9, then ran the SQLCipher for Android test suite using 4.1.3 and all tests pass. Out of curiosity, what device(s) are you seeing the error on? Are they the Oppo devices mentioned in the GitHub Issue you linked to?

Thank you for answer immediately!

We also restored ver.5.1.1 to Nexus 7 and confirmed its operation, but it worked without problems.

Apparently, it does not occur with all Android 5.1.1, but seems to be limited to some devices.

However, although the devices for which a crash was reported here are all models manufactured by a Japanese manufacturer, these are reports from multiple manufacturers, so it is unlikely to be a defect by the manufacturer.

The OPPO we referred to is the same error code, so I think it’s the same cause.

If possible, is it possible to check a little more on other Android 5.1.1 smartphones?

In addition, because SQL Chiper 4.0.1 works without any problems, is there no cause for the difference between 4.0.1 and 4.1.x?

Hi @Shintaro

Can you provide a list of devices models, with their Android OS version that have reported this issue? Also, are you a Commercial Edition license holder of SQLCipher for Android?

Hello Nick,

Thank you for your consideration.
Very sorry, we do not have Commercial Edition license.

A list of devices models is below.

  • KYOCERA DIGNO rafre Android 5.1.1
  • FUJITSU ARROWS M02 Android 5.1.1

The phenomenon appears to be limited to Android 5.1.1 and manufacturer models only.

Hello all,

@Shintaro have you fixed your problem?

@developernotes I have the similar issue, same log message and same behavior - an app can not be opened. An App is closed without any dialog. I tried sqlcipher 4.1.3 and 4.2.0.
With sqlcipher 4.0.1 there is no issue, but I have an issue with db migration.

My device is very specific - Bluebird ef500 with Android 5.1.1.

Is there is any way to fix the issue?

Thanks!

@vit - do you actually have a Bluebird ef500 with Android 5.1.1 in your possession? If so, can you please run the SQLCipher for Android Test Suite on the device and tell us if you are able to reproduce any crashes, and if so, in what tests?

I have run all the test, and they all failed. Please see logs taken from Logcat:

08-07 05:06:00.979 3153-3153/? I/art: Late-enabling -Xcheck:jni
08-07 05:06:00.997 3153-3163/? I/art: Debugger is no longer active
08-07 05:06:01.153 3153-3153/? I/InstantRun: starting instant run server: is main process
08-07 05:06:01.270 3153-3153/? I/ViewRootImpl: CPU Rendering VSync enable = false
08-07 05:06:01.271 3153-3172/? D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
08-07 05:06:01.276 3153-3153/? D/Atlas: Validating map…
08-07 05:06:01.310 3153-3172/? I/Adreno-EGL: <qeglDrvAPI_eglInitialize:379>: EGL 1.4 QUALCOMM build: AU_LINUX_ANDROID_LA.BR.1.1.3_RB1.05.01.00.032.017_msm8916_64_LA.BR.1.1.3_RB1__release_AU (I3578547039)
OpenGL ES Shader Compiler Version: E031.25.03.04
Build Date: 05/26/15 Tue
Local Branch: mybranch10361660
Remote Branch: quic/LA.BR.1.1.3_rb1.15
Local Patches: NONE
Reconstruct Branch: AU_LINUX_ANDROID_LA.BR.1.1.3_RB1.05.01.00.032.017 + 26a3cba + 6f69ea6 + 8bc2bc8 + 649fcde + a52cccf + dbf281f + 15f0bf8 + 8d02f76 + 9b2cb1a + 25f3b04 + NOTHING
08-07 05:06:01.311 3153-3172/? I/OpenGLRenderer: Initialized EGL, version 1.4
08-07 05:06:01.320 3153-3172/? D/OpenGLRenderer: Enabling debug mode 0
08-07 05:06:01.373 3153-3153/? I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy@313d2bb4 time:945882260
08-07 05:06:04.049 3153-3153/net.zetetic.sqlcipher.test I/Timeline: Timeline: Activity_launch_request id:net.zetetic.sqlcipher.test time:945884936
08-07 05:06:04.115 3153-3168/net.zetetic.sqlcipher.test W/art: Suspending all threads took: 19.585ms
08-07 05:06:04.119 3153-3168/net.zetetic.sqlcipher.test I/art: Background sticky concurrent mark sweep GC freed 4657(259KB) AllocSpace objects, 0(0B) LOS objects, 26% free, 847KB/1161KB, paused 20.650ms total 57.817ms
08-07 05:06:04.200 3153-3153/net.zetetic.sqlcipher.test W/linker: /data/app/net.zetetic.sqlcipher.test-1/lib/arm64/libsqlcipher.so: unused DT entry: type 0x6ffffffe arg 0x7810
08-07 05:06:04.200 3153-3153/net.zetetic.sqlcipher.test W/linker: /data/app/net.zetetic.sqlcipher.test-1/lib/arm64/libsqlcipher.so: unused DT entry: type 0x6fffffff arg 0x3

The tests were run on Bluebird ef500 with Android 5.1.1.

Hello @vit

Unfortunately, we do not have that specific device to test on. We do have a suggestion, however it will require you to compile a command line utility using the Android NDK and post process the native libraries found within the SQLCipher for Android AAR artifact available here. The AAR package was built using the Android NDK version r15c available here.

  1. Download the AAR file linked above, rename the file extension to .zip and unzip it
  2. Compile the android-elf-cleaner utility using these instructions
  3. Run the android-elf-cleaner binary on all libsqlcipher.so files located within the following folders of the unzipped archive:
    a. jni/armeabi/libsqlcipher.so
    b. jni/armeabi-v7a/libsqlcipher.so
    c. jni/x86/libsqlcipher.so
    d. jni/x86_64/libsqlcipher.so
    e. jni/arm64-v8a/libsqlcipher.so
  4. Zip the android-database-sqlcipher-4.2.0 folder and rename the extension from .zip to .aar.
  5. Adjust your project to reference this locally modified AAR package instead of the Community Edition version
  6. Test your project again

We look forward to hearing your results. Thanks!

Few of our users are facing the same issue on Kyocera/Sony devices with 5.1.1. We are trying to get hold of some of them.

Hi @developernotes

Followed the steps. The app crashes with error message below:

08-23 14:21:45.315 12997 12997 E AndroidRuntime: java.lang.UnsatisfiedLinkError: dlopen failed: cannot find verneed/verdef for version index=2 referenced by symbol “strcmp” at “jS9-qSkjTYXcq0PRa_FL5Q==/lib/arm64/libsqlcipher.so”

Hi @snouv

Are you using abiFilter when building your application?

yes

ndk {
abiFilters “x86”,“x86_64”, “armeabi-v7a”, “arm64-v8a”
}

@snouv - are you using any other libraries that include native components?

Yes, there are other native libraries. I can confirm that each abi folder contains the same number of *.so files.

Hello all,

Followed the steps provided by @developernotes the app also crashes with error message:
java.lang.UnsatisfiedLinkError: dlopen failed: cannot find verneed/verdef for version index=2 referenced by symbol “strcmp” at “lib/arm/libsqlcipher.so”

However on my specific device - Bluebird ef500 the app also cannot be opened. It`s closed without any exception.

@developernotes Do you have enough information to address this issue. Let us know if there is anything we can help you with.

Hi @rsarma

Do you have a device available that you can reproduce the issue on?

Its with one of our support in a different location. If you have instrumented libraries, we can help get logs/test. @snouv from our team, had some issues testing with the modified aar you suggested.

Reproducible on Oppo A37 and VIVO Y51.
This issue happening mostly on devices with MSM8916 processor with Android Lollipop.