Android port of Named Data Networking Forwarding Daemon
Java C++ Makefile Other
Latest commit 381cb28 Feb 11, 2017 @lpimem lpimem update OpenSSL building instructions
need to download to a specific folder.

Change-Id: Id21eb53588eb0be0185c0db42571627bd7ae079e
Refs: #3961

NFD on Android

Build Status


To compile code, the following is necessary

  • Recent version of Android SDK, android-23 SDK and 23.0.2 build tools (for build), android-19 SDK (for compatibility), and several other SDK components
  • CrystalX Android NDK version 10.3.1
  • Prebuilt version of OpenSSL library

Example script for Ubuntu 14.04 to get all dependencies, download SDK and NDK:



sudo apt-get install -y build-essential git openjdk-7-jdk unzip
sudo apt-get install -y lib32stdc++6 lib32z1 lib32z1-dev

tar xf crystax-ndk-$CRYSTAX_NDK_VERSION-linux-x86_64.tar.xz
rm crystax-ndk-$CRYSTAX_NDK_VERSION-linux-x86_64.tar.xz

tar zxf android-sdk_r$SDK_VERSION-linux.tgz
rm android-sdk_r$SDK_VERSION-linux.tgz

export ANDROID_HOME=`pwd`/android-sdk-linux
export PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools

echo "y" | android update sdk --filter platform-tools,build-tools-$BUILD_TOOLS_VERSION,android-$COMPILE_SDK_VERSION,extra-android-support,extra-android-m2repository,extra-google-m2repository --no-ui --all --force
echo "y" | android update sdk --filter "android-19" --no-ui --all --force

To create prebuilt OpenSSL libraries:

git clone
cd crystax-ndk-$CRYSTAX_NDK_VERSION
./build/tools/ ../android-vendor-openssl/
cp sources/openssl/1.0.1p/ -o sources/openssl/$OPENSSL_VERSION/

Alternatively, you can use precompiled versions (currently, available for CrystaX NDK 10.3.1 only):

cd crystax-ndk-10.3.1/sources
curl -L -o openssl.tar.gz
tar zx --strip-components 1 -C openssl -f openssl.tar.gz
rm openssl.tar.gz


git clone --recursive
echo sdk.dir=`pwd`/android-sdk-linux > NFD-android/
echo ndk.dir=`pwd`/crystax-ndk-10.3.1 >> NFD-android/
cd NFD-android

./gradlew assembleRelease

Setting up environment using Vagrant

The development setup can be set up with Vagrant and scripts provided in .vagrant/ folder. After vagrant command-line is installed, the following will create VM environment and fetch all necessary dependencies:

cd .vagrant
vagrant up
vagrant ssh

Refer to vagrant documentation for more information.