Migrating to SQLDriver with Room3 #84
Description
Hi there,
I'm not sure from where to start but I have two questions that will determine if there is a bug, documentation is not complete or this issue ticket should be a feature request.
Here is a context, I have checked the source code of Room3 and sqlcipher-android, it doesn't look like it has addressed the removal of openHelperFactory as part of SupportSQLiteOpenHelper.
If this is true, will sqlcipher-android support Room3 and when?
if this is false, is there anyone knows and can hint out how to configure sqlite database with SupportOpenHelperFactory i.e. encryption key using Room3 and allows overriding create function so encryption key can be cleared from memory after use?
Setting driver have only one option that is the name of the database file, which can be set. Also, there is only option to change password after building the database, anyone have an idea better than me?
With thanks.
Zakaria.
Refer to
https://android-developers.googleblog.com/2026/03/room-30-modernizing-room.html
https://developer.android.com/jetpack/androidx/releases/room3
Activity
sjlombardo commentedon Mar 15, 2026
Hello @InputOutputZ - we're aware of the upcoming changes in Room 3. However, SQLCipher does not support Room 3 at this time due to the changes. Since Room 3 is still in alpha status it is still on our pending list. We will work on updating the integration as Room 3 stabilizes.
InputOutputZ commentedon Mar 17, 2026
Thanks for clearing the confusion. Btw, I actually managed to get Room 3 working with SQLCipher, but just failed clearing the key from the initialised variable it holds, while I tried using postKey function with SQLiteDatabaseHook, but it fails decrypting database in subsequent keying calls. While it works using Room 2 and openHelperFactory method.
Please if you can do take note of this, and I hope when SQLCipher team is going to package for Room 3 to address this issue, since it really hurts keeping the encryption key in memory loaded for as long as the database connection is needed, sometimes like all the time and this is a huge security risk.
Zakaria.
InputOutputZ commentedon Mar 17, 2026
Also, debugging SQLCipher encrypted database using Android Studio Database inspector, I think if you provide support for this, it would be a great feature. Please do take note of this as well,
With thanks.
Zakaria.
mandrachek commentedon Apr 1, 2026
Kotlin Multiplatform needs this! It would be ideal if sqlcipher room 3 support was available for Android, iOS (and variants like tvOS and watchOS), and jvm/desktop (arm/intel).
js and wasmJs are probably too much to ask for, but one can dream.
b95505017 commentedon Jul 24, 2026
Any update? Room3 stable is released
developernotes commentedon Jul 29, 2026
Hi @b95505017,
We will be adding support for Room 3 in a future release of SQLCipher for Android. I don't have a timeframe to share at the moment, but we will communicate with this thread when it becomes available.
erangross27 commentedon Aug 7, 2026
Adding a concrete production use case waiting on this: HomeProof, a fully offline home-documentation app for Android (Kotlin, Room 3 in production, 19 locales, no network permission by design). We are shipping user-opt-in encryption at rest as a headline privacy feature — file-level encryption ships first, but encrypting the database itself is blocked solely on SQLCipher support for Room 3, since downgrading to the maintenance-only Room 2.8 line is not an option for us.
One integration note that may help planning: Android's platform SQLite provides ICU collation (COLLATE LOCALIZED / UNICODE) that replacement builds lose. For apps shipping RTL and CJK locales, migration guidance on collation — or an ICU-enabled variant — would matter to us as much as the driver integration itself.
Happy to beta-test the Room 3 integration on a real multi-locale production app when it's ready, and +1 to updates in this thread.
developernotes commentedon Aug 18, 2026
We have just released SQLCipher 4.18.0 1 which includes an update to
sqlcipher-androidcontaining support for Room 3.Footnotes
https://www.zetetic.net/blog/2026/08/18/sqlcipher-4.18.0-release/ ↩