Here goes my first answer ever...
As mentioned by Cumatru I also used https://github.com/cloudchou/NativeBinderJavaClientDemo.
I have not yet fully understood the whole process, but at least it works and it's a way to move forward with a pretty "simple" example. I am on a very basic android level, so please bear with me and help improve the answer in whatever way you'd like.
There seem to be three parts:
1. A server process made in c++ running natively.
2. An android application client.
3. A simple java-client that will be built into a .jar-file.
No alteration to the code seems to be necessary, at least for the simple java-client and the c++-server.
- Build and push the server-application to your target. Run it in an adb shell.
- Build and push the java-client (.jar-file), called fclient, to your target in /system/framework/
- Run the java-client using the fclient-script
- An addition will be made on the two integers sent from the client, and replied back to the server.
Hopefully it works for you too.