SD Card no writing permission in FP2

After 1.2.8 upgrade, and re-root, I did modify permissions.xml and had to reboot for this modification to apply.

Regarding Ghost-Commander, if your path want closer to the ‘/’ than ‘/data’, it will continuously prompt you for root access (and I wont report the problem through their sourceforge). But if you use the menu to get back to the home-page and then directly go to “external storage”, you won’t be prompted for root access anymore (providing you modified your permissions.xml and rebooted).

I knew that I could avoid beeing asked. However I already stated that I now rather like to be asked :slight_smile:

I have same problem, both for saving apps and even having the option to store photos on the SD card (is it because it’s a 64gb micro SD?).
I downloaded the suggested app but it reached the red warning screen saying it needed root access and I dont begin to understand how to figure out how to deal with the root…

Please, how does one get this this root thing you speak of?

Have a look at this:

https://forum.fairphone.com/t/pencil2-howto-root-with-superuser/12375?source_topic_id=11841

An easier way to get root is to install FP OSOS which is currently being tested:

Well, it is easier to activate root and of course the OSOS - with a more open source approach and no google apps installed - is a great OS, and I really can recommend it!

But only for getting root its a bit far fetched, as it includes to also flash the user partition, so you’ll have to set up the phone again.

1 Like

Thanks for that link. I followed and downloaded the boot.Fairphone-fp2-su-eng-r203.img file, but when I clicked it nothing happens.
Then I checked the wiki post again and I think in section 2b it explained you need to connect to a computer and download more stuff and flash the image and so on.
At this point I am lost. First off my computer can’t even see my fp2 - only have one basic cable but it worked OK for other androids. And second, I have zero programing experience, am a basic computer user, so is there a simpler way to upload this file?
Chrs. Magnus

Well, if you take some minutes, some people wrote a step by step tutorial there (in the wiki). From the discussions I know that also others managed who had no experience, so it’s not too hard, just requires some patience.

That said, there is also an alternative (https://forum.fairphone.com/t/kingroot-and-fairphone2-share-your-experience-please/11925) to use an app, but it is not recommended as some claim it may drain battery and it’s less secure.

If you are not familiar with computer stuff you should also be aware that rooting the phone has severe security implications and with root rights you can easily screw up the software of your phone.

you can do that without going through the root thing – it worked for me, at least. i found a short clip on youtube (there are more, but this one was easy enough to follow), in which a step-by-step explainer guides you through the setup of acces your sd card with ‘ES File Explorer’ . once you managed to go through the steps, moving files between internal storage and sd card is as easy as it was with FP1 and the older android (where we had root access).
hope that helps : )

Hello
I bought a SD card yesterday and my Fairphone 2 (I love it!) accepted and found it without
any problems. I want to store all of my picutes and Videos on this card. Does
anybody know how I can change the storage location from internal to the SD
card? I can not find the button.
Thank you and have a nice and sunny weekend, Lea

1 Like

How do you want to store the pictures and videos on the SD card? With an USB connection to the computer? With an app (which app)?

Hello,
I also have the same problem. To save space on the internal drive, I would like photos and videos I take with the FP2 to automatically be stored on the sd card. I have been able to do this with all the other androïd phones I had.

1 Like

I moved your topic to this one, as you will find all explainations and anwers here…

Regarding the file show in this post : SD Card no writing permission in FP2 - #40 by barney

One should not forget to include the :

<?xml version="1.0" encoding="utf-8"?>

At the begining, followed by a :

<permissions>

Opening tag, closed at the file ending by a :

</permissions>

(don’t miss the plural form).

<?xml version="1.0" encoding="utf-8"?>

<permissions>
<!-- ================================================================== -->
<!-- ================================================================== -->
<!-- ================================================================== -->

<!-- The following tags are associating low-level group IDs with
     permission names.  By specifying such a mapping, you are saying
     that any application process granted the given permission will
     also be running with the given group ID attached to its process,
     so it can perform any filesystem (read, write, execute) operations
     allowed for that group. -->

<permission name="android.permission.BLUETOOTH_ADMIN" >
    <group gid="net_bt_admin" />
</permission>

<permission name="android.permission.BLUETOOTH" >
    <group gid="net_bt" />
</permission>

<permission name="android.permission.BLUETOOTH_STACK" >
    <group gid="net_bt_stack" />
</permission>

<permission name="android.permission.NET_TUNNELING" >
    <group gid="vpn" />
</permission>

<permission name="android.permission.INTERNET" >
    <group gid="inet" />
</permission>

<permission name="android.permission.READ_LOGS" >
    <group gid="log" />
</permission>

<permission name="android.permission.READ_EXTERNAL_STORAGE" >
    <group gid="sdcard_r" />
</permission>

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

<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>

<permission name="android.permission.ACCESS_MTP" >
    <group gid="mtp" />
</permission>

<permission name="android.permission.NET_ADMIN" >
    <group gid="net_admin" />
</permission>

<!-- The group that /cache belongs to, linked to the permission
     set on the applications that can access /cache -->
<permission name="android.permission.ACCESS_CACHE_FILESYSTEM" >
    <group gid="cache" />
</permission>

<!-- RW permissions to any system resources owned by group 'diag'.
     This is for carrier and manufacture diagnostics tools that must be
     installable from the framework. Be careful. -->
<permission name="android.permission.DIAGNOSTIC" >
    <group gid="input" />
    <group gid="diag" />
</permission>

<!-- Group that can read detailed network usage statistics -->
<permission name="android.permission.READ_NETWORK_USAGE_HISTORY">
    <group gid="net_bw_stats" />
</permission>

<!-- Group that can modify how network statistics are accounted -->
<permission name="android.permission.MODIFY_NETWORK_ACCOUNTING">
    <group gid="net_bw_acct" />
</permission>

<permission name="android.permission.LOOP_RADIO" >
    <group gid="loop_radio" />
</permission>

<!-- Hotword training apps sometimes need a GID to talk with low-level
     hardware; give them audio for now until full HAL support is added. -->
<permission name="android.permission.MANAGE_VOICE_KEYPHRASES">
    <group gid="audio" />
</permission>

<permission name="android.permission.ACCESS_FM_RADIO" >
    <group gid="media" />
</permission>

<!-- ================================================================== -->
<!-- ================================================================== -->
<!-- ================================================================== -->

<!-- The following tags are assigning high-level permissions to specific
     user IDs.  These are used to allow specific core system users to
     perform the given operations with the higher-level framework.  For
     example, we give a wide variety of permissions to the shell user
     since that is the user the adb shell runs under and developers and
     others should have a fairly open environment in which to
     interact with the system. -->

<assign-permission name="android.permission.MODIFY_AUDIO_SETTINGS" uid="media" />
<assign-permission name="android.permission.ACCESS_SURFACE_FLINGER" uid="media" />
<assign-permission name="android.permission.WAKE_LOCK" uid="media" />
<assign-permission name="android.permission.UPDATE_DEVICE_STATS" uid="media" />
<assign-permission name="android.permission.UPDATE_APP_OPS_STATS" uid="media" />

<assign-permission name="android.permission.ACCESS_SURFACE_FLINGER" uid="graphics" />

<!-- This is a list of all the libraries available for application
     code to link against. -->

<library name="android.test.runner"
        file="/system/framework/android.test.runner.jar" />
<library name="javax.obex"
        file="/system/framework/javax.obex.jar"/>
<library name="javax.btobex"
        file="/system/framework/javax.btobex.jar"/>

<!-- These are the standard packages that are white-listed to always have internet
     access while in power save mode, even if they aren't in the foreground. -->
<allow-in-power-save package="com.android.providers.downloads" />
</permissions>

(I’ll keep editing this post to present a correct ‘stock’ platform.xml file)

Files seem equivalent but the good way of doing it is to get a fresh one this way :

If you need the file “fresh” again (but what you show looks okay, it’s just the file without changes), you can just download the bin blob and unpack it. You will find the “fresh” file under: ./vendor/qcom/proprietary/target/product/FP2/system/etc/permissions/platform.xml

FYI: Probably the two threads No internet at all and No data connection after update to 1.4,2 and rooting were related to this thread.
I think that my unsolvable problems with internet connection were triggered by changing platform.xml in a wrong way. After I couldn’t find a solution to bring back the internet connection I sadly reflashed my phone with Open OS 16.06.

Today I have changed again platform.xml in regard to SD Card no writing permission in FP2 (but I used Ghost Explorer instead of Amaze) and I mentioned that after saving platform.xml the read permissions for group and others were missing.
So I gave back read permissions to all on platform.xml before remounting /system with RO option and rebooting and the phone is still running :slight_smile:

But I don’t know for sure if this approach is saving the phone from bricking.
Update: No, it doesn’t. Saver approach see here: SD Card no writing permission in FP2

I don’t know why @barney 's version of platform.xml got here. but I know for sure, that it is confusing everything. And @siltaar made it not better.

For all, who want write-rights to their sdcard: do only a small change in your platform.xml as shown in post 2 by @Arvil. Navigate to that file with Amaze and edit it via “open as” “Text” with “Amaze Editor”.

1 Like

:thumbsup: Thanks for pointing out the right solution.
Still I marked post #3 as the solution just now, as it’s the one most FP users can do themselves.

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