[guardian-dev] IOCipher Camera "CipherCam" progress

Nathan of Guardian nathan at guardianproject.info
Tue Mar 24 22:06:48 EDT 2015



On Tue, Mar 24, 2015, at 04:46 PM, Hans-Christoph Steiner wrote:
> 
> I just tried this on my stock Galaxy Tab 3.  I opened the app, set the
> passphrase, and clicked on the camera icon, and it crashed.  The full log
> is
> attached, here's the stacktrace

Thanks! Apparently auto-focus is not supported on your camera. 

Adding code to check for "FEATURE_CAMERA_AUTOFOCUS" support.




> 
> E/AndroidRuntime( 7746): java.lang.RuntimeException: Unable to resume
> activity
> {info.guardianproject.iocipher.camera/info.guardianproject.iocipher.camera.StillCameraActivity}:
> java.lang.RuntimeException: setParameters failed
> E/AndroidRuntime( 7746):        at
> android.app.ActivityThread.performResumeActivity(ActivityThread.java:3076)
> E/AndroidRuntime( 7746):        at
> android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3105)
> E/AndroidRuntime( 7746):        at
> android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
> E/AndroidRuntime( 7746):        at
> android.app.ActivityThread.access$900(ActivityThread.java:175)
> E/AndroidRuntime( 7746):        at
> android.app.ActivityThread$H.handleMessage(ActivityThread.java:1308)
> E/AndroidRuntime( 7746):        at
> android.os.Handler.dispatchMessage(Handler.java:102)
> E/AndroidRuntime( 7746):        at
> android.os.Looper.loop(Looper.java:146)
> E/AndroidRuntime( 7746):        at
> android.app.ActivityThread.main(ActivityThread.java:5602)
> E/AndroidRuntime( 7746):        at
> java.lang.reflect.Method.invokeNative(Native Method)
> E/AndroidRuntime( 7746):        at
> java.lang.reflect.Method.invoke(Method.java:515)
> E/AndroidRuntime( 7746):        at
> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)
> E/AndroidRuntime( 7746):        at
> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
> E/AndroidRuntime( 7746): Caused by: java.lang.RuntimeException:
> setParameters
> failed
> E/AndroidRuntime( 7746):        at
> android.hardware.Camera.native_setParameters(Native Method)
> E/AndroidRuntime( 7746):        at
> android.hardware.Camera.setParameters(Camera.java:1753)
> E/AndroidRuntime( 7746):        at
> info.guardianproject.iocipher.camera.CameraBaseActivity.tryCreateCamera(CameraBaseActivity.java:177)
> E/AndroidRuntime( 7746):        at
> info.guardianproject.iocipher.camera.CameraBaseActivity.initCamera(CameraBaseActivity.java:116)
> E/AndroidRuntime( 7746):        at
> info.guardianproject.iocipher.camera.CameraBaseActivity.onResume(CameraBaseActivity.java:110)
> E/AndroidRuntime( 7746):        at
> android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1198)
> E/AndroidRuntime( 7746):        at
> android.app.Activity.performResume(Activity.java:5537)
> E/AndroidRuntime( 7746):        at
> android.app.ActivityThread.performResumeActivity(ActivityThread.java:3066)
> E/AndroidRuntime( 7746):        ... 12 more
> W/ActivityManager(  681):   Force finishing activity
> info.guardianproject.iocipher.camera/.StillCameraActivity
> W/ActivityManager(  681):   Force finishing activity
> info.guardianproject.iocipher.camera/.GalleryActivity
> 
> 
> .hc
> 
> Nathan of Guardian:
> > A few of us have been working on implement a fully encrypted Android
> > photo and video camera solution for awhile, to varying degrees of
> > success. I think I've made some useful progress that I want to share.
> > The solutions tried in the past have been fairly unstable, when they
> > even worked, and so I went in a direction that didn't require huge
> > binaries or specific APIs, and that was focused on stability and ease of
> > implementation.
> > 
> > The project is now probably the most comprehensive IOCipher "Sample
> > App", but in truth it is becoming a library almost at this point, for
> > any app to embed secure media capture capabilities into their app. To
> > summarize, this sample/app/library grabs pixels directly from the
> > onPreview and onPictureTaken code, and writes those bytes directly to an
> > IOCipher volume. It has built-in viewers/players for all the media
> > types, and directly displays those without exporting them. It also has a
> > built-in ContentProvider for sending files to other apps without first
> > exporting them to unencrypted storage - so you can upload to some remote
> > server w/o writing any unencrypted bytes to permanent flash memory, etc.
> > Finally, it should also be possible for other apps to launch CipherCam
> > to take a photo or video, and get a result in response that is
> > guaranteed to not have been written to any unencrypted storage.
> > 
> > Thanks to Hans for the updated work on IOCipher and CacheWord. This
> > effort is using the latest versions of both, and all is working quite
> > well, except for some issues with AsyncTasks we are nailing down. 
> > 
> > User Interface wise, I tried to replicate the very simple Moto camera,
> > which has almost zero features or interface. You can tap on the screen
> > to take a still picture, press the video camera button to stop/start
> > video, and switch between back and front cameras. In the video mode, you
> > can tap on the screen to take a still picture, AND you can switch
> > between front and back cameras while recording video (which is way more
> > fun that it should be).
> > 
> > On the video front, thanks to JCodec (http://jcodec.org/), I've been
> > able to generate MJPEG MOV/MP4 files quite easily from Camera preview
> > images, without having a great deal of recompression overhead. I am
> > working on getting PCM or AAC audio embedded in that same file, but for
> > now, that audio is captured into a separate file. 
> > 
> > WARNING: Playback of video isn't great always, but if you share it to
> > your desktop and watch it in Quicktime or VLC it should be quite fast.
> > Also, sync between video and audio tracks is also not so solid yet, but
> > we'll get there.
> > 
> > This project will be getting integrated into InformaCam, ChatSecure and
> > some others, so it is definitely something we are going to keep building
> > on. We hope you'll consider building upon it too for your secure media
> > capture needs!
> > 
> > Source is here (in old-fashioned ant/eclipse format... I am switching to
> > gradle-land soon....)
> > https://github.com/n8fr8/IOCipherCameraExample
> > 
> > Test APK:
> > https://guardianproject.info/releases/CipherCam-v2-DEBUG-DEV-TEST.apk
> > 
> > Bugs / features here:
> > https://dev.guardianproject.info/projects/iocipher
> > 
> 
> -- 
> PGP fingerprint: 5E61 C878 0F86 295C E17D  8677 9F0F E587 374B BE81
> https://pgp.mit.edu/pks/lookup?op=vindex&search=0x9F0FE587374BBE81
> _______________________________________________
> List info: https://lists.mayfirst.org/mailman/listinfo/guardian-dev
> To unsubscribe, email:  guardian-dev-unsubscribe at lists.mayfirst.org
> Email had 1 attachment:
> + crashlog.txt
>   96k (text/plain)


-- 
  Nathan of Guardian
  nathan at guardianproject.info


More information about the guardian-dev mailing list