GetFilesDir() from NDK?
I have custom helper class for accessing various paths, for the data directory I do this:
- Read
/proc/self/cmdline
or/proc/**MyPID**/cmdline
- Append the results from #1 to
/data/data/
Example results:
/data/data/com.yourcompany.yourproduct/
If you are using NativeActivity
then you have access from native code to an ANativeActivity
instance (see <ndk_root>/platforms/android-9/arch-arm/usr/include/android/native_activity.h
) which has internalDataPath
and externalDataPath
members.