Skip to content

Instantly share code, notes, and snippets.

@SuPair
Forked from vmlinz/build_strongswan_android.md
Created November 27, 2017 07:14
Show Gist options
  • Save SuPair/775ea0da54c1696b149e44f689d0e817 to your computer and use it in GitHub Desktop.
Save SuPair/775ea0da54c1696b149e44f689d0e817 to your computer and use it in GitHub Desktop.
Instructions to build StrongSwan android client from git source

Instructons of building StrongSwan android client from git source

Official guide

https://wiki.strongswan.org/projects/strongswan/wiki/AndroidVPNClientBuild

  • Preparing the dev environment(Build on Ubuntu 14.04 amd64 to prevent various issues), see the [Doc] 1
  • Preparing the source code: ./autogen.sh && ./configure && make dist
  • Preparing the dev environment with Android sdk and ndk for further development

Build by following the official guide

  • Download the prepared source distribution or official distribution
  • Extract it to jni/strongswan or link to the prepared git repo
  • Run ndk-build to build it

Build from customized github repo

  • git clone https://github.com/vmlinz/strongswan-android
  • git submodule init && git submodule update
  • Optional: switch the strongswan repo to a stable tag
  • Prepare the git source code as stated in the official gudie, run ./autogen.sh && ./configure && make dist in the root dir of strongswan source code
  • run ndk-build -j8 under app/src/main/jni to build the native code
  • run ./gradlew build under android project root to build the target application

Issues

Resources

@DinuNcl
Copy link

DinuNcl commented Mar 16, 2019

hello.
Is it possible to do this on Windows, cause I really have some trouble with make.

@guitorioadar
Copy link

there is no ndk-build -j8 under app/src/main/jni

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment