Android Question Migration SQLCiper V1.50 to V1.60

soyVB6

Active Member
Licensed User
Colleagues, I'm pretty worried, I should do this migration from SQLCiper V1.50 to V1.60, as we all know from the 64BIT binary.

The problem is generated because the database created in V1.50 will not be compatible with V1.60, so as I do to pass that data to the new database when updating the app it will take V1.60 You will NOT be able to open the database .

I happened to move the database from V1.50 to a temporary normal SQLite database, then create the new database with V1.60 that would work, but the process would be too long, my clients have tables of up to 2,000 .000 of records.

What other solution can there be?

Thank you.
 

soyVB6

Active Member
Licensed User
It is impossible for this command to work for me when the BD never starts
B4X:
Bd.ExecNonQuery("PRAGMA cipher_page_size = 1024; PRAGMA kdf_iter = 64000; PRAGMA cipher_hmac_algorithm = HMAC_SHA1; PRAGMA cipher_kdf_algorithm = PBKDF2_HMAC_SHA1;")
I'm doing it wrong ?
 

Erel

Administrator
Staff member
Licensed User
This happens internally. You will not be able to run the PRAGMA command.

You need to provide a method to decrypt the database and then encrypt it with the new version of your app (or better a new app).

Another option is to download v3.5.9 of SQLCipher: https://mvnrepository.com/artifact/net.zetetic/android-database-sqlcipher/3.5.9
The AAR does include 64 bit binaries (x86_64). You need to add them to your library.
 

soyVB6

Active Member
Licensed User
I do not know how to do it
You need to add them to your library.

It's what I had in mind since the consultation
You need to provide a method to decrypt the database and then encrypt it with the new version of your app (or better a new app).

I'm disappointed with SQLCipher, I'll have to go back to normal SQLite :(

Thank you very much for your time Mr. Erel
 

soyVB6

Active Member
Licensed User
The problem is that there are more than 2,000 clients using the app, each client has tables of up to 2,000,000 records.

I will not be able to update each one with a PC.

Offering an update is the idea but it is impossible to open the old DB with V1.60.

I'll have to go from v1.50 to normal sqlite, then from normal to v1.60 it's the only option I see that works.

But I will listen to the many options that you offer #KMatle...
 

soyVB6

Active Member
Licensed User
If I tried it, it did not make any difference.
V1.50
does not care whether or not you have that file.
"android-database-sqlcipher-3.5.9.aar"

V1.60
It only works with (android-database-sqlcipher-4.0.0.aar), nor is it interested in the file "android-database-sqlcipher-3.5.9.aar"

Maybe we are talking about different bookstores.
 
Last edited by a moderator:

soyVB6

Active Member
Licensed User
1. Configure the additional libraries folder
C:\B4X_LIBRERIAS\B4A


2. Add v1.60, xml v1.50 and android-database-sqlcipher-3.5.9.aar

3. This is what I understood in point 2 of your answer

4. the new error
 

soyVB6

Active Member
Licensed User
Thanks DonManfred somehow enlightened me this was what I did in the xml
HTML:
<dependsOn> android-database-sqlcipher-3.5.9.aar </ dependsOn>
The database worked
 
Top