views:

201

answers:

2

Has anyone used the Android NDK to port a Linux app? We have an SSL VPN solution at work which Openconnect (http://www.infradead.org/openconnect.html) works with, but there is currently no client (from Cisco or otherwise) on Android. Is using the Android NDK a feasible approach to get this to work?

Thank you in advance

+1  A: 

The Android NDK is not for porting apps. It is for creating libraries that can be accessed from a standard Android Dalvik app via JNI.

So, if you have the source code to this project, and it results in a .so, and you can write a JNI wrapper for it, the NDK may be a solution for you. Considering the project you cite seems dependent upon scripts, I suspect that's not how it was set up for use.

CommonsWare
+2  A: 

The NDK is a good solution for porting C/C++ Apps. You need to do a thin java shell to pass over any input, init and exit the program.

If your C app requires STL or exceptions - there are modified versions of the NDK that support them.

Chozabu