Kindle Fire 2nd Generation SD card EACCES (Permission denied)
Hi, I'm getting a ...FileNotFoundException: open failed: EACCES (Permission denied)... error when trying to create files in /mnt/sdcard/Android/data/%PACKAGE_NAME%/files/ on the emulator for the 2nd Generation Fire. The app has the required manifest permissions and the problem does not arise on Kindle Fire HD and KIndle Fire 1st Generation emulators. (And yes, %PACKAGE_NAME% is replaced with the actual package name) Is this a bug in the emulator image only or will the same problem show on real devices? Thanks np
There is nothing special about the code and no need to worry about privacy. new java.io.File(Environment.getExternalStorageDirectory(), "/Android/data/some.package.name/files").mkdirs(); is basically all it takes to trigger the exception. All emulators are set up with the minimum 9mB SD card size. However, if you can not reproduce it and say that it can not be caused by something that is intentionally different on the 2nd Gen Fire then I'll happily attribute it to something specific to my machine (way too many emulators or something) and stop worrying about it. thanks
Would it work on your other emulators without that flag? Yes. See my initial post, permissions are set. But as I said in my last post, it's likely something on my machine. I think we can close this. Thanks
It needs the permission to be given explicitly in Android manifest file. However, I am not able to reproduce this error on my machine for this code with or with out this flag. Please try in your machine and let us know if you still face this issue. Thank you.