I importing a native binary that is started from an Android application that was done as more or less described in: Compile and use ABI-dependent executable binaries in Android with Android Studio 2.2 and CMake
Then I start the binary with Runtime.getRuntime().exec()
The problem is that the binary cannot access the internet, while the Java application can. To compare:
java.lang.Runtime.getRuntime().exec("ping -c 1 nu.nl");
works (returns 0)
, while ...
res = system("/system/bin/ping -c nu.nl");
...doesn't work, it returns 512 (which is supposed to be right-bit-shifted with 8, which means ping returns the exit code 2)
Why doesn't this work?
Obviously the manifest file contains:
uses-permission android:name="android.permission.INTERNET"