Is there a way to stop android from creating folders on the SD card such as "Android" and "Download". I have Android KitKat version 4.4.2.
-
Just a note, I'd prefer not to delete those folders, since those are regarded as default folders for Android. Removing those might break some apps.– Andrew T. ♦Commented Feb 3, 2015 at 9:38
-
How to stop apps writing to “Android” folder on the SD card?– Irfan LatifCommented Nov 11, 2019 at 22:54
2 Answers
It is an obnoxious programming practice prevalent in Android and it's apps, alright.
/system/etc/permissions/platform.xml can be used to NOT give permission to everyone, their grandmothers and their cats to poop folders and files left and right everywhere throughout your SD card, but is not the final solution... just a way to make it less bad.
If not, remember that Android runs on Linux and you can always use the rules of Linux against it... or the rules of the filesystem for instance... If the SD card has a FAT32 filesystem there cannot be folders and files with the same name... so... by creating files named "LOST.DIR", "ReceivedFiles", "Download" and so forth ensures no other folders will be created... lastly is just a matter of setting the proerties of those same files to "hidden" and the file manager to "not show hidden files/folders"...
They will still be there doing their function but just not so visually.
Ultimately it is up to the person who writes each app to store app related data in the /data partition instead of the SD card as it was intended to be.
-
I believe you need root to access
/system
folder... but I couldn't find the path you mentioned: there is no/settings
folder inside/system
. This is observed on Nexus 4 running Lollipop 5.0.1.– Andrew T. ♦Commented Feb 3, 2015 at 9:40 -
typo... that is /system/etc/permissions/platform.xml and, yes root required obviously Commented Feb 3, 2015 at 10:08
-
If I remember correctly the permission you need to tweak is android.permission.WRITE_EXTERNAL_STORAGE Commented Feb 3, 2015 at 10:13
If you have Kitkat or upper, then this should work:
On my Phone (Galaxy S3 mini) I found the option Protect SD card/ usb Storage
in the Developer Options. Always when it's tagged there gets no "Android" folder created. After a small internet recherche I found out more about that feature and stumbled over these articles:
How To Protect Your Sd Card In your Android Phone and Jelly Bean brings a new permission along - 'read external storage'
According to the Android API Doc every Kitkat phone with Android 4.1 and above should be able for that:
READ_EXTERNAL_STORAGE
"Provides protected read access to external storage. In Android 4.1 by default all applications still have read access. This will be changed...."