Replies: 7 comments
-
Sorry, I have no idea what this issue title is supposed to mean. Can you please describe in more detail, what you try to accomplish, how this is related to this project, and what you want me to do?
SQLite supports memory databases through the special database file name Currently this project does not include direct support for Android. However, based on the instructions for Android to be found on the SQLite website it should be possible to build Android support files.
Please mention the sources from which you get your information. Maybe that could help to clarify your issue. The VFS interface is an integrated part of SQLite itself. This project implements a VFS shim to support database encryption. So, which interface is missing for your use case?
Unfortunately the quality of Google translate is limited. |
Beta Was this translation helpful? Give feedback.
-
thank you for your reply |
Beta Was this translation helpful? Give feedback.
-
I took a quick look. This project implements a SQLite VFS that allows to access databases from Android assets. The project is based on the original unchanged SQLite source files ( I guess you want in your own application a SQLite version with encryption and therefore would like to use SQLite3MultipleCiphers. In principle, this shouldn't be too difficult to accomplish. You have to replace the source files
The main problem I see is that Android assets are read-only resources. Therefore the write method of the For me it is still unclear, what you really want to accomplish. Please describe your use case in more detail. Otherwise it is impossible to provide useful advice. |
Beta Was this translation helpful? Give feedback.
-
I want to replace the IO of sqlite3mc void myioopen {
AAssetManager_open
}
void myioread {
AAsset_read
}
sqlite3mc_ioopen = myioopen
sqlite3mc_ioread = myioread I tried to modify it myself, but failed. Anyway, thank you for your time |
Beta Was this translation helpful? Give feedback.
-
Actually, SQLite3MC does not perform IO on its own. As I mentioned in a previous post, SQLite3MC is a so-called VFS shim. This means that SQLite3MC sits between SQLite and the actual VFS (Virtual File System). Read and write request issued by the SQLite library are forwarded by SQLite3MC to the actual VFS, which performs the real IO. SQLite3MC just manipulates the read buffer, after it has been filled by the real VFS, by decrypting it, before returning to SQLite, and it manipulates the write buffer by encrypting it, before passing it to the real VFS.
Sorry, this is not going to happen. The SQLite3MC VFS handles encryption/decryption only, while the real VFS handles the actual IO. Your requested change would break that principle. In my previous post I already layed out the general route you will have to follow: you will have to make adjustnents, so that the assetvfs VFS can co-operate with SQLite3MC:
BTW, I intend to convert this issue into a discussion, because it is actually not a SQLite3MC issue. Nevertheless, it may be an interesting topic for other users. |
Beta Was this translation helpful? Give feedback.
-
In other words (pMethods->xRead)Is the IO of sqlite3 ,not of mc SQLite3MultipleCiphers/src/sqlite3mc_vfs.c Line 704 in 0074daa I get it, thank you very much |
Beta Was this translation helpful? Give feedback.
-
Well, not exactly. This is where the actual IO request from the SQLite library is forwarded to the underlying real VFS. Beware that this is not the only place in I strongly recommend to not tamper with the implementation in |
Beta Was this translation helpful? Give feedback.
-
Hi,
I want to open the database in memory
I want to open the database in android assets
I Googled and found that vfs is needed, but I don’t know how to implement it. Can you add related interfaces? thanks
Sorry, I don’t speak English, this is the content translated by Google
Beta Was this translation helpful? Give feedback.
All reactions