FORUMS

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

86 posts
Thanks Meter: 17
 
By gazdaman., Member on 20th December 2015, 04:23 AM
Post Reply Email Thread
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
The Following User Says Thank You to gazdaman. For This Useful Post: [ View ] Gift gazdaman. Ad-Free
20th December 2015, 06:25 PM |#2  
Senior Member
Flag MN
Thanks Meter: 24
 
More
What apps need this? It's good info to have out there just looking for an example of what situations need it.
20th December 2015, 11:24 PM |#3  
OP Member
Thanks Meter: 17
 
More
Quote:
Originally Posted by Ludacrisvp

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.
The Following User Says Thank You to gazdaman. For This Useful Post: [ View ] Gift gazdaman. Ad-Free
21st December 2015, 12:14 AM |#4  
Member
Thanks Meter: 7
 
More
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
21st December 2015, 12:55 AM |#5  
OP Member
Thanks Meter: 17
 
More
Quote:
Originally Posted by Fruchttiger00x0

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
21st December 2015, 01:23 AM |#6  
Member
Thanks Meter: 7
 
More
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?
21st December 2015, 03:29 AM |#7  
OP Member
Thanks Meter: 17
 
More
Quote:
Originally Posted by Fruchttiger00x0

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?
21st December 2015, 03:50 AM |#8  
Senior Member
Flag MN
Thanks Meter: 24
 
More
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.
21st December 2015, 03:53 AM |#9  
Member
Thanks Meter: 7
 
More
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
21st December 2015, 04:10 AM |#10  
OP Member
Thanks Meter: 17
 
More
Quote:
Originally Posted by Ludacrisvp

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.

Good advise.
As a rule of thumb, I always do a clean reboot before I start to mess with stuff.
21st December 2015, 06:38 AM |#11  
Member
Thanks Meter: 7
 
More
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?
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes