Feature #4799

use UNIX sockets to provide regular path to MediaRecorder and MediaPlayer

Added by hans almost 3 years ago. Updated almost 3 years ago.

Status:NewStart date:03/24/2015
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:0.3.1
Component:

Description

Android's MediaRecorder and MediaPlayer classes provide easy media recording and playback that is highly optimized, but they only operate on String file paths and java.io.FileDescriptor instances, so it is not possible to use IOCipher paths with them.

Using UNIX domain sockets, it is possible to create a file path on the regular file system that can read and write data in an IOCipher container. vitriolix has gotten a proof of concept working:

But it needs more work:

  • MP4 header rewriting: the header is mismatched to the file since it can't seek back and update the header as it writes frames
  • make a native, really fast pipe filler, it is currently done dumbly in java

Related issues

Related to IOCipher - Feature #226: Share filestream across app boundary without leaking plai... New 07/31/2012

History

#1 Updated by n8fr8 almost 3 years ago

If you look at the code from this project, there is actually no use of MediaRecorder:
https://github.com/vitriolix/securecamera/blob/master/src/info/guardianproject/securecamtest/MainActivity.java

It only shows launching the external camera app with a pipe file.

If you want to see MediaRecorder used with a pipe, then you should see this class:
https://github.com/n8fr8/IOCipherCameraExample/blob/305037580054d4e687694b6d6998679e5e9362e1/src/info/guardianproject/iocipherexample/VideoRecorderActivity.java

Also available in: Atom PDF