# Upgrading from android-database-sqlcipher to sqlcipher-android

**URL:** https://discuss.zetetic.net/t/upgrading-from-android-database-sqlcipher-to-sqlcipher-android/6741
**Category:** SQLCipher
**Created:** [September 5, 2024, 1:20pm UTC](https://discuss.zetetic.net/t/upgrading-from-android-database-sqlcipher-to-sqlcipher-android/6741 "2024-09-05T13:20:19Z")
**Posts on this page:** 20
**Page:** 2

<div class="post-metadata">

### Author: ![FrozenPyrozen](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/frozenpyrozen/32/2296_2.png) [@FrozenPyrozen](https://discuss.zetetic.net/u/FrozenPyrozen)
#### Post date: [November 15, 2024, 2:22pm UTC](https://discuss.zetetic.net/t/upgrading-from-android-database-sqlcipher-to-sqlcipher-android/6741/21 "2024-11-15T14:22:06Z")

</div>

@developernotes how to get current db `cipher_page_size`, `kdf_iter`, `cipher_hmac_algorithm`, `cipher_kdf_algorithm` to verify that is actual (to get/verify non-default SQLCipher 3 settings) and check that ` database.rawExecSQL("PRAGMA cipher_compatibility = 3;");` applied successfully?

---

<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 15, 2024, 4:04pm UTC](https://discuss.zetetic.net/t/upgrading-from-android-database-sqlcipher-to-sqlcipher-android/6741/22 "2024-11-15T16:04:01Z")

</div>

Hi @FrozenPyrozen

You can use `PRAGMA cipher_settings;` \[1\] once you have keyed the database to report the current _library_ configuration:

```shell
$ ./sqlcipher ~/Desktop/foo.db
SQLite version 3.46.1 2024-08-13 09:16:08 (SQLCipher 4.6.1 community)
Enter ".help" for usage hints.
sqlite> pragma key = 'foo';
ok
sqlite> pragma cipher_settings;
PRAGMA kdf_iter = 256000;
PRAGMA cipher_page_size = 4096;
PRAGMA cipher_use_hmac = 1;
PRAGMA cipher_plaintext_header_size = 0;
PRAGMA cipher_hmac_algorithm = HMAC_SHA512;
PRAGMA cipher_kdf_algorithm = PBKDF2_HMAC_SHA512;
sqlite> pragma cipher_compatibility = 3;
sqlite> pragma cipher_settings;
PRAGMA kdf_iter = 64000;
PRAGMA cipher_page_size = 1024;
PRAGMA cipher_use_hmac = 1;
PRAGMA cipher_plaintext_header_size = 0;
PRAGMA cipher_hmac_algorithm = HMAC_SHA1;
PRAGMA cipher_kdf_algorithm = PBKDF2_HMAC_SHA1;

```

* * *

1. [SQLCipher API - Full Database Encryption PRAGMAs, Functions, and Settings | Zetetic](https://www.zetetic.net/sqlcipher/sqlcipher-api/#cipher_settings)

---

<div class="post-metadata">

### Author: ![FrozenPyrozen](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/frozenpyrozen/32/2296_2.png) [@FrozenPyrozen](https://discuss.zetetic.net/u/FrozenPyrozen)
#### Post date: [November 18, 2024, 12:16pm UTC](https://discuss.zetetic.net/t/upgrading-from-android-database-sqlcipher-to-sqlcipher-android/6741/23 "2024-11-18T12:16:45Z")

</div>

It’s possible to connect to existing db from Android java code and check all of these?

---

<div class="post-metadata">

### Author: ![FrozenPyrozen](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/frozenpyrozen/32/2296_2.png) [@FrozenPyrozen](https://discuss.zetetic.net/u/FrozenPyrozen)
#### Post date: [November 18, 2024, 2:30pm UTC](https://discuss.zetetic.net/t/upgrading-from-android-database-sqlcipher-to-sqlcipher-android/6741/24 "2024-11-18T14:30:38Z")

</div>

@developernotes also I’ve noticed that in my case error ` file is encrypted or is not a database: , while compiling: select count(*) from sqlite_master; E Database: net.sqlcipher.database.SQLiteException: file is encrypted or is not a database: , while compiling: select count(*) from sqlite_master;` coming after calling `getWritableDatabase`. It’s possible to place migration hook before calling `getWritableDatabase` or make sure that `kdf_iter` and other `cipher...` configs are right from Android java code?

---

<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 18, 2024, 7:39pm UTC](https://discuss.zetetic.net/t/upgrading-from-android-database-sqlcipher-to-sqlcipher-android/6741/25 "2024-11-18T19:39:05Z")

</div>

Hi @FrozenPyrozen,

You can provide a `SQLiteDatabaseHook` instance to a `SQLiteOpenHelper` derivative.

---

<div class="post-metadata">

### Author: ![FrozenPyrozen](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/frozenpyrozen/32/2296_2.png) [@FrozenPyrozen](https://discuss.zetetic.net/u/FrozenPyrozen)
#### Post date: [November 19, 2024, 12:49pm UTC](https://discuss.zetetic.net/t/upgrading-from-android-database-sqlcipher-to-sqlcipher-android/6741/26 "2024-11-19T12:49:26Z")

</div>

> [@FrozenPyrozen](#):
>
> It’s possible to connect to existing db from Android java code and check all of these

Hi, @developernotes I’m not sure how to run ` ./sqlcipher ~/Desktop/foo.db` in my case im working with Android device from Java code, maybe you know how to check these cipher config from Java code?

`Enter ".help" for usage hints. sqlite> pragma key = 'foo'; ok sqlite> pragma cipher_settings; PRAGMA kdf_iter = 256000; PRAGMA cipher_page_size = 4096; PRAGMA cipher_use_hmac = 1; PRAGMA cipher_plaintext_header_size = 0; PRAGMA cipher_hmac_algorithm = HMAC_SHA512; PRAGMA cipher_kdf_algorithm = PBKDF2_HMAC_SHA512; sqlite> pragma cipher_compatibility = 3; sqlite> pragma cipher_settings; PRAGMA kdf_iter = 64000; PRAGMA cipher_page_size = 1024; PRAGMA cipher_use_hmac = 1; PRAGMA cipher_plaintext_header_size = 0; PRAGMA cipher_hmac_algorithm = HMAC_SHA1; PRAGMA cipher_kdf_algorithm = PBKDF2_HMAC_SHA1; `

---

<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 19, 2024, 1:28pm UTC](https://discuss.zetetic.net/t/upgrading-from-android-database-sqlcipher-to-sqlcipher-android/6741/27 "2024-11-19T13:28:10Z")

</div>

Hi @FrozenPyrozen,

I was just showing your the `PRAGMA` commands that you can issue. If you are operating on the Android platform you would generally need to exercise the SQLCipher for Android API to invoke those commands.

---

<div class="post-metadata">

### Author: ![FrozenPyrozen](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/frozenpyrozen/32/2296_2.png) [@FrozenPyrozen](https://discuss.zetetic.net/u/FrozenPyrozen)
#### Post date: [November 19, 2024, 1:32pm UTC](https://discuss.zetetic.net/t/upgrading-from-android-database-sqlcipher-to-sqlcipher-android/6741/28 "2024-11-19T13:32:27Z")

</div>

@developernotes are there are some methods to get all cipher settings from current db? For example I could call stmh similar to `db.getCipherEncryptionSettings()` from pre lib update ` 3.5.7` sql cipher build and then get the `db.getCipherEncryptionSettings()` from build with cipher `4.5.4`?

---

<div class="post-metadata">

### Author: ![FrozenPyrozen](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/frozenpyrozen/32/2296_2.png) [@FrozenPyrozen](https://discuss.zetetic.net/u/FrozenPyrozen)
#### Post date: [November 19, 2024, 1:35pm UTC](https://discuss.zetetic.net/t/upgrading-from-android-database-sqlcipher-to-sqlcipher-android/6741/29 "2024-11-19T13:35:19Z")

</div>

> [@developernotes](#):
>
> You can provide a `SQLiteDatabaseHook` instance to a `SQLiteOpenHelper` derivative.

@developernotes in my case I’ve got a class `DatabaseHelper` which extends from `SQLiteOpenHelper` so I need to put `SQLiteDatabaseHook` into constructor or where?  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/zetetic/optimized/2X/8/8a2ebf30c16a4e81e1dd85600fa3c2c33a11ccef_2_690x42.png)

---

<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 19, 2024, 1:55pm UTC](https://discuss.zetetic.net/t/upgrading-from-android-database-sqlcipher-to-sqlcipher-android/6741/30 "2024-11-19T13:55:23Z")

</div>

@FrozenPyrozen,

No, you will need to execute the PRAGMA commands and iterate over the results. [This](https://github.com/sqlcipher/sqlcipher-android-tests/blob/master/app/src/main/java/net/zetetic/tests/PragmaCipherVersionTest.java) is an example using the older `android-database-sqlcipher` API, [this](https://github.com/sqlcipher/sqlcipher-android/blob/master/sqlcipher/src/androidTest/java/net/zetetic/database/sqlcipher_cts/SQLCipherVersionTest.java) is an example using the `sqlcipher-android` library. You will note the API is quite similar for this scenario.

---

<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 19, 2024, 1:58pm UTC](https://discuss.zetetic.net/t/upgrading-from-android-database-sqlcipher-to-sqlcipher-android/6741/31 "2024-11-19T13:58:59Z")

</div>

Hi @FrozenPyrozen,

The older `android-database-sqlcipher` exposes several [constructors](https://github.com/sqlcipher/android-database-sqlcipher/blob/master/android-database-sqlcipher/src/main/java/net/sqlcipher/database/SQLiteOpenHelper.java#L81-L104) to the `SQLiteOpenHelper` which accept a `SQLiteDatabaseHook`. Additionally, you will find several [constructor options](https://github.com/sqlcipher/sqlcipher-android/blob/master/sqlcipher/src/main/java/net/zetetic/database/sqlcipher/SQLiteOpenHelper.java#L173-L209) with the `SQLiteOpenHelper` in the newer `sqlcipher-android` library that does the same.

---

<div class="post-metadata">

### Author: ![FrozenPyrozen](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/frozenpyrozen/32/2296_2.png) [@FrozenPyrozen](https://discuss.zetetic.net/u/FrozenPyrozen)
#### Post date: [November 20, 2024, 12:26pm UTC](https://discuss.zetetic.net/t/upgrading-from-android-database-sqlcipher-to-sqlcipher-android/6741/32 "2024-11-20T12:26:16Z")

</div>

Hi, @developernotes it really helps me out I’ve added, but do you have examples how to get other pragma cipher settings like `kdf_iter`, `cipher_plaintext_header_size`, `cipher_hmac_algorithm`, `cipher_kdf_algorithm`, `kdf_iter`, `cipher_page_size`, `cipher_use_hmac`, `cipher_plaintext_header_size`, `cipher_hmac_algorithm`, `cipher_kdf_algorithm` like [this](https://github.com/sqlcipher/sqlcipher-android-tests/blob/master/app/src/main/java/net/zetetic/tests/PragmaCipherVersionTest.java) for older `android-database-sqlcipher` API?

---

<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 20, 2024, 8:58pm UTC](https://discuss.zetetic.net/t/upgrading-from-android-database-sqlcipher-to-sqlcipher-android/6741/33 "2024-11-20T20:58:04Z")

</div>

Hi @FrozenPyrozen,

Sorry, the `PRAGMA cipher_settings` command wasn’t added until SQLCipher core 4.1.0 release \[1\]. That said, if you are using the newer library, you can execute that command against a database that was created with SQLCipher 3.x.

* * *

1. [sqlcipher/CHANGELOG.md at master · sqlcipher/sqlcipher · GitHub](https://github.com/sqlcipher/sqlcipher/blob/master/CHANGELOG.md#410---march-2019---410-changes)

---

<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 20, 2024, 9:42pm UTC](https://discuss.zetetic.net/t/upgrading-from-android-database-sqlcipher-to-sqlcipher-android/6741/34 "2024-11-20T21:42:03Z")

</div>

Hello @FrozenPyrozen,

Just to clarify, the `PRAGMA cipher_settings` command will only return the runtime configured options from the library. It will not report what a given database file was configured with as that is not stored within the database file itself.

---

<div class="post-metadata">

### Author: ![FrozenPyrozen](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/frozenpyrozen/32/2296_2.png) [@FrozenPyrozen](https://discuss.zetetic.net/u/FrozenPyrozen)
#### Post date: [November 21, 2024, 10:51am UTC](https://discuss.zetetic.net/t/upgrading-from-android-database-sqlcipher-to-sqlcipher-android/6741/35 "2024-11-21T10:51:17Z")

</div>

> [@developernotes](#):
>
> t will not report what a given database file was configured with as that is not stored within the database file itself.

@developernotes Is it possible to get `kdf_iter, cipher_plaintext_header_size, cipher_hmac_algorithm, cipher_kdf_algorithm, kdf_iter, cipher_page_size, cipher_use_hmac, cipher_plaintext_header_size, cipher_hmac_algorithm, cipher_kdf_algorithm` that were used to create/configure db initially?

---

<div class="post-metadata">

### Author: ![FrozenPyrozen](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/frozenpyrozen/32/2296_2.png) [@FrozenPyrozen](https://discuss.zetetic.net/u/FrozenPyrozen)
#### Post date: [November 21, 2024, 12:17pm UTC](https://discuss.zetetic.net/t/upgrading-from-android-database-sqlcipher-to-sqlcipher-android/6741/36 "2024-11-21T12:17:20Z")

</div>

Hi, @developernotes

Curently I’ve added `checkCipherSettings` to check before `database.execSQL("PRAGMA cipher_compatibility = 3;");` configs and compare with after it

Code:

```auto
private void checkCipherSettings(SQLiteDatabase database) {
                String[] pragmas = {
                        "PRAGMA cipher_compatibility;",
                        "PRAGMA kdf_iter;",
                        "PRAGMA cipher_plaintext_header_size;",
                        "PRAGMA cipher_hmac_algorithm;",
                        "PRAGMA cipher_kdf_algorithm;",
                        "PRAGMA cipher_page_size;",
                        "PRAGMA cipher_use_hmac;",
                        "PRAGMA cipher_settings;"
                };

                try {
                    for (String pragma : pragmas) {
                        Cursor cursor = database.rawQuery(pragma, null);
                        if (cursor != null && cursor.moveToFirst()) {
                            String result = cursor.getString(0);
                            Log.i("CipherSettings", "[KLOG]: " + pragma + " " + result);
                            cursor.close();
                        } else {
                            Log.i("CipherSettings", "[KLOG] Failed to retrieve value for " + pragma);
                        }
                    }
                } catch (Exception e) {
                    Log.e("CipherSettings", "[KLOG] Error while fetching cipher settings: " + e.getMessage(), e);
                }
            }

            @Override
            public void postKey(SQLiteDatabase database) {
                Log.i("DatabaseHelper", "[KLOG] postKey triggered for db: " + database);
                Log.i("DatabaseHelper", "[KLOG] _________before this.checkCipherSettings for existing db__________ : ");
                this.checkCipherSettings(database);
                Log.i("DatabaseHelper", "[KLOG] _________after this.checkCipherSettings for existing db__________ : ");
                Log.i("DatabaseHelper", "[KLOG] postKey before database cipher_compatibility to 3");
                // Apply PRAGMA to maintain SQLCipher 3 compatibility for net.zetetic:android-database-sqlcipher after 4x version
                database.execSQL("PRAGMA cipher_compatibility = 3;");
              

                Log.i("DatabaseHelper", "[KLOG] postKey after database cipher_compatibility to 3");
                Log.i("DatabaseHelper", "[KLOG] _________before this.checkCipherSettings for cipher_compatibility = 3 db__________ : ");
                this.checkCipherSettings(database);
                Log.i("DatabaseHelper", "[KLOG] _________after this.checkCipherSettings for cipher_compatibility = 3 db__________ : ");
}

```

And I’ve got some differences:

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zetetic/original/2X/1/1683ed3883d8b7ab0c04846fc4c75ce1f672e8ef.jpeg)

After this I’ve changed `postKey` to set exact same `kdf_iter`, `cipher_hmac_algorithm`, `cipher_kdf_algorithm`, `cipher_page_size` settings as it was before `database.execSQL("PRAGMA cipher_compatibility = 3;");`

```auto
public void postKey(SQLiteDatabase database) {
                Log.i("DatabaseHelper", "[KLOG] postKey triggered for db: " + database);
                Log.i("DatabaseHelper", "[KLOG] _________before this.checkCipherSettings for existing db__________ : ");
                this.checkCipherSettings(database);
                Log.i("DatabaseHelper", "[KLOG] _________after this.checkCipherSettings for existing db__________ : ");
                Log.i("DatabaseHelper", "[KLOG] postKey before database cipher_compatibility to 3");
                // Apply PRAGMA to maintain SQLCipher 3 compatibility for net.zetetic:android-database-sqlcipher after 4x version
                database.execSQL("PRAGMA cipher_compatibility = 3;");
                database.execSQL("PRAGMA kdf_iter = 256000;");
                database.execSQL("PRAGMA cipher_hmac_algorithm = HMAC_SHA512;");
                database.execSQL("PRAGMA cipher_kdf_algorithm = PBKDF2_HMAC_SHA512;");
                database.execSQL("PRAGMA cipher_page_size = 4096;");

                Log.i("DatabaseHelper", "[KLOG] postKey after database cipher_compatibility to 3");
                Log.i("DatabaseHelper", "[KLOG] _________before this.checkCipherSettings for cipher_compatibility = 3 db__________ : ");
                this.checkCipherSettings(database);
                Log.i("DatabaseHelper", "[KLOG] _________after this.checkCipherSettings for cipher_compatibility = 3 db__________ : ");
}

```

Now they are equal, but I still have an error `android.database.sqlite.SQLiteException: file is not a database: , while compiling: select count(*) from sqlite_master;` after this:

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zetetic/original/2X/8/86d499af2365e608a2887d6951a3377d3a824546.jpeg)

Maybe I could check existing db setup with sql cipher old library v3? Or maybe I missed some pragma that needs for opening db 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 21, 2024, 1:04pm UTC](https://discuss.zetetic.net/t/upgrading-from-android-database-sqlcipher-to-sqlcipher-android/6741/37 "2024-11-21T13:04:00Z")

</div>

Hi @FrozenPyrozen,

> [@FrozenPyrozen](#):
>
> Is it possible to get `kdf_iter, cipher_plaintext_header_size, cipher_hmac_algorithm, cipher_kdf_algorithm, kdf_iter, cipher_page_size, cipher_use_hmac, cipher_plaintext_header_size, cipher_hmac_algorithm, cipher_kdf_algorithm` that were used to create/configure db initially?

No, that is not stored in the database file. Unless the database was created with non-default configuration options with regard to those settings, you could cycle through the values supported by `PRAGMA cipher_compatibility` \[1\] and attempt to open the database to identify the SQLCipher version needed for that specific database. The `cipher_compatibility` pragma will set the appropriate values on your behalf. Please review the documentation for usage.

* * *

1. [SQLCipher API - Full Database Encryption PRAGMAs, Functions, and Settings | Zetetic](https://www.zetetic.net/sqlcipher/sqlcipher-api/#cipher_compatibility)

---

<div class="post-metadata">

### Author: ![FrozenPyrozen](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/frozenpyrozen/32/2296_2.png) [@FrozenPyrozen](https://discuss.zetetic.net/u/FrozenPyrozen)
#### Post date: [November 21, 2024, 1:35pm UTC](https://discuss.zetetic.net/t/upgrading-from-android-database-sqlcipher-to-sqlcipher-android/6741/38 "2024-11-21T13:35:03Z")

</div>

> [@developernotes](#):
>
> No, that is not stored in the database file.

@developernotes could I get somehow these values and other creation config from place where I created a db with old v3 library?

---

<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 22, 2024, 2:38pm UTC](https://discuss.zetetic.net/t/upgrading-from-android-database-sqlcipher-to-sqlcipher-android/6741/39 "2024-11-22T14:38:22Z")

</div>

Hi @FrozenPyrozen,

Can you share what you’re trying to accomplish? This thread is getting rather long and I don’t think we understand exactly what your situation is in detail. Could you provide those details? Thanks!

---

<div class="post-metadata">

### Author: ![FrozenPyrozen](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/frozenpyrozen/32/2296_2.png) [@FrozenPyrozen](https://discuss.zetetic.net/u/FrozenPyrozen)
#### Post date: [November 25, 2024, 11:24am UTC](https://discuss.zetetic.net/t/upgrading-from-android-database-sqlcipher-to-sqlcipher-android/6741/40 "2024-11-25T11:24:26Z")

</div>

Hi, @developernotes I’m trying to update `net.zetetic:android-database-sqlcipher:3.5.7` to `net.zetetic:android-database-sqlcipher:4.5.4`. So basically I’ve got prev app build with `net.zetetic:android-database-sqlcipher:3.5.7` and I’ve created new app build with `net.zetetic:android-database-sqlcipher:4.5.4`. I’ve decided to go with backwards compatibility step with `database.execSQL("PRAGMA cipher_compatibility = 3;");`. When I’m installing new app on prev with already created db I’ve got an error on `this.getWritableDatabase` of based on `SQLiteOpenHelper` class`:

` file is encrypted or is not a database: , while compiling: select count(*) from sqlite_master; 11-14 15:15:27.619 18529 18529 E Database: net.sqlcipher.database.SQLiteException: file is encrypted or is not a database: , while compiling: select count(*) from sqlite_master;`

So I’m passing compatibility hook to based on `SQLiteOpenHelper` class constructor `super(context, NetworkConstant.DATABASE_NAME, null, NetworkConstant.DATABASE_VERSION, DatabaseHelper.migrateDbFrom3xFormatToCurrentSupportHook());` but it didn’t help and I trying to understand why

Currently I’m trying to get all possible db info to understand what is the db settings for prev app and what’s changed in new app with `net.zetetic:android-database-sqlcipher:4.5.4`

[Here](https://discuss.zetetic.net/t/upgrading-from-android-database-sqlcipher-to-sqlcipher-android/6741/36) I’ve tried to compare cipher settings for prev and new build, but maybe I missed to check smth else, because after setting the same pragmas when I’ve got before launching `database.execSQL("PRAGMA cipher_compatibility = 3;");` didn’t work

[Previous page](https://discuss.zetetic.net/t/upgrading-from-android-database-sqlcipher-to-sqlcipher-android/6741.md?page=1)

[Next page](https://discuss.zetetic.net/t/upgrading-from-android-database-sqlcipher-to-sqlcipher-android/6741.md?page=3)
