Could not open database file

#1

Hello,
i am a beginner for sqlcipher. i have created demo application using sqlcipher that just store email-id. and performed CRUD operation on it. My application works fine. to verify that my database is actually encrypted or not and to see my database when i am trying to open an extracted database file in SQLite Browser it shows “Could not open database file. Reason:file is not a database.”

i have added this line in my app:module gradle
" implementation ‘net.zetetic:android-database-sqlcipher:3.5.7@aar’ "

please help me to find solution.
Thank you so much in advance

#2

Hi @tankyag

It is difficult to say the exact cause of the error you are receiving. Depending on the version of DB Browser for SQLite you are using, it may or may not support the database file format you have directly. A few things you might consider:

  • Try the latest nightly of DB Browser for SQLite available here
  • Use the latest version of SQLCipher for Android (currently 4.1.13) more information here
  • Attempt to access the database using the SQLCipher command line interface
  • Execute hexdump -C YourDatabaseFile.db to see if it prints any plaintext schema or data information
Management Interfaces for SQLCipher Databases