📜 ⬆️ ⬇️

Block free SD recording on Android 4.4 devices

Have a nice day, everyone! The other day, a fresh custom firmware for Android 4.4.2 Kit Kat was released on my HTC ONE Dual Sim and immediately the majority of users of the device were puzzled by the fact that Google had blocked the free recording on SD cards for applications .

image


Further, a trivial interest, a little googling, and after some trial and error I managed to get around the limitation.
Throwing a shadow of doubt, I decided to share with the community, perhaps this decision will be useful to someone.
This option works only for devices that have root access, since need to edit system files.
So, we need to edit the file /system/etc/permissions/platform.xml
In it we find the sections android.permission.WRITE_EXTERNAL_STORAGE and android.permission.WRITE_MEDIA_STORAGE
We then need to edit them. In my device, these sections should look like this:
 <permission name = "android.permission.WRITE_EXTERNAL_STORAGE">
     <group gid = "sdcard_r" />
     <group gid = "sdcard_rw" />
     <group gid = "media_rw" />
 </ permission>
 <permission name = "android.permission.WRITE_MEDIA_STORAGE">
     <group gid = "sdcard_rw" />
     <group gid = "media_rw" />
 </ permission>

After saving the file and restarting the device, my favorite file manager got the rights to write to the SD card.
At this fix, I was prompted by an article on androidpolice .
I think that advanced Android developers know this solution, but decided to share it all the same.
And it is unlikely that smartphone manufacturers will leave this restriction if they want to use an external SD slot.

')

Source: https://habr.com/ru/post/214431/


All Articles