unable to write files to external sd card

Search This thread

otamctech

Senior Member
Jul 6, 2011
50
9
Philly PA
I can't post a link to the original post on another forum that worked for me so I will quote it:

Simple solution for external sdcard write access on Android 3.2...if you're rooted

I've found a simple solution for gaining write access to the external sdcard (/mnt/sdcard2) on Android 3.2. The sdcard is mounted r/w, but the owning group is media_rw which is linked to the WRITE_MEDIA_STORAGE permission. Unfortunately, this permission was not required for access to the external sdcard prior to 3.2 so most file management utilities do not request it when they run...meaning they only have read access to the card.

The simple solution, if you're rooted, is as follows:
1. Using a root-enabled file manager, navigate to /system/etc/permissions and make sure you have mounted the file system r/w.
2. Edit platform.xml and find the WRITE_EXTERNAL_STORAGE permission.
3. Add an additional group definition for this permission...<group gid="media_rw" />
4. Save the changes to the file.
5. Restart your tablet.

After this change, any apps that request the WRITE_EXTERNAL_STORAGE permission (which includes almost anything that access either of the sdcards) will gain group membership in both sdcard_rw AND media_rw, giving them r/w access to both sdcard filesystems.

Good Stuff - worked for me. Thanks.
 

KnoxBNYC

Senior Member
Dec 28, 2011
275
57
57
New York, NY
Please someone provide me more details or give me the picture of the edited .xml thanks.

Sent from my GT-P6200L using Tapatalk

This is my screen shot. After pulling my hair out over my Tab 7;0 Plus not being able to write to its SD card, I tried this idea from this forum and it worked like a charm!! :D

(See the top line of the screen cap.)

Knox B.
 

Attachments

  • export_02.jpg
    export_02.jpg
    46.3 KB · Views: 3,479

KnoxBNYC

Senior Member
Dec 28, 2011
275
57
57
New York, NY
I can't post a link to the original post on another forum that worked for me so I will quote it:

Simple solution for external sdcard write access on Android 3.2...if you're rooted

I've found a simple solution for gaining write access to the external sdcard (/mnt/sdcard2) on Android 3.2. The sdcard is mounted r/w, but the owning group is media_rw which is linked to the WRITE_MEDIA_STORAGE permission. Unfortunately, this permission was not required for access to the external sdcard prior to 3.2 so most file management utilities do not request it when they run...meaning they only have read access to the card.

The simple solution, if you're rooted, is as follows:
1. Using a root-enabled file manager, navigate to /system/etc/permissions and make sure you have mounted the file system r/w.
2. Edit platform.xml and find the WRITE_EXTERNAL_STORAGE permission.
3. Add an additional group definition for this permission...<group gid="media_rw" />
4. Save the changes to the file.
5. Restart your tablet.

After this change, any apps that request the WRITE_EXTERNAL_STORAGE permission (which includes almost anything that access either of the sdcards) will gain group membership in both sdcard_rw AND media_rw, giving them r/w access to both sdcard filesystems.

@thaloneus :

Thank you SOOO much for this.

But, I have to frickin' ask:

Is this a bug?

An oversight on Samsung's part?

A problem with Honeycomb?

Do other Honeycomb devices have the same problems?

Do all Honeycomb devices have this problem??

:confused: :confused:
 

garyd9

Inactive Recognized Developer
Sep 13, 2006
2,643
2,732
53
Pittsburgh, PA
But, I have to frickin' ask: ... Is this a bug? ...
Do all Honeycomb devices have this problem??
Not a bug. Its a design change with honeycomb that very few (if any) app developers have caught up with. I think that at least some tablet makers have modified that .xml file in their stock firmware, but certainly not all of them.

Gary
 

SuperBoUDS

Senior Member
Jan 14, 2012
197
62
The simple solution, if you're rooted, is as follows:
1. Using a root-enabled file manager, navigate to /system/etc/permissions and make sure you have mounted the file system r/w.
2. Edit platform.xml and find the WRITE_EXTERNAL_STORAGE permission.
3. Add an additional group definition for this permission...<group gid="media_rw" />
4. Save the changes to the file.
5. Restart your tablet.

After this change, any apps that request the WRITE_EXTERNAL_STORAGE permission (which includes almost anything that access either of the sdcards) will gain group membership in both sdcard_rw AND media_rw, giving them r/w access to both sdcard filesystems.

I have the same problem and this tip work for me. Thank u for useful tip :).
 

Sigilist

Member
Mar 4, 2011
12
0
I'm afraid this didn't work for me. I'm a bit new to working with an android device, but I have rooted the unit, and then acquired root explorerer, and then carefully edited the xml file noted. I rebooted and still cannot write to the extSD.

When I went back into the xml file, I noted that in place of two "group" tags (including the one I added for "media_rw"), only the one I added was in the permissions group noted. The one that was there when I edited is now gone. Even root explorer was not able to test create a new folder on the extSD.

Any suggestions?

CORRECTION: I can now navigate to the extSD and create folders via root explorer. But so far, other file managers (beyond the systems default) do not seem able to do so. Strange (to me). This also means I cannot copy and paste files either except through root explorer (which is sort of unfriendly to this newb vs. other file managers).
 
Last edited:
I'm afraid this didn't work for me. I'm a bit new to working with an android device, but I have rooted the unit, and then acquired root explorerer, and then carefully edited the xml file noted. I rebooted and still cannot write to the extSD.

When I went back into the xml file, I noted that in place of two "group" tags (including the one I added for "media_rw"), only the one I added was in the permissions group noted. The one that was there when I edited is now gone. Even root explorer was not able to test create a new folder on the extSD.

Any suggestions?

My solution was to use a different text editor than stock (used "Text Edit," free through market) after using Root Explorer to set the folder to r/w (read/write). I had no luck using the stock editor...
 

KChauJen

Senior Member
Jan 24, 2004
398
9
Following the instruction, I can write to the External-SD card with Root Explorer, but if you reboot your table, whatever in there would be gone...

Does it happens to You?

Thanks
 

StingerDog

Member
Dec 31, 2011
49
12
Following the instruction, I can write to the External-SD card with Root Explorer, but if you reboot your table, whatever in there would be gone...

Does it happens to You?

Thanks

It does not.

I almost forgot this important step when I edited the file:

"The simple solution, if you're rooted, is as follows:
1. Using a root-enabled file manager, navigate to /system/etc/permissions and make sure you have mounted the file system r/w.
2. Edit platform.xml and find the WRITE_EXTERNAL_STORAGE permission.
3. Add an additional group definition for this permission...<group gid="media_rw" />
4. Save the changes to the file.
5. Restart your tablet."

Check to make sure you are saving the edit before you reboot.
 

KChauJen

Senior Member
Jan 24, 2004
398
9
It does not.

I almost forgot this important step when I edited the file:

"The simple solution, if you're rooted, is as follows:
1. Using a root-enabled file manager, navigate to /system/etc/permissions and make sure you have mounted the file system r/w.
2. Edit platform.xml and find the WRITE_EXTERNAL_STORAGE permission.
3. Add an additional group definition for this permission...<group gid="media_rw" />
4. Save the changes to the file.
5. Restart your tablet."

Check to make sure you are saving the edit before you reboot.

Oh yeah!!! of course, if it doesn't, then it can't be created on the new files or folder in external storage.

Double check again, created the new text file on the root of "extStorages", then reboot.... result: File is gone

FYI
 

garyd9

Inactive Recognized Developer
Sep 13, 2006
2,643
2,732
53
Pittsburgh, PA
I'll write a script to make this change to the perms file sometime this weekend (something that can be installed from recovery.) Using sed, I should be able to make the change "in-place" instead of completely overwriting the existing file. That'll ensure no breakage.
 

KChauJen

Senior Member
Jan 24, 2004
398
9
I'll write a script to make this change to the perms file sometime this weekend (something that can be installed from recovery.) Using sed, I should be able to make the change "in-place" instead of completely overwriting the existing file. That'll ensure no breakage.

Thank You very much, garyd9. At that moment, whatever related to development on this tablet would be on your hand, Bro, and we are still waiting for the cooked rom... Hope it should be on your project.

Thanks again.
 

garyd9

Inactive Recognized Developer
Sep 13, 2006
2,643
2,732
53
Pittsburgh, PA
  • Like
Reactions: captcarl

stelarinc

New member
Jan 25, 2012
3
0
I'm also facing the same problem as KChauJen, where I have successfully made the changes to permissions.xml, tested it by creating a folder in the ext sdcard. However upon reboot, the permission is reset back (i.e. <group gid="media_rw" /> is removed).

I've tested it with the fix permission script and the permission is still reverted back
 

garyd9

Inactive Recognized Developer
Sep 13, 2006
2,643
2,732
53
Pittsburgh, PA
However upon reboot, the permission is reset back (i.e. <group gid="media_rw" /> is removed).
Which model 7+ are you using? Is it from a phone carrier? Are you rooted (and if so, does 'root' stay intact after a reboot?)

Are you using any custom kernel's, recoveries, or anything like that?

Thanks and take care
Gary
 

stelarinc

New member
Jan 25, 2012
3
0
I'm using GT-P6200, bought from phone carrier SingTel.

I've performed root following the steps here.

I believe it is still rooted after a reboot, as I'm still able to grant superuser access to FileExpert to perform modification to permissions.xml.

Other than that, I'm not using custom kernels. I do have avast AV installed, however, it does not give any alerts when I make manual modification to the permissions.xml
 

garyd9

Inactive Recognized Developer
Sep 13, 2006
2,643
2,732
53
Pittsburgh, PA
I'm using GT-P6200, bought from phone carrier SingTel.

Other than that, I'm not using custom kernels. I do have avast AV installed, however, it does not give any alerts when I make manual modification to the permissions.xml
Can you please go into settings -> "About Device", and type here the "model number" shown, and the "build number" shown?

My reason for asking is that there are many different versions of the same tablet floating around (GT-P6200, GT-P6200L, GT-P6200N, SGH-T698, etc) all being called a "6200" when they are slightly different. I don't have any of the 6200 tablet's myself (I have a 6210), but someone else (who has the same tablet/build as you) might notice something.

As well, it may be helpful if you could check the time/date of the platform.xml file immediately before AND after you make the change, then reboot the tablet and check the time/date of the file again. Does the time/date revert to what it was before you made the change, or does it change to something else?

Finally, permissions/platform.xml is considered a security file (as changes to it could make your device easier for a virus to infect) so it's possible that your AV is, in fact, reverting it. I don't use avast, so I don't know if it is or isn't...

Take care
Gary
 

stelarinc

New member
Jan 25, 2012
3
0
I've got it working now. I'm not really sure what did happen, as FileExpert cannot overwrite the permissions/platform.xml or ext sdcard any more, even though it has been granted superuser access.

Instead, I did the following:
1) I uninstalled avast
2) installed and used Root Browser Lite to change platform.xml
3) reboot
4) installed avast back
5) reboot

After 1st and 2nd reboot, I checked that I'm able to write to the external sd card.
 

lanwarrior

Senior Member
Mar 5, 2006
2,196
158
I just got a GT 7+ (P6210) - US Version and after I rooted the GT, I can go to /mnt/sdcard/extStorages/SdCard and write to it. I.e. using Root Browser, I can create a file.

I don't have to do the steps mentioned above. Is the steps above make it so that Market application CAN use the SD Card to install their support files? I.e. some games requires large downloads and in my Thunderbolt, that download will automatically go to the SD Card.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 53
    I have owned a number of tablets but this is the first time I'm unable to write files to my ext. SD card. Anyone else have this issue?

    Thanks

    I can't post a link to the original post on another forum that worked for me so I will quote it:

    Simple solution for external sdcard write access on Android 3.2...if you're rooted

    I've found a simple solution for gaining write access to the external sdcard (/mnt/sdcard2) on Android 3.2. The sdcard is mounted r/w, but the owning group is media_rw which is linked to the WRITE_MEDIA_STORAGE permission. Unfortunately, this permission was not required for access to the external sdcard prior to 3.2 so most file management utilities do not request it when they run...meaning they only have read access to the card.

    The simple solution, if you're rooted, is as follows:
    1. Using a root-enabled file manager, navigate to /system/etc/permissions and make sure you have mounted the file system r/w.
    2. Edit platform.xml and find the WRITE_EXTERNAL_STORAGE permission.
    3. Add an additional group definition for this permission...<group gid="media_rw" />
    4. Save the changes to the file.
    5. Restart your tablet.

    After this change, any apps that request the WRITE_EXTERNAL_STORAGE permission (which includes almost anything that access either of the sdcards) will gain group membership in both sdcard_rw AND media_rw, giving them r/w access to both sdcard filesystems.
    6
    Please someone provide me more details or give me the picture of the edited .xml thanks.

    Sent from my GT-P6200L using Tapatalk

    Here is a screenshot of the edited .xml

    Sent from my GT-P6210
    2
    Following the instruction, I can write to the External-SD card with Root Explorer, but if you reboot your table, whatever in there would be gone...

    Does it happens to You?

    Thanks

    It does not.

    I almost forgot this important step when I edited the file:

    "The simple solution, if you're rooted, is as follows:
    1. Using a root-enabled file manager, navigate to /system/etc/permissions and make sure you have mounted the file system r/w.
    2. Edit platform.xml and find the WRITE_EXTERNAL_STORAGE permission.
    3. Add an additional group definition for this permission...<group gid="media_rw" />
    4. Save the changes to the file.
    5. Restart your tablet."

    Check to make sure you are saving the edit before you reboot.
    1
    What are you using to edit the .xml file? It may not have root explorer functions.

    I used the Root Browser from ROM Toolbox to make and save the edit.

    i used the free Astro File Manager to navigate to /system/etc/permissions/platform.xml. When I tapped on the platform.xml file I was given a choice of text editors to open it with. When I finished I was offered the option to save the file.
    1
    It does not.

    I almost forgot this important step when I edited the file:

    "The simple solution, if you're rooted, is as follows:
    1. Using a root-enabled file manager, navigate to /system/etc/permissions and make sure you have mounted the file system r/w.
    2. Edit platform.xml and find the WRITE_EXTERNAL_STORAGE permission.
    3. Add an additional group definition for this permission...<group gid="media_rw" />
    4. Save the changes to the file.
    5. Restart your tablet."

    Check to make sure you are saving the edit before you reboot.

    Oh yeah!!! of course, if it doesn't, then it can't be created on the new files or folder in external storage.

    Double check again, created the new text file on the root of "extStorages", then reboot.... result: File is gone

    FYI