Search This Blog

Friday, 5 December 2014

WRITE_EXTERNAL_STORAGE permision limit to primary memory acess : Weirdest update of Android KitKat 4.4

Post Address Issue -


  • WRITE_EXTERNAL_STORAGE  doesn't work with Android KitKat 4.4
  • Android KitKat 4.4 doesn't allowing writing to secondary storage
  • Error accessing the SD card on Android KitKat (4.4.x)

I had gone through Weirdest  issue recently, My app suddenly got bad reviews as  app is not working with Android KitKat 4.4 and above. I dig out and find problem, My android application was not able to read from android secondry memory storage (i.e called Sdcard also.). Android KitKat 4.4 support WRITE_EXTERNAL_STORAGE  in certain manner now.

Interesting point for KitKat is that writing to secondary external storage (such as SD memory card) is prohibited, except of app's specific directory, which is deleted during app uninstall.Only solution to this problem is to get your phone rooted.

Google Android cleary says


The WRITE_EXTERNAL_STORAGE permission must only grant write access to the primary external storage on a device. Apps must not be allowed to write to secondary external storage devices, except in their package-specific directories as allowed by synthesized permissions. Restricting writes in this way ensures the system can clean up files when applications are uninstalled.

If your phone is rooted you will have access to /system/etc/security/permissions.xml . media_rw is clearly missing here

<permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
<group gid="sdcard_r" />
<group gid="sdcard_rw" />
<group gid="media_rw" />
</permission>

still its not clear why Google android KitKat 4.4 has logic behind this Weirdest . See Reported BUG to Android 4.4 does not allowing writing to secondary storage.

No comments:

Post a Comment

Feedback always help in improvement. If you have any query suggestion feel free to comment and Keep visiting my blog to encourage me to blogging

Android News and source code