I am seeing the following error when I do a pragma cipher_migrate;
Error: android.database.sqlite.SQLiteOutOfMemoryException: out of memory (code 7): , while compiling: SELECT COUNT(*) FROM sqlite_schema
It appears to be something changed in the migration somewhere between the 4.51 to 4.10.0
I have the exact same “encypted.sqlite” test file that I tested everywhere since I’m doing tests only. I can provide it since it is just a test file, but apparently discourse won’t let me upload it yet because I’m a new user… I’ll attach it tomorrow if possible.
- iOS 4.10.0 - no problems, cipher_migrate works perfectly fine with the file.
- Android 4.10.0 - migrate totally fails, with the above error.
- Android 4.5.1 - migrate works fine.
- Command line program on Linux - 4.5.1 cipher_migrate works fine and migrates it perfectly.
- Command line 4.10.0 throws a bunch of errors when I do a cipher_migrate:
2025-08-11 22:50:09.739: ERROR CORE sqlcipher_page_cipher: hmac check failed for pgno=1
2025-08-11 22:50:09.739: ERROR CORE sqlite3Codec: error decrypting page 1 data: 1
2025-08-11 22:50:09.739: ERROR CORE sqlcipher_codec_ctx_set_error 1
0
However interestingly enough the file does seem to be converted correctly [although doing a binary diff the 4.10.0 has some binary differences from the 4.5.1 migrated file???].
Notes:
- If I don’t run the pragma cipher_migrate, the file is not seen as a valid db file.
- I did try using the cipher_compatibility 1-4 and it made no difference
- Both 4.5.1 & 4.10.0 could open each others sqlite converted files w/o any issues
- cipher_integrity_check didn’t find anything wrong with EITHER versions converted table.