SQLCipher for Android: icudt46l.zip really needed?
Asked Answered
H

2

6

I was expecting that the localization data file icudt46l.zip wasn't really needed, but if I don't include it on the Nexus 5 I get a runtime error:

E/AndroidRuntime(4341): Caused by: net.sqlcipher.database.SQLiteException: not an error

This means that overall, almost 7MB of extra files are needed for SQLCipher for Android:
- 2.7MB assets/icudt46l.zip
- 0.2MB lib/armeabi/libdatabase_sqlcipher.so
- 2.3MB lib/armeabi/libsqlcipher_android.so
- 0.4MB lib/armeabi/libstlport_shared.so
- 0.1MB lib/commons-codec.jar
- 1.1MB lib/guava-r09.jar
- 0.1MB lib/sqlcipher.jar

Is everyone else experiencing the need to include the file icudt46l.zip?

Hobbs answered 25/2, 2014 at 19:50 Comment(1)
There is further discussion here: groups.google.com/forum/#!topic/sqlcipher/TOYpkC0yWxIChildhood
G
7

Quoting the documentation for SQLCipher for Android:

SQLCipher for Android depends on localization data from the ICU project. SQLCipher for Android will attempt to use a system provided ICU localization data file called icudt46l.dat located in the /system/usr/icu directory if available. If that is not found, SQLCipher for Android will attempt to unzip the icudt46l.zip file located within the applications asset directory. It is recommended that the icudt46.zip file be included with your application for best platform compatibility. If you need to adjust the size of the localization data for your application, a ICU data library customizer is available here.

I am not aware of any version of Android in which the system-supplied ICU data meets SQLCipher's needs.

Gingerly answered 25/2, 2014 at 20:5 Comment(0)
I
1

If you use gradle to get it from maven central, you don't need to worry about its dependencies. It actually has shed a few of these libraries, such as guava and apache commons, so is much smaller in both size and method count.

compile 'net.zetetic:android-database-sqlcipher:3.4.0'

Intercross answered 20/4, 2016 at 23:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.