Closed ashishdimi09 closed 5 years ago
Hi @ashishdimi09
The reason you are seeing this is that SQLCipher for Android is moving to a minimum Android SDK requirement per deployment requirements Google Play has put in place. You can read more about the details of this here.
You can still use the test suite however by modifying the build.gradle file to use a remote version of the SQLCipher for Android AAR package versioned at 4.0.1 and adjust your minSdkVersion to a lower level. You will need to comment out the tests such as CreateOpenDatabaseWithByteArrayTest
which have been recently added and are not supported in 4.0.1.
Hi @developernotes
I have commented the tests such as CreateOpenDatabaseWithByteArrayTest
but now getting below error
Logs: https://gist.github.com/ashishdimi09/c2821d52779d4bb031fc54a461ee0692
--------- beginning of main 03-14 17:06:21.561 1799-1809/? V/MotorolaSettingsProvider: getSecureSetting(aov_google_now_component_name, 0) 03-14 17:06:21.562 1799-2984/? I/ActivityManager: START u0 {cmp=net.zetetic.sqlcipher.test/net.zetetic.activities.TestScrollingCursorActivity} from uid 11698 on display 0 03-14 17:06:21.756 3513-3513/net.zetetic.sqlcipher.test D/AndroidRuntime: Shutting down VM --------- beginning of crash 03-14 17:06:21.767 3513-3513/net.zetetic.sqlcipher.test E/AndroidRuntime: FATAL EXCEPTION: main Process: net.zetetic.sqlcipher.test, PID: 3513 java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__aeabi_memcpy4" referenced by "/data/app/net.zetetic.sqlcipher.test-1/lib/arm/libsqlcipher.so"... at java.lang.Runtime.loadLibrary(Runtime.java:372) at java.lang.System.loadLibrary(System.java:1076) at net.sqlcipher.database.SQLiteDatabase$1.loadLibraries(SQLiteDatabase.java:223) at net.sqlcipher.database.SQLiteDatabase.loadLibs(SQLiteDatabase.java:240) at net.sqlcipher.database.SQLiteDatabase.loadLibs(SQLiteDatabase.java:219) at net.sqlcipher.database.SQLiteDatabase.loadLibs(SQLiteDatabase.java:212) at net.zetetic.activities.TestScrollingCursorActivity.initializeEnvironment(TestScrollingCursorActivity.java:96) at net.zetetic.activities.TestScrollingCursorActivity.onCreate(TestScrollingCursorActivity.java:48) at android.app.Activity.performCreate(Activity.java:6245) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1130) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2379) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2490) at android.app.ActivityThread.-wrap11(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1354) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5443) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) 03-14 17:06:21.769 1799-6890/? W/ActivityManager: Force finishing activity net.zetetic.sqlcipher.test/net.zetetic.activities.TestScrollingCursorActivity 03-14 17:06:21.775 1799-6890/? W/ActivityManager: Force finishing activity net.zetetic.sqlcipher.test/net.zetetic.activities.TestRunnerSelectionActivity
Hi @ashishdimi09
Is that from running the test suite on device, or within an emulator? Can you verify that you are able to run the test suite on an emulator first if you haven't tried that?
Hi @developernotes
I have tested the same project with another device LG Nexus 5x (Android 8.1.0), it's working fine but getting above error in Moto G(2nd Generation/ Android Marshmallow 6.0) :(
Hi @ashishdimi09
We have just released a new build of SQLCipher for Android 4.1.1 (release details here). The new minimum SDK version for the library will be 21.
Hi @developernotes
Thanks, Nick! I have checked the dashboards for android distribution, KitKat (API 19) itself taking 7.6% active devices. We will lose a lot of active users for using the new SQLCipher 4.1.1.
Why did you decide to set minSdkVersion to API21? https://github.com/sqlcipher/android-database-sqlcipher/issues/432#issuecomment-474749729
Hi @ashishdimi09
We recently released SQLCipher for Android 4.1.2 which adjusts our API support back down to 14 for 32-bit CPU's. Would you give that a try and let us know your results? Thanks!
Hi
I have tried to test the updated test suite (with SQLCipher v4.1.3), not faced any crash or issue but its failed for Java Client Library Version Test, Is it okay?
Behaviour Test Suite.txt And Run Reverse scroll Cursor Suite.txt
Hello @ashishdimi09
Would you pull down the latest from the test suite and try again? It now references 4.1.3 directly which should address what you are seeing.
Hello, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "bug", "enhancement", or "security" and I will leave it open. Thank you for your contributions.
Hi @developernotes
It's working for me so I am closing this ticket. Thank you!
Hi @ashishdimi09
Great, we are happy to hear everything is working. Take care!
Hi @developernotes
As per your suggestion, I have just modify the minSdkVersion setting (API Level 15) within build.gradle but getting below failed build error
Then i tried to add below code in android manifest and its works
<uses-sdk tools:overrideLibrary="net.sqlcipher"/>
But while running its crashed in Moto G(2nd Generation/ Android Marshmallow 6.0)
Can please suggest how can we run test suite for Android v4.4.4 (API level 19) or v7.0 (API level 24) as in SQLCipher's test suite project having minSdkVersion 26?