The current directory is "/", not the application directory:
#include <jni.h> #include <android/log.h> char cwd[1024]; if (getcwd(cwd, sizeof(cwd)) != NULL) __android_log_print(ANDROID_LOG_INFO, "", cwd);
To get the application directory, you need to use JNI calls for Java code, which in turn gets the android application directory from the context.
Nodrev
source share