Android Question Applying sqlcipher-android-4.10.0.aar that fixes 16KB issues with SQLCipher

Alex_197

Well-Known Member
Licensed User
Longtime User
Hi all.

Thanks to @GeoffT660 , @Shelby and @DonManfred we now can download a replacement for SQLCipher aar that will allow us to continue using it with 16KB requirements.

I did some tests on my test computer - here is a result.

I just in case first archived my AdditionalLib folder in case if something will go wrong.

I removed existing files such as

android-database-sqlcipher-4.0.0.aar
android-database-sqlcipher-4.2.0.aar
android-database-sqlcipher-4.5.4.aar

Then I downloaded sqlcipher-android-4.10.0.aar from https://repo1.maven.org/maven2/net/zetetic/sqlcipher-android/4.10.0/ and put it into my AdditionalLib folder.

Opened B4A, opened my project and tried to compile it. It didn't work - the B4A says that can't find android-database-sqlcipher-4.5.4.aar file. I run the search in AdditionalLib folder to see what file has a reference to android-database-sqlcipher-4.5.4.aar. It was SQLCipher.xml. Opened it and at the very bottom there is a line
B4X:
 <dependsOn>android-database-sqlcipher-4.5.4.aar</dependsOn>

I replaced it with sqlcipher-android-4.10.0.aar. Tried to compile it again - so far so good.

I did it on my test computer which is located in a different place (connected via remote desktop) so I didn't actually ran my project on the app.

My question is - did I miss something else or not?
 

Alex_197

Well-Known Member
Licensed User
Longtime User
Already tested (and probably not necessary as "<dependsOn>sqlite-2.4.0.aar</dependsOn>" already exist on my sqlcypher.xml file).

Also tested : use of last version (sqlite-android-3500400.aar) but no more lucky...
Try to use my additional lib folder
 
Upvote 0

Alex_197

Well-Known Member
Licensed User
Longtime User
Guys, I must to admit that I was wrong. I tested it on my test computer. It was Ok during the compilation but I just received the same error when I started my app.

Sorry about it.
 
Upvote 0

Alex_197

Well-Known Member
Licensed User
Longtime User
can't access on your google drive.
But I need full compatibility lib as my app already use SQLCipher
I must to admit that I was wrong. I tested it on my test computer. It was Ok during the compilation but I just received the same error when I started my app.
Sorry about it.
 
Upvote 0

popeyes44

Member
I think the issue is in "SQLCipher.jar" (https://github.com/AnywhereSoftware...software/b4a/objects/sqlcipher/SQLCipher.java) because this file try to access thoses files :

B4X:
import net.sqlcipher.DatabaseUtils;
import net.sqlcipher.database.SQLiteDatabase;
import net.sqlcipher.database.SQLiteStatement;
import net.sqlcipher.database.SQLiteDatabase.CursorFactory;

But in the last version (4.10.0) it seems the path are not the same and now it's :

B4X:
import net.zetetic.database.DatabaseUtils;
import net.zetetic.database.sqlcipher.SQLiteDatabase;
import net.zetetic.database.sqlcipher.SQLiteStatement;
import net.zetetic.database.sqlcipher.SQLiteDatabase.CursorFactory;

My level with java compilation is too poor to manage with that, so i can't made a test, maybe @Erel could confirm this usse is here and it can make a test ?

Finaly made a small text and have 2 errors :

B4X:
in "public void Initialize" :

 - The method loadLibs(Application) is undefined for the type SQLiteDatabase
 - The method openDatabase(String, SQLiteDatabase.CursorFactory, int, DatabaseErrorHandler) in the type SQLiteDatabase is not applicable for the arguments (String, String, null, int)
 
Last edited:
Upvote 0

Enxix

Member
Hi everyone. I can try rolling the SQLChiper library to its latest version. The AARs are available. That solves this problem. I'm also having the same problem with RTMP. So, since I'm going to try, I can try both, starting with this one.
 
Upvote 0

popeyes44

Member
Hi everyone. I can try rolling the SQLChiper library to its latest version. The AARs are available. That solves this problem. I'm also having the same problem with RTMP. So, since I'm going to try, I can try both, starting with this one.

Sure, that will be very nice !

I tested on my side but I have too many erros on my eclipse to compile that...
 
Upvote 0

Enxix

Member
 
Upvote 0

Alex_197

Well-Known Member
Licensed User
Longtime User
Works perfect right out of box to me on my Android 15 phone. The only disclaimer - it was upgraded to Android 15.
 
Upvote 0
Top