Skip to content

UnsatisfiedLinkError #124

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
maven-y opened this issue Feb 27, 2014 · 6 comments
Closed

UnsatisfiedLinkError #124

maven-y opened this issue Feb 27, 2014 · 6 comments

Comments

@maven-y
Copy link

maven-y commented Feb 27, 2014

I have integrated sqlcipher android library but getting UnsatisfiedLinkError while loading the library

02-27 11:33:10.608: E/AndroidRuntime(21826): FATAL EXCEPTION: main
02-27 11:33:10.608: E/AndroidRuntime(21826): java.lang.UnsatisfiedLinkError: Native method not found: net.sqlcipher.database.SQLiteDatabase.dbopen:(Ljava/lang/String;I)V
02-27 11:33:10.608: E/AndroidRuntime(21826): at net.sqlcipher.database.SQLiteDatabase.dbopen(Native Method)
02-27 11:33:10.608: E/AndroidRuntime(21826): at net.sqlcipher.database.SQLiteDatabase.(SQLiteDatabase.java:1942)
02-27 11:33:10.608: E/AndroidRuntime(21826): at net.sqlcipher.database.SQLiteDatabase.(SQLiteDatabase.java:1920)
02-27 11:33:10.608: E/AndroidRuntime(21826): at example.SQLDemoActivity.onCreate(SQLDemoActivity.java:19)
02-27 11:33:10.608: E/AndroidRuntime(21826): at android.app.Activity.performCreate(Activity.java:5020)
02-27 11:33:10.608: E/AndroidRuntime(21826): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
02-27 11:33:10.608: E/AndroidRuntime(21826): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148)
02-27 11:33:10.608: E/AndroidRuntime(21826): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2211)
02-27 11:33:10.608: E/AndroidRuntime(21826): at android.app.ActivityThread.access$600(ActivityThread.java:149)
02-27 11:33:10.608: E/AndroidRuntime(21826): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1300)
02-27 11:33:10.608: E/AndroidRuntime(21826): at android.os.Handler.dispatchMessage(Handler.java:99)
02-27 11:33:10.608: E/AndroidRuntime(21826): at android.os.Looper.loop(Looper.java:153)
02-27 11:33:10.608: E/AndroidRuntime(21826): at android.app.ActivityThread.main(ActivityThread.java:4987)
02-27 11:33:10.608: E/AndroidRuntime(21826): at java.lang.reflect.Method.invokeNative(Native Method)
02-27 11:33:10.608: E/AndroidRuntime(21826): at java.lang.reflect.Method.invoke(Method.java:511)
02-27 11:33:10.608: E/AndroidRuntime(21826): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:821)
02-27 11:33:10.608: E/AndroidRuntime(21826): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:584)
02-27 11:33:10.608: E/AndroidRuntime(21826): at dalvik.system.NativeStart.main(Native Method)

@developernotes
Copy link
Member

Hello @ManishYadav91

Please make sure you have copied over all of the files, a tutorial on the integration process can be found here. Also, as an example, the SQLCipher for Android test suite can be found here with all the libraries integrated.

@maven-y
Copy link
Author

maven-y commented Feb 28, 2014

I m trying to implement https://github.com/sqlcipher/sqlcipher-android-tests/ on my end thanks for considering me.

@maven-y
Copy link
Author

maven-y commented Feb 28, 2014

Still getting this error in my logcat (emmulator) with crash

02-28 11:50:25.985: I/MultiThreadReadWriteTest(2435): reader thread 4 - record:393, a:one for the money b:two for the show
02-28 11:50:25.985: I/MultiThreadReadWriteTest(2435): reader thread 4 - record:394, a:one for the money b:two for the show
02-28 11:50:25.985: I/MultiThreadReadWriteTest(2435): reader thread 4 - record:395, a:one for the money b:two for the show
02-28 11:50:25.989: I/MultiThreadReadWriteTest(2435): reader thread 4 - record:396, a:one for the money b:two for the show
02-28 11:50:25.989: I/MultiThreadReadWriteTest(2435): reader thread 4 - record:397, a:one for the money b:two for the show
02-28 11:50:25.989: I/MultiThreadReadWriteTest(2435): reader thread 4 - record:398, a:one for the money b:two for the show
02-28 11:50:25.989: I/MultiThreadReadWriteTest(2435): reader thread 4 - record:399, a:one for the money b:two for the show
02-28 11:50:25.989: I/MultiThreadReadWriteTest(2435): reader thread 4 - record:400, a:one for the money b:two for the show
02-28 11:50:28.893: D/dalvikvm(2435): threadid=49: still suspended after undo (sc=1 dc=1)
02-28 11:50:28.893: D/dalvikvm(2435): threadid=43: still suspended after undo (sc=1 dc=1)
02-28 11:50:28.893: D/dalvikvm(2435): threadid=42: still suspended after undo (sc=1 dc=1)
02-28 11:50:28.893: D/dalvikvm(2435): threadid=36: still suspended after undo (sc=1 dc=1)
02-28 11:50:28.893: D/dalvikvm(2435): threadid=44: still suspended after undo (sc=1 dc=1)
02-28 11:50:28.893: D/dalvikvm(2435): threadid=37: still suspended after undo (sc=1 dc=1)
02-28 11:50:28.893: D/dalvikvm(2435): threadid=48: still suspended after undo (sc=1 dc=1)
02-28 11:50:28.893: D/dalvikvm(2435): threadid=33: still suspended after undo (sc=1 dc=1)
02-28 11:50:28.893: D/dalvikvm(2435): threadid=46: still suspended after undo (sc=1 dc=1)
02-28 11:50:28.893: D/dalvikvm(2435): threadid=47: still suspended after undo (sc=1 dc=1)
02-28 11:50:28.893: D/dalvikvm(2435): threadid=41: still suspended after undo (sc=1 dc=1)
02-28 11:50:28.893: D/dalvikvm(2435): threadid=39: still suspended after undo (sc=1 dc=1)
02-28 11:50:28.893: D/dalvikvm(2435): threadid=40: still suspended after undo (sc=1 dc=1)
02-28 11:50:28.893: D/dalvikvm(2435): threadid=35: still suspended after undo (sc=1 dc=1)
02-28 11:50:28.893: W/dalvikvm(2435): threadid=45: thread exiting with uncaught exception (group=0xa62aa288)
02-28 11:50:28.893: E/AndroidRuntime(2435): FATAL EXCEPTION: Thread-259
02-28 11:50:28.893: E/AndroidRuntime(2435): java.lang.IllegalStateException: database not open
02-28 11:50:28.893: E/AndroidRuntime(2435): at net.sqlcipher.database.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1429)
02-28 11:50:28.893: E/AndroidRuntime(2435): at net.sqlcipher.database.SQLiteDatabase.rawQuery(SQLiteDatabase.java:1410)
02-28 11:50:28.893: E/AndroidRuntime(2435): at net.zetetic.tests.MultiThreadReadWriteTest$Reader.getCurrentTableCount(MultiThreadReadWriteTest.java:115)
02-28 11:50:28.893: E/AndroidRuntime(2435): at net.zetetic.tests.MultiThreadReadWriteTest$Reader.run(MultiThreadReadWriteTest.java:94)
02-28 11:50:28.893: E/AndroidRuntime(2435): at java.lang.Thread.run(Thread.java:856)

@maven-y
Copy link
Author

maven-y commented Feb 28, 2014

This crash in my lenovo Tab 4.1.2

screenshot_2014-02-28-12-08-57
screenshot_2014-02-28-12-08-48
02-28 12:01:47.165: I/Zetetic(1000): Running test:Custom Cross Process Cursor Test
02-28 12:01:47.264: I/SurfaceTextureClient(1000): [0x51394bb8] frames:1, duration:1.681000, fps:0.594780
02-28 12:01:48.721: D/dalvikvm(1000): Trying to load lib /data/data/net.zetetic/lib/libstlport_shared.so 0x42554418
02-28 12:01:48.721: D/dalvikvm(1000): Shared lib '/data/data/net.zetetic/lib/libstlport_shared.so' already loaded in same CL 0x42554418
02-28 12:01:48.722: D/dalvikvm(1000): Trying to load lib /data/data/net.zetetic/lib/libsqlcipher_android.so 0x42554418
02-28 12:01:48.722: D/dalvikvm(1000): Shared lib '/data/data/net.zetetic/lib/libsqlcipher_android.so' already loaded in same CL 0x42554418
02-28 12:01:48.722: D/dalvikvm(1000): Trying to load lib /data/data/net.zetetic/lib/libdatabase_sqlcipher.so 0x42554418
02-28 12:01:48.722: D/dalvikvm(1000): Shared lib '/data/data/net.zetetic/lib/libdatabase_sqlcipher.so' already loaded in same CL 0x42554418
02-28 12:01:48.722: E/Posix(1000): [CDS]Libcore_io_Posix-throwErrnoException, functionName: access; errno: No such file or directory
02-28 12:01:50.307: I/Zetetic(1000): Running test:Custom Inter-Process Blob Test
02-28 12:01:50.431: I/SurfaceTextureClient(1000): [0x51394bb8] frames:1, duration:3.164000, fps:0.316001
02-28 12:01:51.922: D/jdwp(1255): handlePacket : cmd=0x1, cmdSet=0xC7, len=0x13, id=0x400001FA, flags=0x0, dataLen=0x8
02-28 12:01:51.929: E/Trace(1255): error opening trace file: No such file or directory (2)
02-28 12:01:51.930: D/jdwp(1255): sendBufferedRequest : len=0x3F
02-28 12:01:51.937: D/dalvikvm(1255): open_cached_dex_file : /data/app/net.zetetic-1.apk /data/dalvik-cache/data@app@net.zetetic-1.apk@classes.dex
02-28 12:01:51.940: I/ActivityThread(1255): Pub net.zetetic.sqlcipher.zeteticprovider2: net.zetetic.ZeteticContentProvider2
02-28 12:01:51.945: D/ActivityThread(1255): BIND_APPLICATION handled : 0 / AppBindData{appInfo=ApplicationInfo{42547b90 net.zetetic}}
02-28 12:01:51.946: D/dalvikvm(1255): Trying to load lib /data/data/net.zetetic/lib/libstlport_shared.so 0x4254b078
02-28 12:01:51.948: D/dalvikvm(1255): Added shared lib /data/data/net.zetetic/lib/libstlport_shared.so 0x4254b078
02-28 12:01:51.948: D/dalvikvm(1255): No JNI_OnLoad found in /data/data/net.zetetic/lib/libstlport_shared.so 0x4254b078, skipping init
02-28 12:01:51.948: D/dalvikvm(1255): Trying to load lib /data/data/net.zetetic/lib/libsqlcipher_android.so 0x4254b078
02-28 12:01:51.951: D/dalvikvm(1255): Added shared lib /data/data/net.zetetic/lib/libsqlcipher_android.so 0x4254b078
02-28 12:01:51.951: D/dalvikvm(1255): No JNI_OnLoad found in /data/data/net.zetetic/lib/libsqlcipher_android.so 0x4254b078, skipping init
02-28 12:01:51.951: D/dalvikvm(1255): Trying to load lib /data/data/net.zetetic/lib/libdatabase_sqlcipher.so 0x4254b078
02-28 12:01:51.953: D/dalvikvm(1255): Added shared lib /data/data/net.zetetic/lib/libdatabase_sqlcipher.so 0x4254b078
02-28 12:01:51.953: I/Database(1255): JNI_OnLoad called
02-28 12:01:51.953: I/Database(1255): JNI_OnLoad register methods
02-28 12:01:51.954: E/Posix(1255): [CDS]Libcore_io_Posix-throwErrnoException, functionName: access; errno: No such file or directory
02-28 12:01:53.548: D/IPCThreadState(1255): [DN #5] BR_CLEAR_DEATH_NOTIFICATION_DONE cookie 0x513cb1d8
02-28 12:01:53.552: I/Zetetic(1000): Running test:Looping Query Test
02-28 12:01:53.686: I/SurfaceTextureClient(1000): [0x51394bb8] frames:1, duration:3.249000, fps:0.307703
02-28 12:01:57.166: D/dalvikvm(1000): GC_CONCURRENT freed 510K, 8% free 7074K/7671K, paused 11ms+7ms, total 33ms
02-28 12:01:57.311: E/Database(1000): close() was never explicitly called on database '/data/data/net.zetetic/databases/test.db'
02-28 12:01:57.311: E/Database(1000): net.sqlcipher.database.DatabaseObjectNotClosedException: Application did not close the cursor or database object that was opened here
02-28 12:01:57.311: E/Database(1000): at net.sqlcipher.database.SQLiteDatabase.(SQLiteDatabase.java:1939)
02-28 12:01:57.311: E/Database(1000): at net.sqlcipher.database.SQLiteDatabase.openDatabase(SQLiteDatabase.java:875)
02-28 12:01:57.311: E/Database(1000): at net.sqlcipher.database.SQLiteDatabase.openDatabase(SQLiteDatabase.java:868)
02-28 12:01:57.311: E/Database(1000): at net.sqlcipher.database.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:903)
02-28 12:01:57.311: E/Database(1000): at net.sqlcipher.database.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:914)
02-28 12:01:57.311: E/Database(1000): at net.zetetic.tests.InvalidPasswordTest.execute(InvalidPasswordTest.java:21)
02-28 12:01:57.311: E/Database(1000): at net.zetetic.tests.SQLCipherTest.run(SQLCipherTest.java:30)
02-28 12:01:57.311: E/Database(1000): at net.zetetic.tests.TestSuiteRunner.runSuite(TestSuiteRunner.java:37)
02-28 12:01:57.311: E/Database(1000): at net.zetetic.tests.TestSuiteRunner.doInBackground(TestSuiteRunner.java:18)
02-28 12:01:57.311: E/Database(1000): at net.zetetic.tests.TestSuiteRunner.doInBackground(TestSuiteRunner.java:1)
02-28 12:01:57.311: E/Database(1000): at android.os.AsyncTask$2.call(AsyncTask.java:287)
02-28 12:01:57.311: E/Database(1000): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
02-28 12:01:57.311: E/Database(1000): at java.util.concurrent.FutureTask.run(FutureTask.java:137)
02-28 12:01:57.311: E/Database(1000): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
02-28 12:01:57.311: E/Database(1000): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
02-28 12:01:57.311: E/Database(1000): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
02-28 12:01:57.311: E/Database(1000): at java.lang.Thread.run(Thread.java:856)
02-28 12:01:57.313: I/Database(1000): sqlite returned: error code = 28, msg = file unlinked while open: /data/data/net.zetetic/databases/test.db
02-28 12:01:57.724: I/Zetetic(1000): Running test:Looping Count Query Test
02-28 12:01:57.843: I/SurfaceTextureClient(1000): [0x51394bb8] frames:1, duration:4.154000, fps:0.240683
02-28 12:01:59.116: I/Zetetic(1000): Running test:Attach New Database Test
02-28 12:01:59.258: I/SurfaceTextureClient(1000): [0x51394bb8] frames:1, duration:1.410000, fps:0.709133
02-28 12:02:04.447: I/Zetetic(1000): Running test:Attach Existing Database Test
02-28 12:02:04.601: I/SurfaceTextureClient(1000): [STC::queueBuffer] this:0x51394bb8, api:1, last queue time elapsed :5338 ms
02-28 12:02:04.601: I/SurfaceTextureClient(1000): [0x51394bb8] frames:1, duration:5.338000, fps:0.187331
02-28 12:02:06.112: I/Zetetic(1000): Running test:SQLiteException Test
02-28 12:02:06.294: I/SurfaceTextureClient(1000): [0x51394bb8] frames:1, duration:1.687000, fps:0.592625
02-28 12:02:07.692: I/Zetetic(1000): Running test:rawExecSQL Test
02-28 12:02:07.881: I/SurfaceTextureClient(1000): [0x51394bb8] frames:1, duration:1.585000, fps:0.630712
02-28 12:02:09.305: I/Zetetic(1000): Running test:rawExecSQL Exception Test
02-28 12:02:09.495: I/SurfaceTextureClient(1000): [0x51394bb8] frames:1, duration:1.610000, fps:0.620843
02-28 12:02:10.931: I/Database(1000): sqlite returned: error code = 1, msg = no such table: bar
02-28 12:02:10.933: I/Zetetic(1000): Running test:Compiled SQL update test
02-28 12:02:11.137: I/SurfaceTextureClient(1000): [0x51394bb8] frames:1, duration:1.638000, fps:0.610217
02-28 12:02:12.594: I/Zetetic(1000): Running test:AES-128 Bit Cipher Test
02-28 12:02:12.810: I/SurfaceTextureClient(1000): [0x51394bb8] frames:1, duration:1.670000, fps:0.598658
02-28 12:02:13.378: I/Zetetic(1000): Running test:Migrate Database 1.x to Current Test
02-28 12:02:16.434: I/Database(1000): sqlite returned: error code = 26, msg = statement aborts at 1: [PRAGMA user_version;] file is encrypted or is not a database
02-28 12:02:18.366: I/Zetetic(1000): Running test:Status Memory Used Test
02-28 12:02:18.618: I/SurfaceTextureClient(1000): [STC::queueBuffer] this:0x51394bb8, api:1, last queue time elapsed :5010 ms
02-28 12:02:18.618: I/SurfaceTextureClient(1000): [0x51394bb8] frames:2, duration:5.803000, fps:0.344609
02-28 12:02:19.942: I/Zetetic(1000): Running test:PRAGMA cipher_version Test
02-28 12:02:20.233: I/SurfaceTextureClient(1000): [0x51394bb8] frames:1, duration:1.595000, fps:0.626924
02-28 12:02:21.365: I/Zetetic(1000): Running test:Import Unencrypted Database Test
02-28 12:02:21.634: I/SurfaceTextureClient(1000): [0x51394bb8] frames:1, duration:1.416000, fps:0.705995

@maven-y
Copy link
Author

maven-y commented Feb 28, 2014

emmulator screen shot

device-2014-02-28-121551

@developernotes
Copy link
Member

Hello @ManishYadav91

You mentioned that you are still getting the same error, however in the logcat output you posted there is no UnsatisfiedLinkError within the text. If you have a question regarding the integration of the library, the SQLCipher mailing list is a great place to ask.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants