[guardian-dev] IOCipher ContentProvider for streaming data without writing to SD card

Hans-Christoph Steiner hans at guardianproject.info
Tue Feb 5 22:51:18 EST 2013

So I'm just writing the last piece of an IOCipher example app that lets you
send files via a SEND intent, and now share files to other apps also via a
SEND intent.  Normally, this is done using a temporary file or a copy of the
file in the app's cache directory.  But using android-9's ParcelFileDescriptor
pipes, I have a working demo that can send files from IOCipher to another app
without writing to disk anywhere.

Thanks to Commonsware for the very straightforward example:

This above example is limited in size to 64k, so my task tomorrow is
implementing a threaded backing to the pipe to feed the whole file bit by bit.

I also researched the possibility of using an android MemoryFile for this, but
that would be problematic since it would require copying the entire file
contents to memory.  Plus, it would rely on some non-public APIs.

Has anyone played with this stuff that can confirm that a) this is not being
written to disk anywhere and b) it is a good method for doing this?


More information about the Guardian-dev mailing list