Android Question Use both sqlcipher and spatialite?

Discussion in 'Android Questions' started by RB Smissaert, Jun 24, 2018.

  1. RB Smissaert

    RB Smissaert Well-Known Member Licensed User

    Is this possible?

    I get this error when installing to the phone (Samsung S9):

    ** Activity (main) Create, isFirst = true **
    Connect2DB, Starter.strAppDir: /storage/3637-6230/Android/data/b4a.sqlitelight1/files
    Connect2DB, strDB: PhonePats.db
    java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/b4a.sqlitelight1-AySGH5ncIFLxgbmFmE-gOQ==/base.apk"],nativeLibraryDirectories=[/data/app/b4a.sqlitelight1-AySGH5ncIFLxgbmFmE-gOQ==/lib/arm, /data/app/b4a.sqlitelight1-AySGH5ncIFLxgbmFmE-gOQ==/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]]] couldn't find "libsqlcipher.so"
    at java.lang.Runtime.loadLibrary0(Runtime.java:1011)
    at java.lang.System.loadLibrary(System.java:1657)
    at net.sqlcipher.database.SQLiteDatabase$1.loadLibraries(SQLiteDatabase.java:213)
    at net.sqlcipher.database.SQLiteDatabase.loadLibs(SQLiteDatabase.java:230)
    at net.sqlcipher.database.SQLiteDatabase.loadLibs(SQLiteDatabase.java:209)
    at net.sqlcipher.database.SQLiteDatabase.loadLibs(SQLiteDatabase.java:202)
    at anyhwheresoftware.b4a.objects.sqlcipher.SQLCipher.Initialize(SQLCipher.java:51)
    at b4a.sqlitelight1.main._connect2db(main.java:4895)
    at b4a.sqlitelight1.main._activity_create(main.java:4419)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:735)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:360)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:260)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
    at b4a.sqlitelight1.main.afterFirstLayout(main.java:104)
    at b4a.sqlitelight1.main.access$000(main.java:17)
    at b4a.sqlitelight1.main$WaitForLayout.run(main.java:82)
    at android.os.Handler.handleCallback(Handler.java:789)
    at android.os.Handler.dispatchMessage(Handler.java:98)
    at android.os.Looper.loop(Looper.java:164)
    at android.app.ActivityThread.main(ActivityThread.java:6938)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)

    When I use instead the default SQL library all is fine.

    I haven't used any encryption, so the Spatialite DB is not encrypted.

    RBS
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Does it work with SQLCipher alone? Are you testing it on a real device?
     
  3. RB Smissaert

    RB Smissaert Well-Known Member Licensed User

    Yes, SQLCipher works fine.
    Yes, testing on a real device, Samsung S9.

    RBS
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    Open Spatialite.jar with 7zip and delete lib\armeabi-v7a folder.

    Refresh the libraries. It will probably work.
     
    RB Smissaert likes this.
  5. RB Smissaert

    RB Smissaert Well-Known Member Licensed User

    Great! Will try that later and report back.

    RBS
     
  6. RB Smissaert

    RB Smissaert Well-Known Member Licensed User

    Have tried this now and it does work indeed nicely.

    RBS
     
    Erel likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice