SD Card no writing permission in FP2

Sorry I think I’m annoying, but yesterday my phone was again unusable (i.e. no network at all) from changing platform.xml on running system with Amaze editor although correcting read permissions afterwards. Fortunately this time I have a two days old backup on 16.06 version.

I don’t know for what reason this happens but I have to warn about changing platform.xml on running system. There could be a remaining risk to make your phone unusable (maybe other running apps writing to remounted /system).
I recommend to start in TWRP recovery mode and copy a changed version of platform.xml
(for example prepared on ExtSDCard using Amaze editor) into /system/etc/permissions.
I had done this immediately after installing the update zip file for 16.07 and all is ok so far.

I will add my recommendation to ✏ Update Guide for a modified FP Open OS (with Gapps, Xposed and more)

Is this app trustworthy? I mean no ads and no “phoning home” ?

1 Like

If you edit your platform.xml and only insert this line:

at the right place:[quote=“Arvil, post:2, topic:11841”]
<permission name=“android.permission.WRITE_EXTERNAL_STORAGE” >
[/quote]
then you can do no harm to your operating system.

I think, rw permission should be default. It does not make sense to forbid the sdcard access.
This is an unwanted restriction for almost every user.
When editing platform.xml by hand, it does not survive OS updates. As I store my music
on the sdcard, it has the ugly effect, that all my playlists are emptied, because the music files
are not readable.

1 Like

The pop up screen is so small I need a magnifier trying to read it.
And then I don’t understand what it says.

To get my pictures out of my phone I copied them to a samba server.

Every time an update for FP Open rolls up, it overrides the write permissions on my sdcard1, making it read only. I can’t be bothered to go bit-shifting on my phone, editing configuration files by hand, so I do what every standard user does - I use an app for that.

I fix this problem every time with an SD Card Permission Fixer. I guess it shifts whatever bits it needs to make the SD card useable as intended for you.

This is what I use. It works with FP Open Marshmallow. Choose whatever floats your boat. Play Store is chock full of them apps, found nothing in F-Droid.

At least I don’t have to do this a lot, since updates don’t happen very often. The last FP Open security update was two and a half months ago (05.12.2016), so that’s not too much of a hassle.

EDIT 20170313 - Works on FP open 17.02.0

1 Like

Hello Avril. Could you please correct the last line of your guideline from “adb push permissions.xml …” to “adb push platform.xml …” because I have linked to your guideline from ✏ Update Guide for a modified FP Open OS (with Gapps, Xposed and more) and therfore its better that there is no mistake in the guideline. Thanks.

1 Like

Hi I am on my phone and don’t see the edit button maybe a moderator could do it for me please?

Cheers

1 Like

Done. :slight_smile:

I admit, this thread is beyond me. Could someone, in simple words, explain how to solve this on a non-rooted phone without Google Play Store installed?

-) Amaze has the app permission “modify or delete the contents of your SD card”
-) I can create folders via “mount SD card” from the PC, so physically, writing is possible
-) The new folder has permissions “rwx”, yet Amaze cannot write inside it

It’s not possible without root.

2 Likes

That is bitter. Is this nowadays the norm for Android phones? But thanks for an answer that probably saved me another hour of online research.

I recently installed FP OOS (thanks again to those who helped me getting it to run) and now want to install my first update. As suggested here, I want to do a Titanium Backup first. This, in turn, I want to save onto my external SD card, but in the relevant setting inside Titanium Backup (correct me if I’m wrong: Preferences - Backup folder location - Storage provider: Filesystem (click to change) - Filesystem storage) it says “This folder is not writable” when I choose a folder on the external SD card. It does say it’s writable when I’m in a folder on the device itself.

I thought the reason might be the external SD card writing permissions, even though I’m on Android 6 (shouldn’t this be fixed in Android 6?). So I pulled platform.xml with adb, but it doesn’t have the same code as in the 2nd post in this thread (the permission WRITE_EXTERNAL_STORAGE). I assume this is due to Android 6 not being 5. In the only relevant part it says:

(permission name=“android.permission.WRITE_MEDIA_STORAGE” )
(group gid=“media_rw” /)
(group gid=“sdcard_rw” /)
(/permission)

(had to change the triangular brackets to round ones because otherwise you have to use some formatting voodoo for them to show up on this forum)

So it does have the media_rw permission. Does anyone know where the problem lies?

I have found a bit of a makeshift solution here:

“There is an elegant way of giving TitaniumBackup write access to the external sdcard, without having to forfeit security (as in method 3 below). Since the time of Android 4.3, Google uses a very clean security-solution by giving apps that request write access to external SD, permission only to their own folder – not to the entire card! In order to get TitaniumBackup to work without compromising security, you can simply create a folder on the external sdcard,using the following folder-structure: /storage/extSdCard/Android/data/com.keramidas.TitaniumBackup/
If you already have existing backups, move them with a file-explorer from their current place to: /storage/extSdCard/Android/data/com.keramidas.TitaniumBackup/ Lastly, go to the preferences of TitaniumBackup, choose “Backup folder location” and choose the above specified folder.”

So it seems like in Android 6 Google has continued the idiocy of not making the external SD card fully writable. With this solution one can at least make TB backups directly to the external SD card.

Any help on what exactly to write into which file (permissions.xml? platform.xml?) to make the card fully writable would be appreciated.

2 Likes

(Sorry for the 3rd reply in a row, but it seems some users are actually interested in my progress in trying to solve this issue under Android 6)

It seems like the above method hasn’t exactly done the trick. I want OpenCamera to save photos it takes on the external SD card, so I have used the above method, that is, created a folder named “net.sourceforge.opencamera” in external_sd_card\Android\data\ and directed OpenCamera to this folder in its settings. “net.sourceforge.opencamera” is the “Google Play Store codename” for the app (I don’t know the proper term for this, but it shows up in the URL when you access it in the Play Store and should be the right name for the folder). However, OpenCamera instantly tells me it can’t write to this location and no “select external SD card” dialog pops up. So I’m back to square one for now.

@paulakreuzer I would like to suggest to remove the “solved” mark of post #3. It seems like this solution worked on Android 5, but not on 6 anymore, and 6 is where both FP OSes are currently.

2 Likes

In order to get Open Camera to save pictures on the external SD, you have to enable “Use Storage Access Framework” in the app’s settings --> more camera controls. Afterwards you can choose a folder on the SD card and the app will ask for its permisson to write on it.

8 Likes

Thank You! It’s working!:grinning:

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.

Hello *,

Sorry in advance for this long post, but I try to wrap up the whole troubleshooting I did after following the “fix”.
I had the problem, that on my FP with Open OS 6 I could not get some apps to write to the SD-Card (syncthing, nextcloud,…). So I followed the instructions of the thread

which are marked as resolution, i.e. to edit platform.xml manually while FP is booted and running.
I used the built-in text editor of Ghost commander, to remount / as rw and edit platform.xml.
In platform.xml, however, there was no tag

<permission name="android.permission.WRITE_EXTERNAL_STORAGE" >

at all !, so I added the complete section as provided by user @Arvil:

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

Save + remount ro + reboot led to the much worse situation described approximately in thread “No internet at all” (I think):

In my case: almost all apps crashed or at least stated, they had no Internet permissions. Furthermore I could not even install any apk from file. (I wanted to do that to reinstall Fdroid, and then reinstall all apps, because I found some half-knowlede that permissions like internet access, seem to be set at install time in android 6 if I’m not mistaken). However couldn’t even try that, because all apk stated to be corrupt when I tried to install them (including some old fdroid and the newest version from fdroid.org and threema.apk)
So now the only way for me is to save all data using android studio “Device File explorer” and to try and install a new OS.
I think that’s a terribly misleading recipy when applied to FP Open OS 6, but the thread is closed, so no warning can be posted. I had not altered the system files manually at all before.

Note (1) that already some user reported to run into the “no internet” issue after editing platform.xml.

Note (2): the file looks perfectly OK to me, when I open it from Device File Explorer. When I save it locally (macos) and run ‘file platform.xml’ it is shown to be ASCII text, so no weird charcter/encoding problems etc after editing.

Some details: FP Open OS Android 6.0.1 Baseband version 4437.1-FP2-0-08. (MicroG, no google)
FP2-userdebug 6.0.1 FP2 fp2-sibon-18.04.1 release-keys

So please, @moderators , reopen that thread, or at least mark the resolution there with a warning leading to a follow-up thread.

Any help on how to fix my phone without reinstalling would be nice, but I think I’ll try to install a new OS in a few days.