icn-team / android-sdk

2 stars 2 forks source link

Android SDK

This is the hICN Distillery software distribution for Android. It is in charge of pulling together all the necessary modules to build a full hICN software suite for arm64 and x86_64 Android arch.

Dependencies

Install dependencies

If Ubuntu:

sudo apt-get install git wget python curl automake libconf libtool openjdk-8-jdk

If Mac Os X

brew install git wget automake libconf libtool gnu-sed coreutils

Quick Start

Clone this distro

git clone https://github.com/icn-team/android-sdk.git
cd android-sdk

Compile everything (dependencies and hICN modules)

make update
export ANDROID_ARCH="arm64"
make all
export ANDROID_ARCH="x86_64"
make all

Compile viper dependencies

echo "export QT_CI_LOGIN=<qt username>"
echo "export QT_CI_PASSWORD=<qt password>"

export ANDROID_ARCH="arm64"
make build-qtdep
export ANDROID_ARCH="x86_64"
make build-qtdep

The hICN Distillery software will be installed in android-sdk/usr_aarch64 and android-sdk/usr_x86_64

To compile Hybrid ICN Network Service for android app

make android_hicnforwarder GITHUB_USER=<github user> GITHUB_TOKEN=<github token>

To install the application run

# Optionally, uninstall previous version (to avoid signature mismatch issues)
adb uninstall com.cisco.hicn.forwarder

adb install -r ./HicnForwarderAndroid/app/build/outputs/apk/release/HicnForwarderAndroid.apk

To compile Hybrid ICN SpeedTest & Test android app

make android_hicntools GITHUB_USER=<github user> GITHUB_TOKEN=<github token>

To install the application run

adb install -r ./app/build/outputs/apk/release/hICN_Tools.apk

To compile Viper ABR video player for android app

make android_viper

To install the application run

adb install -r build_aarch64/viper/hicn-viper-arm64_v8a/build/outputs/apk/hicn-viper-arm64_v8a-release-signed.apk

To compile Common aar module

make android_hicntools

To compile hicn-light forwarder aar module

make android_forwarderlibraryaar GITHUB_USER=<github user> GITHUB_TOKEN=<github token>

To compile face manager aar module

make android_facemgrlibraryaar GITHUB_USER=<github user> GITHUB_TOKEN=<github token>

Platforms

Getting Started

To get simple help run make. This will give you a list of possible targets to execute. You will basically want to download all the sources and compile.

Here's a short summary:

Use hicn aar modules in custom application

In app/build.gradle add

repositories {
    maven {
        name = 'GitHubPackagesPublic'
        url = uri('https://maven.pkg.github.com/icn-team/android-sdk')
        credentials {
            username = <github user>
            password = <github token>
        }
    }
}

dependencies {
    implementation 'com.cisco.hicn:common:+'
    implementation 'com.cisco.hicn:hicnforwarder:+'
    implementation 'com.cisco.hicn:facemgr:+'
}

Configuration

Distillery can be configured in multiple ways. Please check the config directory (specifically config/config.mk) for more information.

Command line tools

The hICN distillery makes also available some command line tools which can be very helpful for debugging and check the status of the active components.

After you compile the hICN software suite:

bash ./compileAll.sh

Copy the output folder (usr_aarch64 or usr_x86_64, depending on the architecture) in the phone using adb:

adb push ./usr_aarch64 /data/local/tmp/

Access the phone with adb shell:

adb shell

Go inside the copied folder and run hicn-light-control:

cd /data/local/tmp/usr_aarch64/bin
chmod +x hicn-light-control
./hicn-light-control

This command line tools allows to check the current status of the local forwarder. In particular, you can check the current list of connections running this command:

./hicn-light-control list connections

And you can check the current FIB with this command:

./hicn-light-control list routes