This has to do with the sqlite compile flags that are specified in the sqlcipher Android.mk file.
To get large file support you need to have USE_PREAD64 defined. The wrapper function for pread64 and pwrite64 are not provided in the NDK though so you need to generate these and include them in your library. You can generate the wrapper functions by checking out bionic from the AOSP project and running the gensyscalls.py script.
I think there's another similar issue in that sqlite uses ftruncate instead of ftruncate64. If I'm interpreting things correctly this could mean that a > 2Gb file could get truncated to 2Gb accidentally.
Hi Sean, I'm just replying to your earlier question from the SQLCipher 2.1.0 post here to keep discussion on this thread. Unfortunately the 2.1.0 beta release doesn't resolve the issue you were seeing. We've done some investigation into this problem already. We were able to reproduce the problem on an Android system, but opening and modifying your large database file on other platforms works just fine. Thus, we don't believe it is a core SQLCipher limitation, but rather a platform and/or compiler issue with the Android port. Two follow-up questions: 1. When opening the database, is it located on an SD card? 2. What versions of Android have you tested this with? Cheers, Stephen
Sorry to bring this old thread back to life but if I open a new one I'll just have to point it here.What is the likelihood that SQLCipher for Android will as standard support larger file sizes? I have a requirement to use the same information from the desktop on a mobile device, unfortunately the SQLCipher database size can be up to 10GB.
The devices we brought support exFAT formatted SD cards so theres no 4GB file limit, but as I Sean found, opening the database SQLCipher "craps out with a complaint about setLocale" and disk I/O error.
I seem to have a number of options, I could recompile SQLCipher myself with these fixes listed here, although I failed miserably earlier trying this on Windows. The alternative is I split the data over a number of attached databases, rewriting some of the desktop code at the same time.
Another question I guess is either of these options significantly better? Is one huge database just going to use all the phones memory anyway.
Tony--
---
You received this message because you are subscribed to the Google Groups "SQLCipher Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sqlcipher+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Tony