Closed poisins closed 5 years ago
Can I recive sample project for reproduce that bug?
I think it caused by Android write access permision or problom of path.
Sure.. Weird thing is that Codecoding's plugin is working fine with same configuration and code. Your provided sample code throws ReadOnly error too.
Android OS: 5.0
it is interesting.
my first testing
step
download new_mobileapp_u3d_cipher.zip
delete UnityPackages/SqlCipher4Unity3D/Plugins/x86 for compile error
delete UnityPackages/SqlCipher4Unity3D/Plugins/x64 for compile error
create keystore
android build - with development
Unity 5.6.0b10
Android OS : 6.0 - custom phone 6.0 - api 23
i got follow log that is worked. without readonly error.
Would you check this?
apk test on your test device. (it is for test device test) qwe123.apk.zip
apk is compiled by follow instruction. so if you don't want to test what i provided try that. (it is for compile enviroment test)
or test .so file base on codecoding/SQLite4Unity3d, change name this repo's libsqlcipher.so to libsqlite3.so .
Ok. Tried all test and got same error - ReadOnly :|
Will try on another device so maybe there's something with my device. Will do some research...
so_test.txt device_test.txt compiler_test.txt
UPDATE: After Googling for for this specific problem on Android devices, it seems that problem is in Android 5.0 OS. SQLCipher for Android has same problems.
um.. yea it looks like problem on android 5.0. I try to test on virtual device, but It didn't reproduce that bug.
there is latest android libsqlchiper.so https://github.com/sqlcipher/sqlcipher-android-tests/blob/master/libs/armeabi/libsqlcipher.so
Ok. Replaced existing library with latest SO file, and got this at startup & then crash:
03-13 09:49:30.569 3695-3716 E/art: JNI FindClass called with pending exception 'java.lang.ClassNotFoundException' thrown in unknown throw location 03-13 09:49:30.570 3695-3716 A/art: art/runtime/thread.cc:1115] No pending exception expected: java.lang.ClassNotFoundException: Didn't find class "net.sqlcipher.database.SQLiteDatabase" on path: DexPathList[[zip file "/data/app/com.poisins.test/base.apk"],nativeLibraryDirectories=[/data/app/com.poisins.test/lib/arm, /vendor/lib, /system/lib]] 03-13 09:49:30.570 3695-3716 A/art: art/runtime/thread.cc:1115] at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:56) 03-13 09:49:30.570 3695-3716 A/art: art/runtime/thread.cc:1115] at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:511) 03-13 09:49:30.570 3695-3716 A/art: art/runtime/thread.cc:1115] at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:469) 03-13 09:49:30.570 3695-3716 A/art: art/runtime/thread.cc:1115] at java.lang.String java.lang.Runtime.nativeLoad(java.lang.String, java.lang.ClassLoader, java.lang.String) (Runtime.java:-2) 03-13 09:49:30.570 3695-3716 A/art: art/runtime/thread.cc:1115] at java.lang.String java.lang.Runtime.doLoad(java.lang.String, java.lang.ClassLoader) (Runtime.java:428) 03-13 09:49:30.570 3695-3716 A/art: art/runtime/thread.cc:1115] at void java.lang.Runtime.load(java.lang.String, java.lang.ClassLoader) (Runtime.java:329) 03-13 09:49:30.570 3695-3716 A/art: art/runtime/thread.cc:1115] at void java.lang.System.load(java.lang.String) (System.java:982) 03-13 09:49:30.570 3695-3716 A/art: art/runtime/thread.cc:1115] at boolean com.unity3d.player.UnityPlayer.nativeRender() ((null):-2) 03-13 09:49:30.570 3695-3716 A/art: art/runtime/thread.cc:1115] at boolean com.unity3d.player.UnityPlayer.a(com.unity3d.player.UnityPlayer) ((null):-1) 03-13 09:49:30.570 3695-3716 A/art: art/runtime/thread.cc:1115] at boolean com.unity3d.player.UnityPlayer$b$1.handleMessage(android.os.Message) ((null):-1) 03-13 09:49:30.570 3695-3716 A/art: art/runtime/thread.cc:1115] at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:107) 03-13 09:49:30.570 3695-3716 A/art: art/runtime/thread.cc:1115] at void android.os.Looper.loop() (Looper.java:194) 03-13 09:49:30.570 3695-3716 A/art: art/runtime/thread.cc:1115] at void com.unity3d.player.UnityPlayer$b.run() ((null):-1) 03-13 09:49:30.570 3695-3716 A/art: art/runtime/thread.cc:1115] 03-13 09:49:30.570 3695-3716 A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 3716 (UnityMain)
It also need to sqlcipher.jar
on https://github.com/sqlcipher/sqlcipher-android-tests/tree/master/libs .
and um... Can i recive device info?
Ok. Will try with JAR file.
My device: http://www.just5.com/latvia/en/blaster-2
Update: Still ReadOnly even with latest library.
they are somthing on android-n-preview branch. but i'm not sure they fix that issue. but they try to build x86 only library - https://github.com/sqlcipher/android-database-sqlcipher/commit/c88dfdd2b937f02ee3fa17b5b72eef78b1fa09dc
https://github.com/sqlcipher/sqlcipher-android-tests/pull/17 https://github.com/sqlcipher/android-database-sqlcipher/issues/161
the problem has not been solved yet?
@cabanel yes. at first I havn't that device and make environment reproduce that bug. maybe it fixed future version of sqlcipher/sqlcipher-android. but not tested my version.
Hi :). After removal of libs folder from Plugins/Android and using the latest version of arr sqlcipher lib (https://github.com/sqlcipher/sqlcipher-android-tests/tree/master/app/libs) -- everything works fine;
@SevostianovIvanSIS thanks report, I will apply that lib later.
I applied https://github.com/sqlcipher/sqlcipher-android-tests/blob/master/app/libs/android-database-sqlcipher-3.5.9.aar
on this project.
but until stablize, this issue still be opened.
Hi! Thanks you for your commitment creating this Unity plugin.
Unfortunately, I have some problems. I can't use DB on Android (haven't tested on iOS yet). Every time I try to Insert data or create tables, I'm receiving ReadOnly exception, even when creating unencrypted database.
Everything is working fine from Unity Editor (Windows). Tried original plugin (Codecoding one, without encryption) with same code and everything is OK.
mobile_failed.txt