I've been trying to create folder and files on the sd-card of my 4.4.2 android device, but the java.io.File operations have insuficient permissions to do it. File.mkdir() just returns false whenever i write to /mnt/sdcard1.
I've read about google changes in android 4.4 to "support" secondary external storage ( not officially supported before ) and how it end up in devices unable to write to sdcards. I've tryed every way i found to write to the sd-card programatically but whith zero progress so far.
I know that some external apps like "ES File Explorer" can modify the contents of the sd-card at will, so there's must be a way to avoid this permissions problems without rooting the device. ¿ Have someone any idea how they do it ?
Edit:
There are devices, like mine, where internal storage is emulated like an sd card. When you ask for Environment.getExternalStorageDirectory() it returns this emulated sd-card instead the real sd-card. In order to access this secondary sd-card you have to search for it either in /storage or in /mnt.
Since Android 4.4 only applications whith WRITE_MEDIA_STORAGE permission can arbitrarily write to the secondary SD-CARD, but that permission can only be granted to system apps or applications signed by the device manufacturer. There is an adicional way to write, but only in the application folder in the SD /apps/your.app/...
The problem well explained: http://www.chainfire.eu/articles/113/Is_Google_blocking_apps_writing_to_SD_cards_/
The thing is i need to write to an arbitrary folder in the SD, Google, in theory has forbidden this, but there are applications in the Play Store, that can do it, so there's has to be a way to work around that restricction.