Couldn't find "libstlport_shared.so" on Samsung Galaxy S6, integrating SQLCipher with Android App


#1

I have gone through steps in the SQLCipher Tutorials for the latest Android. But I am getting different errors on newer mobiles and different errors on older. On Samsung Galaxy S6 I get the following error trace, it is unfortunately holding the release of our App to the Play Store, so it is fairly urgent for us to solve this issue.
I think the issue is that it doesn’t find the libraries required on 64 bit devices.

03-03 10:15:08.831 6693-6693/com.mycompany.myapp.mycomponent.debug E/Zygote: MountEmulatedStorage()
03-03 10:15:08.831 6693-6693/com.mycompany.myapp.mycomponent.debug E/Zygote: v2
03-03 10:15:08.831 6693-6693/com.mycompany.myapp.mycomponent.debug E/Zygote: accessInfo : 0
03-03 10:15:08.831 6693-6693/com.mycompany.myapp.mycomponent.debug E/SELinux: [DEBUG] get_category: variable seinfo: default sensitivity: NULL, cateogry: NULL
03-03 10:15:32.301 6693-6693/com.mycompany.myapp.mycomponent.debug E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.mycompany.myapp.mycomponent.debug, PID: 6693
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file “/system/framework/com.google.android.maps.jar”, zip file “/data/app/com.mycompany.myapp.mycomponent.debug-1/base.apk”],nativeLibraryDirectories=[/data/app/com.mycompany.myapp.mycomponent.debug-1/lib/arm64, /vendor/lib64, /system/lib64]]] couldn’t find "libstlport_shared.so"
at java.lang.Runtime.loadLibrary(Runtime.java:366)
at java.lang.System.loadLibrary(System.java:988)
at net.sqlcipher.database.SQLiteDatabase.loadLibs(SQLiteDatabase.java:118)
at net.sqlcipher.database.SQLiteDatabase.loadLibs(SQLiteDatabase.java:113)
at com.mycompany.myapp.mycomponent.mobile.MyMainActivity.onCreate(MyMainActivity.java:122)
at android.app.Activity.performCreate(Activity.java:6500)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1120)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3072)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3218)
at android.app.ActivityThread.access$1000(ActivityThread.java:198)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1676)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:6837)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)


#2

Hi @ghousk

SQLCipher for Android only includes native support for armeabi, armeabi-v7a, and x86 platforms. This issue is generally sourced from including other third party native libraries that include support for a non support architecture such as arm64 as the Android operating system native library loading mechanism does not adjust the directories it searches once it determines arm64 libraries are included within the application. This can usually be resolved by removing native library files that are not armeabi, armeabi-v7a, and x86. Would you give that a try and let us know your results? Thanks!


#3

Hi
Is there x86_64 support in SQLCipher now? If so where can we get the Native libs for that?

Kind Regards
Ghous


#4

Hi @ghousk

SQLCipher for Android does not current include 64-bit native binaries. We will investigate that with the next release.