Skip to content
Branch: master
Go to file

Latest commit

cawka committed b49dd9c May 29, 2020
Change-Id: I3b0b3a6c5b64ce821ca5a0f7831220d01594fa70


Failed to load latest commit information.

NFD on Android

Build Status


To compile code, the following is necessary

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

sudo apt -q update
sudo apt -qy upgrade
sudo apt-get install -y build-essential git openjdk-8-jdk unzip ruby ruby-rugged
sudo apt-get install -y lib32stdc++6 lib32z1 lib32z1-dev

mkdir android
cd android
mkdir -p cmdline-tools
mv tools cmdline-tools/latest

export ANDROID_HOME=`pwd`
export PATH=${PATH}:${ANDROID_HOME}/cmdline-tools/latest/bin:${ANDROID_HOME}/platform-tools

echo "y" | sdkmanager "platform-tools"
sdkmanager "platforms;android-29" "ndk-bundle"

cd ndk-bundle
git clone crew.dir

CREW_OWNER=named-data-mobile crew.dir/crew install target/sqlite target/openssl target/boost
CREW_OWNER=named-data-mobile crew.dir/crew install target/ndn_cxx target/nfd

cd ..

The above crew scripts will install pre-compiled versions of sqlite, openssl, and boost libraries. For more details about the crew tool, refer to


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

# Build in release mode (you will need to have proper signing keys configured, see
./gradlew assembleRelease

# Build in debug mode
./gradlew assembleDebug

You can also automatically install debug/release NDN-android to the connected phone

# build and install release version (will require signing key configuration)
./gradlew installRelease

# build and install debug version
./gradlew installDebug

Note that you can limit architectures being built using NDK_BUILD_ABI variable. For example,

export NDK_BUILD_ABI=armeabi-v7a,x86_64

will limit build to armeabi-v7a and x86_64.

By default, the build script will try to parallelize build to the number of CPUs. This can be overridden using NDK_BUILD_PARALLEL variable.

To upload .apk files to Google Play (need configuration of keys and Google Play credentials, see

./gradlew publishRelease

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.


Android port of Named Data Networking Forwarding Daemon




You can’t perform that action at this time.