How Tos

HOWTO compile AFLogical OSE on Santoku Linux

Posted by:

This HOWTO will guide you through the process of compiling AFLogical OSE from source on Santoku Linux CE.

Contents

What you will need:

  • Santoku – Alpha 0.2 (or later)

AFLogical OSE Background

AFLogical OSE was released in December 2011 and is now hosted on GitHub. The app provides a basic framework for extracting data from Android devices using Content Providers and then saves the data to the SD Card of the device including:

  • Contacts
  • Call Logs
  • SMS
  • MMS
  • MMS Parts
  • Device info

AFLogical OSE has been successfully tested on Android 1.5 through 4.1 (Jelly Bean) and across many non-standard Android devices.

Required build software

Since the goal of Santoku Linux is to provide mobile security, forensic and malware tools pre-installed, there are are few additional software development packages which need to be installed.

Some debs

sudo apt-get update
        sudo apt-get install ant git

 

Oracle JDK on Ubuntu 12.04
For compatibility, we use the Oracle JDK instead of Open JDK (ymmv). First, you need to download the latest JDK from Oracle (7u7 as of today). Make sure you download the tar.gz file (jdk-7u7-linux-i586.tar.gz). Assuming this was saved to your Downloads directory, start a Terminal (Accessories > LXTerminal or on bottom panel) and run the following:

cd ~/Downloads
        tar xzvf jdk-7u7-linux-i586.tar.gz 
        export JAVA_HOME=/home/santoku/Downloads/jdk1.7.0_07

 

Next we need to fetch the Android API level we want to target:

android

 

From the Android SDK manager, select your desired version. For this example, we chose Android 2.1 (API 7):

SDK Manager

Make sure you install the API and accept the license agreement.

Compiling AFLogical OSE

We’re finally ready to compile AFLogical OSE. First, we need to fetch the code from GitHub. Let’s reuse the open Terminal window (or start a new one) and type the following:

mkdir ~/projects
        cd ~/projects
        git clone https://github.com/viaforensics/android-forensics.git

 

Next, we’ll setup the Android project. If you downloaded a different API level, change accordingly:

android update project --name AFLogical-OSE --target android-7 --path ~/projects/android-forensics

 

And finally we can compile the .apk with ant. In our example, we compile in debug mode:

cd ~/projects/android-forensics
        ant debug

 

Note: you can also do “ant release” to build a released, non-debug version.

It should not take long and you should see “BUILD SUCCESSFUL” at the end:

[email protected]:~/android-forensics$ ant debug
        Buildfile: /home/santoku/android-forensics/build.xml
        
        -check-env:
         [checkenv] Android SDK Tools Revision 20.0.3
         [checkenv] Installed at /opt/santoku/android-sdk-linux
        
        BUILD SUCCESSFUL
        Total time: 5 seconds

 

The debug .apk will be in the bin folder (AFLogical-OSE-debug.apk). You can now image your Android device…w00t!