Android 5.1.1: permission to write to the SD Card?

Support for Android version of Total Commander

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Hawaiianlungs
Junior Member
Junior Member
Posts: 4
Joined: 2015-11-06, 23:50 UTC

Android 5.1.1: permission to write to the SD Card?

Post by *Hawaiianlungs »

My phone tablet automatically updates.

How do I get permission to write to the SD Card with TC?

I am sure this has been discussed but I gave searched and cannot get the answer.
User avatar
Hacker
Moderator
Moderator
Posts: 13067
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

[mod]Moved to the Android forum.

Hacker (Moderator)[/mod]
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

If you don't get the correct Android dialog to grant write rights, you need to install this beta version:
http://ghisler.ch/board/viewtopic.php?t=43021
Author of Total Commander
https://www.ghisler.com
Leinad
Junior Member
Junior Member
Posts: 20
Joined: 2015-01-25, 13:18 UTC

Post by *Leinad »

Hi guys,

I'm using A 5.1.1, TC 2.72 and an external sdcard which has two partitions (both FAT32). The first partition can be fully used by TC (read, write, access) but the second one has an issue: I cannot create or modify files, although I can create folders (and subfolders) or copy data from PC, from the internal card or from the 1st partition.

When I try to create or modify a file, I get that "write protected!" message and no matter what I select ("yes" or "no") there will be no next dialog. I've attached a screenshot of the "write protected!" message, maybe some of you could guide me what to do to solve this issue.

Image: http://i284.photobucket.com/albums/ll35/Alexino7/Screenshot_zpsim1fxvsr.png

LE: phone is rooted
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Is that a Huawei phone? The write method TC tries to use is broken in MIUI on Huawei phones and will not work.

But since you are rooted, you can use an SDFix tool to fix the sdcard permissions for all applications.
Author of Total Commander
https://www.ghisler.com
Leinad
Junior Member
Junior Member
Posts: 20
Joined: 2015-01-25, 13:18 UTC

Post by *Leinad »

No, it's a Samsung S3 Mini. I've looked for an appropriate SD Fix tool but no one seems to deal with the 2nd partition issues. The 1st partition has all the necessary permissions but the 2nd one doesn't. I don't know either what permission file to modify or what info to add to platform.xml. Do you have a specific recommendation of a SD Fix tool for me to try to fix the 2nd partition permissions?

Below is what my platform.xml looks like in regard to the external storage:

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

LE: the phone has OmniROM 5.1.1
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I think this is for the internal storage under /user/emulated/0

I have an S4 mini with sdfix applied, and it has these additional sections:

Code: Select all

    <permission name="android.permission.ACCESS_ALL_EXTERNAL_STORAGE">
        <group gid="sdcard_r"/>
        <group gid="sdcard_rw"/>
        <group gid="sdcard_all"/>
    </permission>

    <permission name="android.permission.WRITE_MEDIA_STORAGE">
        <group gid="media_rw"/>
    </permission>
To my knowledge, the second one is for the secondary storage.
Author of Total Commander
https://www.ghisler.com
Leinad
Junior Member
Junior Member
Posts: 20
Joined: 2015-01-25, 13:18 UTC

Post by *Leinad »

My platform.xml file also has those pieces of code but I didn't quote them in my previous post.

Code: Select all

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

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

    <permission name="android.permission.WRITE_MEDIA_STORAGE" >
        <group gid="media_rw" />
    </permission>
So, the issue of not being able to create or modify a file on the 2nd partition of the external sdcard is due to something else, maybe another permission is missing. Does your S4 mini runs on 5.1.1 also? What sdfix did you apply?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

No, my S4 mini runs on 4.4.4. Normally "media_rw" is restricted to the system. "sdcard_rw" and "sdcard_r" are the ones given to the user.

Try putting
<group gid="sdcard_r" />
<group gid="sdcard_rw" />
<group gid="sdcard_all" />
in the last section too, then restart.
Author of Total Commander
https://www.ghisler.com
Leinad
Junior Member
Junior Member
Posts: 20
Joined: 2015-01-25, 13:18 UTC

Post by *Leinad »

I've added those code lines you've mentioned, restarted the phone but still can't create or modify a file on the 2nd partition.

Code: Select all

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

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

    <permission name="android.permission.WRITE_MEDIA_STORAGE" >
        <group gid="sdcard_r" />
        <group gid="sdcard_rw" />
        <group gid="sdcard_all" />
        <group gid="media_rw" />
    </permission>
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Unfortunately I don't know what else could be done. Maybe someone on http://forum.xda-developers.com could help you.
Author of Total Commander
https://www.ghisler.com
Leinad
Junior Member
Junior Member
Posts: 20
Joined: 2015-01-25, 13:18 UTC

Post by *Leinad »

Thanks for your reply. I believe it's a lollipop issue but I asked here thinking maybe someone bumped it before me and got an answer.

Off-topic: I wanted to give you a reply two days ago but i couldn't log in to the forum, neither with my home PC nor my android phone. Today I've deleted ghishler.ch cookies on my home PC and was able to log in. Afterwards, I've deleted those cookies on my phone and was able to log in using my phone, also. So, it might be a possibility that there is an issue with ghishler.ch cookies. :D
Post Reply