# SQLCipher for Android 3.3.1-2 Release

**URL:** <https://discuss.zetetic.net/t/sqlcipher-for-android-3-3-1-2-release/829>\
**Category:** SQLCipher\
**Created:** [October 22, 2015, 3:49pm UTC](https://discuss.zetetic.net/t/sqlcipher-for-android-3-3-1-2-release/829 "2015-10-22T15:49:38Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![developernotes](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/developernotes/32/1309_2.png) [@developernotes](https://discuss.zetetic.net/u/developernotes)\
**Post date:** [October 22, 2015, 3:49pm UTC](https://discuss.zetetic.net/t/sqlcipher-for-android-3-3-1-2-release/829/1 "2015-10-22T15:49:38Z")

</div>

We have just released a patch release of SQLCipher for Android, version 3.3.1-2. This addresses an [issue](https://github.com/sqlcipher/android-database-sqlcipher/issues/200) reported on Android OS 4.0.3 for the x86 platform. New binaries are available on Maven Central, synchronization should occur today if you are using JCenter. The latest AAR reference is:

```auto
compile 'net.zetetic:android-database-sqlcipher:3.3.1-2@aar'

```

---

<div class="post-metadata">

**Author:** ![Javier\_Comas](https://avatars.discourse-cdn.com/v4/letter/j/958977/32.png) [@Javier\_Comas](https://discuss.zetetic.net/u/Javier_Comas)\
**Post date:** [November 3, 2015, 8:34pm UTC](https://discuss.zetetic.net/t/sqlcipher-for-android-3-3-1-2-release/829/2 "2015-11-03T20:34:09Z")

</div>

Hi, we have this problem with a samsung tablet with Android 4.4.4 and importing net.zetetic:android-database-sqlcipher:3.3.1-2:

11-02 15:44:19.457: I/SurfaceFlinger(169): id=705  
createSurf (800x2560),-1 flag=20004, ClackSurfac

```
  11-02 15:44:19.467: D/dalvikvm(18542): Trying to load lib
    /data/app-lib/com.leapfactor.renaware.phone.salesfactor-3/libstlport_shared.so
    0x41de0b98

  11-02 15:44:19.467: D/PhoneStatusBar(808):
    setSemiTransparentMode=false, mTransparentMode=false,
    mSemiTransparentMode=false, mMultiWindowMode=

  11-02 15:44:19.467: D/dalvikvm(18542): Added shared lib
    /data/app-lib/com.leapfactor.renaware.phone.salesfactor-3/libstlport_shared.so
    0x41de0b98

  11-02 15:44:19.467: D/dalvikvm(18542): No JNI_OnLoad
    found in
    /data/app-lib/com.leapfactor.renaware.phone.salesfactor-3/libstlport_shared.so
    0x41de0b98, skipping init

  11-02 15:44:19.467: D/dalvikvm(18542): Trying to load lib
    /data/app-lib/com.leapfactor.renaware.phone.salesfactor-3/libsqlcipher_android.so
    0x41de0b98

  11-02 15:44:19.467: D/dalvikvm(18542): Added shared lib
    /data/app-lib/com.leapfactor.renaware.phone.salesfactor-3/libsqlcipher_android.so
    0x41de0b98

  11-02 15:44:19.467: D/dalvikvm(18542): No JNI_OnLoad
    found in
    /data/app-lib/com.leapfactor.renaware.phone.salesfactor-3/libsqlcipher_android.so
    0x41de0b98, skipping init

  11-02 15:44:19.467: D/dalvikvm(18542): Trying to load lib
    /data/app-lib/com.leapfactor.renaware.phone.salesfactor-3/libdatabase_sqlcipher.so
    0x41de0b98

  11-02 15:44:19.467: D/StatusBarManagerService(583): semi
    p:18542,o:f

  11-02 15:44:19.477: D/dalvikvm(18542): Added shared lib
    /data/app-lib/com.leapfactor.renaware.phone.salesfactor-3/libdatabase_sqlcipher.so
    0x41de0b98

  11-02 15:44:19.477: I/Database(18542): JNI_OnLoad called

  11-02 15:44:19.477: I/Database(18542): JNI_OnLoad
    register methods 

  11-02 15:44:19.487: D/@@@MobileLibraryManagerImpl(18542):
    Version checked...

  11-02 15:44:19.487: I/SurfaceFlinger(169): id=700 Removed
    talesfactor (7/16)

  11-02 15:44:19.487: W/ApplicationPackageManager(18542):
    getCSCPackageItemText()

  11-02 15:44:19.487: I/SurfaceFlinger(169): id=700 Removed
    talesfactor (-2/16)

  11-02 15:44:19.497: A/libc(18542):
      Fatal signal 11 (SIGSEGV) at 0x6cb31f12 (code=1), thread 18558
      (startup)

  11-02 15:44:19.497: E/BaseFragmentActivity(18542):
    Activity - 
    com.leapfactor.stencil.lib.ui.activity.SplashActivity

  11-02 15:44:19.497: I/AndroidRuntime(18542): VM exiting
    with result code 0, cleanup skipped.

  11-02 15:44:19.497: W/ActivityManager(583): Permission
    Denial: getCurrentUser() from pid=18542, uid=10098 requires
    android.permission.INTERACT_ACROSS_USERS

  11-02 15:44:19.547: I/DEBUG(18540): unexpected waitpid
    response: n=18558, status=00000000

  11-02 15:44:19.547: I/DEBUG(18540): ptrace detach from
    18558 failed: No such process

  11-02 15:44:19.547: I/DEBUG(18540): debuggerd committing
    suicide to free the zombie!

  11-02 15:44:19.547: I/DEBUG(18561): debuggerd: Sep 10
    2015 00:02:20

  11-02 15:44:19.557:
      I/ActivityManager(583): Process
      com.leapfactor.renaware.phone.salesfactor (pid 18542) (adj 0)
      has died.(98,491)

```

in other devices just works fine. Any suggestion? Thanks

---

<div class="post-metadata">

**Author:** ![developernotes](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/developernotes/32/1309_2.png) [@developernotes](https://discuss.zetetic.net/u/developernotes)\
**Post date:** [November 3, 2015, 11:02pm UTC](https://discuss.zetetic.net/t/sqlcipher-for-android-3-3-1-2-release/829/3 "2015-11-03T23:02:44Z")

</div>

Hello @Javier_Comas

Are you able to recreate the issue with the SQLCipher for Android [test suite](https://github.com/sqlcipher/sqlcipher-android-tests)?

---

<div class="post-metadata">

**Author:** ![Javier\_Comas](https://avatars.discourse-cdn.com/v4/letter/j/958977/32.png) [@Javier\_Comas](https://discuss.zetetic.net/u/Javier_Comas)\
**Post date:** [November 10, 2015, 7:01pm UTC](https://discuss.zetetic.net/t/sqlcipher-for-android-3-3-1-2-release/829/4 "2015-11-10T19:01:50Z")

</div>

Hi, where can i send you the test suite log file?

---

<div class="post-metadata">

**Author:** ![developernotes](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/developernotes/32/1309_2.png) [@developernotes](https://discuss.zetetic.net/u/developernotes)\
**Post date:** [November 10, 2015, 7:50pm UTC](https://discuss.zetetic.net/t/sqlcipher-for-android-3-3-1-2-release/829/5 "2015-11-10T19:50:11Z")

</div>

Hello @Javier_Comas

Were you able to reproduce the issue when running the test suite? Are you a commercial license holder, or are you using the community edition of the library?

---

<div class="post-metadata">

**Author:** ![ManojBZ](https://avatars.discourse-cdn.com/v4/letter/m/e47c2d/32.png) [@ManojBZ](https://discuss.zetetic.net/u/ManojBZ)\
**Post date:** [November 17, 2015, 10:23am UTC](https://discuss.zetetic.net/t/sqlcipher-for-android-3-3-1-2-release/829/6 "2015-11-17T10:23:01Z")

</div>

Hi,

I have an existing Android App with encrypted DB (encrypted using SQL cipher 2.2.0)

Recently we updated the cipher lib to 3.3.1-2 ( compile ‘net.zetetic:android-database-sqlcipher:3.3.1-2@aar’)

App works fine on new installation. Problem occurs on devices where i am trying to use existing set up (i mean access existing Db)

**_Following is my code._**

```
       SQLiteDatabaseHook hook=new SQLiteDatabaseHook() {

		public void preKey( SQLiteDatabase database){				
			database.rawExecSQL("PRAGMA cipher_default_use_hmac=off;");
		}
		public void postKey( SQLiteDatabase database){ }
	};
	try {
		SQLiteDatabase source=SQLiteDatabase.openOrCreateDatabase(databaseToMigrate,password,null,hook);} catch(Exception e) { }

 ********DB was created using this line*************
  db = SQLiteDatabase.openOrCreateDatabase(vDbPath, mdbEKey, null);

```

**It gives following error:**

11-17 14:02:24.067 2247-2247/org.bz.mws.Screens I/Database: sqlite returned: error code = 26, msg = file is encrypted or is not a database  
11-17 14:02:24.067 2247-2247/org.bz.mws.Screens E/Database: CREATE TABLE android\_metadata failed  
11-17 14:02:24.069 2247-2247/org.bz.mws.Screens E/Database: Failed to setLocale() when constructing, closing the database  
11-17 14:02:24.069 2247-2247/org.bz.mws.Screens E/Database: net.sqlcipher.database.SQLiteException: file is encrypted or is not a database: create locale table failed

I am stuck in this for quiete a few days. please help to resolve this. Tried out different options in PreKey but nothing helped.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![developernotes](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/developernotes/32/1309_2.png) [@developernotes](https://discuss.zetetic.net/u/developernotes)\
**Post date:** [November 17, 2015, 2:17pm UTC](https://discuss.zetetic.net/t/sqlcipher-for-android-3-3-1-2-release/829/7 "2015-11-17T14:17:49Z")

</div>

Hi @ManojBZ

Were you previously disabling the per page HMAC when you used SQLCipher 2.2.0? If not, you should not need the `PRAGMA cipher_default_use_hmac=off;` command. You will need to migrate the existing database files to the 3.x format, you can do this with the [`PRAGMA cipher_migrate;`](https://www.zetetic.net/sqlcipher/sqlcipher-api/#cipher_migrate) command.

---

<div class="post-metadata">

**Author:** ![ManojBZ](https://avatars.discourse-cdn.com/v4/letter/m/e47c2d/32.png) [@ManojBZ](https://discuss.zetetic.net/u/ManojBZ)\
**Post date:** [November 23, 2015, 12:31pm UTC](https://discuss.zetetic.net/t/sqlcipher-for-android-3-3-1-2-release/829/8 "2015-11-23T12:31:44Z")

</div>

Hi @developernotes,

Thanks!! My App is working now. But i have a bit concern. The App has considerably slowed down.

I am running App on Moto E2 with android version 5.0.2.

Prior to upgrade i.e. using sqlcipher 2.2, same App had nice speed on this very device.

Please suggest how can optimize the speed.

---

<div class="post-metadata">

**Author:** ![developernotes](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/developernotes/32/1309_2.png) [@developernotes](https://discuss.zetetic.net/u/developernotes)\
**Post date:** [November 23, 2015, 1:35pm UTC](https://discuss.zetetic.net/t/sqlcipher-for-android-3-3-1-2-release/829/9 "2015-11-23T13:35:06Z")

</div>

Hello @ManojBZ

With regard to the impact SQLCipher may have on your application, we have a post covering the details of performance [here](https://discuss.zetetic.net/t/sqlcipher-performance/14). Would you review that and see if it may apply to your application? Thanks!

---

<div class="post-metadata">

**Author:** ![developernotes](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/developernotes/32/1309_2.png) [@developernotes](https://discuss.zetetic.net/u/developernotes)\
**Post date:** [January 26, 2016, 7:19pm UTC](https://discuss.zetetic.net/t/sqlcipher-for-android-3-3-1-2-release/829/10 "2016-01-26T19:19:36Z")

</div>

A post was split to a new topic: [Native runtime crash from SQLCipher for Android](https://discuss.zetetic.net/t/native-runtime-crash-from-sqlcipher-for-android/1096)

---

<div class="post-metadata">

**Author:** ![Akash\_Kumar\_Singh](https://avatars.discourse-cdn.com/v4/letter/a/c89c15/32.png) [@Akash\_Kumar\_Singh](https://discuss.zetetic.net/u/Akash_Kumar_Singh)\
**Post date:** [April 4, 2016, 1:58pm UTC](https://discuss.zetetic.net/t/sqlcipher-for-android-3-3-1-2-release/829/11 "2016-04-04T13:58:54Z")

</div>

your test suite working proper on my tablet but in my project when calling SQLiteDatabase.loadLibs(context); give error  
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file “/system/framework/com.google.android.maps.jar”, zip file “/data/app/com.atscene.icrimefighterle-1/base.apk”],nativeLibraryDirectories=[/data/app/com.atscene.icrimefighterle-1/lib/arm64, /vendor/lib64, /system/lib64]]] couldn’t find “libstlport\_shared.so”
