Android Question EACCES (Permission denied)


Active Member
Licensed User
When running my app in release mode I get this error message: /mnt/sdcard/AMF/test.txt: open failed: EACCES (Permission denied)

The Folder and file exists. If I rund this small app in debug mode, I do not get this error. How funny!?

I know that Google has changed acceess rights when writing to external card but this is the internal card.
When I open ES file Explorer I can create and delte files in this Directory

Can someone please help!!!!!


Active Member
Licensed User
My app works fine using this approach.
I seems that "File.DirRootExternal" is a part of the internal memory card which is emulated as being an
external Card. Right?


Licensed User

As @Erel already stated: the Path to the REAL External SdCard can differ from model to model.
If you are using Android 5+ then you can use this library to find out the path to the (2nd) external SdCard. There is a codesnippet in the forum to find all paths. Probably your External Sd too.
Last edited: