[Guide] [Root required] Allow Apps write access to SD card and USB Drive (Fire TV 2)

Search This thread

gazdaman.

Senior Member
Jan 22, 2012
86
17
So, I ran in to some difficulty allowing apps saving to external storage.
As it turns out Google changed the default permissions to external storage in Android 4.4 (API 19)
I found a guide that solved this problem for me so thought it would be good to share on here
(All credits go to Android Revolution for the guide)

Procedure
Note: root required!

Start up your device normally and wait for the system to be fully loaded.

Open any files manager of your choice (Root Explorer, ES File Explorer, Total Commander) and make sure it runs with superuser permissions.

Mount your system partition as R/W (Read/Write) to perform any changes.

Navigate to the /system/etc/permissions/ folder and look for the platform.xml.

Copy and make a backup of the platform.xml file naming it platform.xml.bak

Open the original platform.xml file with any text editor on your device and search for the following line:
<permission name="android.permission.WRITE_EXTERNAL_STORAGE">

It should look like this:
<permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
<group gid="sdcard_r" />
<group gid="sdcard_rw" />
</permission>

Now you need to add a 3rd GID (Group ID): <group gid="media_rw" /> and you need to make it looks exactly like this:
<permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
<group gid="sdcard_r" />
<group gid="sdcard_rw" />
<group gid="media_rw" />
</permission>

Using ES File Explorer or any other Files Manager of your choice make sure that the platform.xml file has proper permissions:
Owner R-W | Group R | Others R (0644 rw-r--r--).

You can also use adb shell to set permissions with a chmod 0644 /system/etc/permissions/platform.xml command.
Reboot your device and enjoy!

In case of problems with OTA update just remove modified platform.xml and rename platform.xml.bak to its original name.

For those who just want my already modified, file click to download here
Confirm this works great on FTV2 and fixed my apps write problems
 
  • Like
Reactions: Kramar111

gazdaman.

Senior Member
Jan 22, 2012
86
17
What apps need this? It's good info to have out there just looking for an example of what situations need it.
As examples,
Some emulators that save game saves to external storage (If configured that way)
UAE4ALL2 (Amiga Emulator) when using WHDLoad setup (Dos error if no write access to WHDLoad folder)
Titanium Backup to save backups to external storage location.

No doubt there are lots of other scenarios.
 
Last edited:
  • Like
Reactions: Ludacrisvp
Dec 21, 2015
48
7
Hi,

just tried it but i'm not able to remount rw the system part.
I test it with ES File Explorer, RB, and over adb shell
mount -o remount,rw /system
Error: invalid argument
The root partition just works fine
What was your trick?
Regards
 

gazdaman.

Senior Member
Jan 22, 2012
86
17
Hi,

just tried it but i'm not able to remount rw the system part.
I test it with ES File Explorer, RB, and over adb shell
mount -o remount,rw /system
Error: invalid argument
The root partition just works fine
What was your trick?
Regards

You need root, obviously.
Open ES File Explorer.
Scroll down to tools and select Root Explorer.
Grant SU permissions.
Now make /system R/W access
You can then amend / replace the file platform.xml file
 

gazdaman.

Senior Member
Jan 22, 2012
86
17
Device is rooted
And yes, tried exact what you say but it did not work. The ES FE didn't even show up an error message. Any ideas?

Are you using ES File Explorer from Amazon Market?
No idea why it would not work.

Are you getting the Super User request when you click on Root Explorer in the tools menu?
 

Ludacrisvp

Senior Member
Dec 13, 2008
166
24
MN
If you can't remount system as rw just reboot and try again. When I used abdFire to install system tools I was unable to remount system until reboot.
 
Dec 21, 2015
48
7
Yes, i did recieved the request for su but as i already tried other root apps or commands during the last days, I'm almost sure that root works as design.
For ES FE the same, tried the Amazon Version and 2-3 apks which I deployed via sideload. Could you maybe post the output of that after a /system remount:
cat /proc/mounts
Would be helpful
@Ludacrisvp
Hm, actualy I rebootet several times but the reason for failing could be something which is coming up again in the background. I'll take a look in that
 
Last edited:
Dec 21, 2015
48
7
That's right. But in my case it makes no difference. I just reboot und connect to adb shell as soon as the device was recognize. No way
su
mount -o remount, rw /system
mount: invalid argument
What the...

Have you something installed after rooting? Toolkit, busybox for example?
 

gazdaman.

Senior Member
Jan 22, 2012
86
17
That's right. But in my case it makes no difference. I just reboot und connect to adb shell as soon as the device was recognize. No way
su
mount -o remount, rw /system
mount: invalid argument
What the...

Have you something installed after rooting? Toolkit, busybox for example?

I do have busybox pro sideloaded, but don't know if that makes a difference
 
Dec 21, 2015
48
7
Installation was ok but the error is persistent
Maybe it was already too late. Busybox should be the first to install :silly:
OK,i guess i should reset, what do you think?
 
Dec 21, 2015
48
7
damn, doesn't work :rolleyes:

tried it also with the 2 argument method but same story

here's some output, maybe i'm blind and others can see it :p

did it via ssh to get a root shell. "adb root" comes up with no root in production system.

[email protected]:/mnt/sdcard # mount -o remount,rw /system
mount: Invalid argument
255|[email protected]:/mnt/sdcard # mount -o remount,ro /system
[email protected]:/mnt/sdcard #

[email protected]:/mnt/sdcard # which mount
/system/bin/mount

[email protected]:/mnt/sdcard # cat /proc/mounts
rootfs / rootfs ro,seclabel 0 0
tmpfs /dev tmpfs rw,seclabel,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,seclabel,relatime,mode=600 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,seclabel,relatime 0 0
selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0
none /sys/fs/cgroup tmpfs rw,seclabel,relatime,mode=750,gid=1000 0 0
none /sys/kernel/debug debugfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/asec tmpfs rw,seclabel,relatime,mode=755,gid=1000 0 0
/dev/block/dm-3 /mnt/asec/berserker.android.apps.sshdroid-1 ext4 ro,dirsync,seclabel,nosuid,nodev,noatime 0 0
/dev/block/dm-2 /mnt/asec/com.estrongs.android.pop-1 ext4 ro,dirsync,seclabel,nosuid,nodev,noatime 0 0
tmpfs /mnt/obb tmpfs rw,seclabel,relatime,mode=755,gid=1000 0 0
/dev/block/platform/mtk-msdc.0/by-name/system /system ext4 ro,seclabel,noatime,commit=1,data=ordered 0 0
/dev/block/platform/mtk-msdc.0/by-name/userdata /data ext4 rw,seclabel,noatime,commit=1,data=ordered 0 0
/dev/block/platform/mtk-msdc.0/by-name/cache /cache ext4 rw,seclabel,noatime,commit=1,data=ordered 0 0
/dev/block/loop0 /mnt/sqfs squashfs ro,context=u:eek:bject_r:squashfs_file:s0,relatime 0 0
/dev/fuse /mnt/shell/emulated fuse rw,nosuid,nodev,noexec,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
tmpfs /storage/emulated tmpfs rw,seclabel,nosuid,nodev,relatime,mode=050,gid=1028 0 0
/dev/block/vold/179:129 /mnt/media_rw/sdcard1 vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/179:129 /mnt/secure/asec vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/fuse /storage/sdcard1 fuse rw,nosuid,nodev,noexec,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /storage/emulated/0 fuse rw,nosuid,nodev,noexec,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /storage/emulated/0/Android/obb fuse rw,nosuid,nodev,noexec,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /storage/emulated/legacy fuse rw,nosuid,nodev,noexec,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /storage/emulated/legacy/Android/obb fuse rw,nosuid,nodev,noexec,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
 

gazdaman.

Senior Member
Jan 22, 2012
86
17
Does busybox add its own mount command?
Maybe try calling out the full path:
# /system/bin/mount -o remount,rw /system

Not sure why @Fruchttiger00x0 is having so much trouble with it.
I just used ES File Explorer (root explorer) to mount r/w no issues.

Another option for you to try is via adbfire.
It has a simple 1 click button to make /system r/w

Other than that, maybe your root is not complete for some reason
 

elemenopee7

New member
Jan 6, 2016
2
0
I ran into the same problem mounting /system as rw. Banged my head for quite some time. I had rooted using the video tutorial by ultimate spy binns. So I rooted it again the same exact way and that solved the mount issue. So I was able to set platform.xml to fix the permissions but alas, my apps still cant write to external hdd.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    So, I ran in to some difficulty allowing apps saving to external storage.
    As it turns out Google changed the default permissions to external storage in Android 4.4 (API 19)
    I found a guide that solved this problem for me so thought it would be good to share on here
    (All credits go to Android Revolution for the guide)

    Procedure
    Note: root required!

    Start up your device normally and wait for the system to be fully loaded.

    Open any files manager of your choice (Root Explorer, ES File Explorer, Total Commander) and make sure it runs with superuser permissions.

    Mount your system partition as R/W (Read/Write) to perform any changes.

    Navigate to the /system/etc/permissions/ folder and look for the platform.xml.

    Copy and make a backup of the platform.xml file naming it platform.xml.bak

    Open the original platform.xml file with any text editor on your device and search for the following line:
    <permission name="android.permission.WRITE_EXTERNAL_STORAGE">

    It should look like this:
    <permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
    <group gid="sdcard_r" />
    <group gid="sdcard_rw" />
    </permission>

    Now you need to add a 3rd GID (Group ID): <group gid="media_rw" /> and you need to make it looks exactly like this:
    <permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
    <group gid="sdcard_r" />
    <group gid="sdcard_rw" />
    <group gid="media_rw" />
    </permission>

    Using ES File Explorer or any other Files Manager of your choice make sure that the platform.xml file has proper permissions:
    Owner R-W | Group R | Others R (0644 rw-r--r--).

    You can also use adb shell to set permissions with a chmod 0644 /system/etc/permissions/platform.xml command.
    Reboot your device and enjoy!

    In case of problems with OTA update just remove modified platform.xml and rename platform.xml.bak to its original name.

    For those who just want my already modified, file click to download here
    Confirm this works great on FTV2 and fixed my apps write problems
    1
    What apps need this? It's good info to have out there just looking for an example of what situations need it.
    As examples,
    Some emulators that save game saves to external storage (If configured that way)
    UAE4ALL2 (Amiga Emulator) when using WHDLoad setup (Dos error if no write access to WHDLoad folder)
    Titanium Backup to save backups to external storage location.

    No doubt there are lots of other scenarios.
    1
    put the file you local network or on a share folder on your computer then use es explorer to access it and copy and overwrite the other one.
    make sure you turn on root on es explorer.
    1
    That is pretty damn clever!!! I just used es on my phone and i can actually read my sdcard (1st time ive seen it in 3 days.) But, I cant see root files remotely from the phone. What other alternatives do i have? How do i get the file to /etc/permissions?
    update--ok so I pushed the platform.xml backup to my mac. I have adb working. Can i push this file to system/etc/permissions? AND will it overwrite it automatically or should i push the .bak file then manually delete the modded platform.xml?
    Would this be the command?--
    adb push /system/etc/permissions/ ?
    I don't know the correct adb commands but yes it will overwrite the file with the same name

    Sent from my SM-G900F using Tapatalk
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone