strongSwan on Android » History » Version 1
strongSwan on Android¶
The IKEv2 daemon charon has been ported to Google Android.
This document describes how to build strongSwan for Android 2.0 (using the emulator).
Android Source Tree¶
You will need the complete Android source to build strongSwan. Instructions on how to download and build it can be found on the Android website.
To checkout a specific branch or tag of the sources, specify it with the
-b parameter when using the
repo init command.
Since building the whole source tree takes quite a while you should probably start with this first:
cd /path/to/android/source . build/envsetup.sh lunch 1 make
The prebuilt kernel that is used for the emulator lacks some modules required for strongSwan to work correctly. It is therefore required to build a custom kernel. To get the current kernel config you can use the adb tool to download it from the running emulator. After starting the emulator use
adb pull /proc/config.gz config.gzto copy the config to the current directory. Then enable the missing modules, this is mainly
CONFIG_NET_KEYbut might include other modules.
Please compare your config to the list of required modules in this wiki (please note that some modules, especially all the IPv6 related modules, are not really required).
Clone the kernel sources and checkout an appropriate tag (check the version of the kernel in the emulator). For example:
git clone git://android.git.kernel.org/kernel/common kernel cd kernel git checkout -t origin/android-goldfish-2.6.29
You can then copy your config to this directory and compile the kernel sources using
export ARCH=arm export CROSS_COMPILE=/path/to/android/source/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- make oldconfig make
To start the emulator using your custom kernel use the following command:
emulator -kernel /path/to/kernel/source/arch/arm/boot/zImage &