SQLCipher for Android, Room, and API Level 16


Hi @Casey_Yost_Juul

The question regarding an estimate was addressed above:


Hello any update on migrating room database ?


Hi @Jayanthi_V

We have made some changes in the master branch of SQLCipher for Android to help facilitate SafeRoom integration. We plan to push those changes out with the next SQLCipher core release. @commonsguy, would you mind sharing if there is anything else needed from us for SafeRoom?


Not that I am aware of. Once that SQLCipher core release is released, I can issue a release of SafeRoom that uses it and more fully implements the SupportSQLiteDatabase API. From there, we can then determine what happens to SafeRoom for the long term.


SafeRoom by @commonsguy is able to encrypt and decrypt the database but I suspect some exception while doing Insert and update. Anyone having this issue or that is limitation on SQLCiper as of now ?


I have had no problems with database inserts and updates. I have a library of support database tests that SafeRoom passes.

I offer a few options for support for SafeRoom. In particular, if you can create a reproducible test case, file an issue with that test case, and I can take a look at it.


Thanks for your quick attention.
Your test cases help me to correct my Silly mistake.

So, my question is , Can I use your ‘SafeRomm’ in production now ? or do you think that I should wait for zetetic guys to come up with something new ?


I can tell you that I am waiting for Zetetic to release a version of SQLCipher for Android that contains some APIs that I need to completely implement the support database API. Until then, there is not much for me to do, other than keep pace with Google’s releases of that API and respond to bug fixes. SafeRoom is not that much code.

If you have further questions specifically about SafeRoom, please use the options for support for SafeRoom that I linked to previously.


Sorry to nudge once again, but I’m curious about the current state of affairs since it’s been quite a while since this was first requested. Many thanks.


Hi @marcardar

We are working to finalize our next major release of SQLCipher core. This will be included in SQLCipher for Android, and also contains the changes @commonsguy requires for a SafeRoom release. We are planning for a release in the near term, however we cannot comment on a specific date. Thank you for your patience!



Do we have any update on the stable release for this! We are super interested to integrate this in prod!


Thanks a lot commonsguy for the work on SafeRoom. @zetetic team, We know you have your own timeline and releases lined up.
It would be very helpful if you can share an approximate timeframe of the stable release we have to schedule things on our side also.

Many Thanks


Hi @sri_yechuri, @kabira

I just wanted to circle back, we have released SQLCipher 4, in which SQLCipher for Android was also updated. You can read more about the changes here. This should help with SafeRoom /cc @commonsguy.


I will work on updating CWAC-SafeRoom to match this coming weekend. Many thanks!


Hello @commonsguy ,

Any updates with regards to production version? I’ll be glad. Also I request you look at the size of the library. It’s almost 50% my App size, taking it to 16.3 MBs and when I analyze the APK, sqlcipher-lib alone is 48.9% of my apk size i.e 7.3MBs!!!


Try the 1.0.0-beta1 release. Here is a temporary README for it.

That has nothing to do with SafeRoom directly. Those are SQLCipher for Android binaries. Considering using APK splits and distribute separate APKs by CPU architecture.


Thanks, @commonsguy

That was quick. As regards your comment on apk size, would I be wrong if I say you mean app bundles will have less size with the library instead of APKs?


AFAIK, app bundles will have a similar effect to APK splits, with each recipient of the app getting the binaries for their CPU architecture but not the others.

Personally, I am not a fan of allowing other parties to sign the APK, which is a requirement of app bundles. As a result, I recommend APK splits.


Great, This answer is better than the stackoverflow one, so I’ll reference this thread section as the answer :grinning: Thank you.