Skip to content

Cannot open some DBs #76

@hexadecimal233

Description

@hexadecimal233

I was opening a special encrypted DB file, and sqlcipher doesn't seem to process the file correctly, giving error net.zetetic.database.sqlcipher.SQLiteNotADatabaseException: file is not a database (code 26): , while compiling: SELECT COUNT(*) FROM sqlite_schema;

        SQLiteDatabase db = SQLiteDatabase.openOrCreateDatabase(processedFile, "xxxxxxx", null, null, new SQLiteDatabaseHook() {
            @Override
            public void preKey(SQLiteConnection connection) {
            }

            @Override
            public void postKey(SQLiteConnection connection) {
                connection.executeRaw("PRAGMA cipher_compatibility = 1;", null, null);
            }
        });

The configuration in SQLiteStudio/sqlcipher CLI, and db is openable

PRAGMA KEY = xxxxxxx;
PRAGMA cipher_compatibility = 1;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions