androidandroid-ndknative-activity

Can't open obb file although it is there


I'm trying to mount an obb file but

std::fstream test("/storage/emulated/0/Android/obb/com.bixense.jngl_test/main.1.com.bixense.jngl_test.obb");
assert(test);

says it doesn't exist (or I can't access it). When looking via adb shell the file is located here:

/storage/sdcard1/Android/obb/com.bixense.jngl_test/main.1.com.bixense.jngl_test.obb

Do I need to give my app some special permission?


Solution

  • Okay I've fixed it using

    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    

    in my AndroidManifest.xml. Strange, I thought I've read that this isn't needed for accessing my own files ...