Build InformaCam from Source

Building Informacam from source requires the following project dependencies:
- IOCipher (https://github.com/guardianproject/IOCipher)
- android-ffmpeg-java (https://github.com/guardianproject/android-ffmpeg-java)

A. Build android-ffmpeg-java project
  1. Pull this project from git
  2. Build the project (follow the project's README)
  1. Note:
  2. The README instructs you to export the NDK. You might also need to export the path to get this to work. Run the following inside of the external/android-ffmpeg directory, before building:

export NDK=/path/to/ndk/installation
export PATH=$NDK:$PATH
  1. Turn this project into a library, if it is not already
  1. (To do this in Eclipse, go to [project] > Properties > Android and check Is Library)
  2. The library jar that will be created, will be located at: [project]/bin/android-ffmpeg-java.jar
B. Build IOCipher
  1. Pull this project from git
  2. Build project (follow the project's README)
  1. Note:
  2. The "make -C external" and "ndk-build" commands will not work if you have not set the path to the NDK inside of the iocipher root directory. Run the following inside of the iocipher root directory, before building:
        
export NDK=/path/to/ndk/installation
export PATH=$NDK:$PATH
  1. Turn this project into a library, if it is not already
    1. To do this in Eclipse, go to [project] > Properties > Android and check Is Library
    2. The library jar that will be created, will be located at: [project]/bin/iocipher.jar
C. Link ODKParser Library
  1. Pull this project from git
  2. Turn this project into a library, if it is not already
    1. To do this in Eclipse, go to [project] > Properties > Android and check Is Library
    2. The library jar that will be created, will be located at: [project]/bin/odkparser.jar
D. Install InformaCam
  1. Pull the project from git
  2. Link the android-ffmpeg-java and iocipher libraries
  1. Open the Project > Properties > Java Build Path
  2. You should see these libraries' jar files with broken links; edit these to point to the library jars noted in the above projects
  3. then open the Project > Properties > Android
  4. Make sure Is Library is not checked
  5. Under Reference on this page, make sure the IOCipher and Android-ffmpeg-java libraries are listed/added
E. Check that the target APIs for ffmpeg and InformaCam match
You should use the API level set for the InformaCam project set target as the default
  1. For each project check:
  1. Project > Properties > Android
  2. make sure the checked API level matches
F. Make sure you have enough memory
The default Eclipse memory may not be large enough and could cause heap problems. You will need to increase the size of the allocated memory until heap issue disappear.
  1. Open the eclipse.ini file
  1. on a Mac
  1. control + click on the Eclipse application
  2. Select Show Package contents
  3. In Contents > MacOS you will find eclipse.ini
  1. on Ubuntu
  1. this file should be located in: /usr/lib/eclipse/eclipse.ini
  2. Change the following to be allocated to somewhere between 1024 and 2048:
  1. launcher.XXMaxPermSize
  2. -Xms
  3. -Xmx

So the final code should look something like this:


--launcher.XXMaxPermSize
2048m
--launcher.defaultAction
openFile
-vmargs
-Xms2048m
-Xmx2048m

5. Push to phone
Because of specific hardware requirements, it is likely that an AVD will not be appropriate for debugging and development testing. It is suggested that you instead push to a Android device.

Also available in: PDF HTML TXT