Unable to find sqlcipher_android in two devices

I use libsqlcipher_android.so in Unity by using DllImport.
I have tested some devices and they were running fine. However, when I installed the app in Vivo Y22 and Hongmi 1, I got the error message:
Unable to find sqlcipher_android.

I replaced libsqlcipher_android by using another libsqlite3.so which does not have function of key,rekey, and renamed libsqlite3.so to libsqlcipher_android.so. the app became fine.

I am so confused and try to find out the reason, but failed.

Could you help me?
thanks.

log--------------------------- :
Unity Unable to find sqlcipher_android
Unity DllNotFoundException: sqlcipher_android
Unity at (wrapper managed-to-native)Mono,Data,Sqlite.UnsafeNativeMethods:sqlite3_open_v2(byte[], intptr&, int intptr)

DllImport------------------:
[DllImport(SQLITE_DLL)]
internal static extern int sqlite3_open_v2(byte[] utf8Filename, out IntPtr db, int flags, IntPtr vfs);

Environment---------------:
VIVO Y22: Funtouch OS based on Android 4.2.2, CPU 1.3GHz Quad-Core
Hongmi 1:MIUI V5 based on Android 4.2.1 CPU MT6589T

Hi @LiMingjian

Using a standard SQLite library will not provide the ability to encrypt the database like SQLCipher. I believe the Vivo Y22 is using an ARM Cortex A7 CPU with an aremabi-v7a architecture. What is the architecture of the native library you have been deploying so far?

My program which uses armv7 can be used normally in Nexsu6, Samsung Galaxy 4, Huawei honor, oppo, zuk and mx5, but failed in vivo Y22 and Hongmi 1.

arm, armv7 and x86 were tested in a simple program,
3.1.0 and 3.3.1 both were tested.
but none of them was worked.

Have you found this error before?
I don’t want to believe that sqlcipher has problem. Maybe unity has bugs on building apk.
Maybe I should pay attention to libdatabase_sqlcipher.so && libstlport_shared.so. But I think it is unnecessary if I call libsqlcipher_android.so by using DllImport. Is it enough that I only import libsqlcipher_android.so in my Unity3D application.

Update:
I write a android application following https://www.zetetic.net/sqlcipher/sqlcipher-for-android/. It works fine.
I think it is wrong that using DllImport to call libsqlcipher_android.so, but I am not sure

Update2:
I have write a example java android application.
if I only use System.loadlib(“sqlcipher_android”);, I works fine in other devices expect Vivo Y22 && Hongmi 1
if I use System,loadlib(“lstlport_shared”); and System.loadlib(“sqlcipher_android”), It works fine in Hongmi 1.
Does it mean that sqlcipher_android depences on stlport_shared?


Finished:
Sqlcipher_android depends on stlport_shared actually. I load stlport_shared first and load another later, the application works.

But I still do not know the database_sqlcipher’s functions.

Hi @LiMingjian

I’m glad to hear you were able to resolve the issue. Take care!