SD Card no writing permission in FP2

If the screenshot above shows the content of the file in /system/etc/permissions then you’ll anyway need to replace the whole file :slightly_smiling:
In that case, just mark all, delete, copy all from my file and paste it. That should be sufficient.

I’d really like to do that. But I got no idea how to get your file into my phone. Tomorrow I’ll try the push for the last time. If that doesn’t work again I’ll try a factory reset. Will that make my phone work again?

If you use the amaze editor you won’t need to copy the file to the phone - that is, if you still can use your web browser. You only would need to be able to open the file and copy it’s content to replace the content of the corrupted file.

I am not sure though if a factory reset would do it, since to my understanding it only clears the /data partition, but the corrupted file sits in the /system partition.

Thanks for the information. Unfortunately the tint browser doesn’t work any more since the google services don’t run any more. So my only chance would be to write the file manually using your file that I downloaded.

Yes, it seems to be a bit tricky, but there are still a couple of possibilities.

Writing the file by hand would be one, but it’s quite some text to copy by hand, with the risk of making mistakes. However, if you’d just write enough by hand to mount one sdcard, you could push the file there and copy it into the right location.

Are any apps still running, or what apps do not run?

I was just thinking that if basically some apps can still run, it might be worth trying to install busy box via adb, which gives you the possibility to use either wget to download files from the internet (right to the location you want them to be), as well as vi to edit files through the terminal.

I would send the text of the originally pulled and “working” platform.xml via sms in small pieces.
Will that work?
What about the greater space between parts of strings. Is it important how much space there is?
I’ll upload the whole file so that you can see it.
Could you tell me, which parts are not necessary? So I don’t need 30 sms…
OK, upload impossible. So here is the content:

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

<!-- 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" />

Everything between the two arrows is <!-- NOT CODE --> so it can be skipped.

Thanks!
OK, so my file would look like this:

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

name=“android.permission.BLUETOOTH_ADMIN” >

<permission name="android.permission.BLUETOOTH_STACK" >
    <group 

gid=“net_bt_stack” />

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


 <group gid="vpn" />
</permission>

<permission name="android.permission.INTERNET" >
<permission name="android.permission.READ_LOGS" >
<permission 

name=“android.permission.READ_EXTERNAL_STORAGE” >

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

gid=“sdcard_r” />

<permission 

name=“android.permission.ACCESS_ALL_EXTERNAL_STORAGE” >

<permission 

name=“android.permission.WRITE_MEDIA_STORAGE” >

<permission name="android.permission.ACCESS_CACHE_FILESYSTEM" >
<permission name="android.permission.DIAGNOSTIC" >


  <group gid="input" />
    <group gid="diag" />
</permission>


<permission 

name=“android.permission.READ_NETWORK_USAGE_HISTORY”>

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

    <permission 

name=“android.permission.MANAGE_VOICE_KEYPHRASES”>

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

<library 

name=“android.test.runner"
file=”/system/framework/android.test.runner.jar" />


<library

name=“javax.btobex"
file=”/system/framework/javax.btobex.jar"/>

<allow-in-

power-save package=“com.android.providers.downloads” />

I only deleted exactly from the first <!- -… to the next - ->
That means that I didn’t delete any space between strings.
Is there a problem if there is to many space?
I never edited a xml-file before…
So next step would be the transfer via sms.

Because of the space between the strings the first 160 characters of a sms would look like this:

Or should I better count the amount o space between strings and insert that into the platform.xml in the permission-folder of my phone?

I don’t think that the spaces between the strings make any difference, so I would leave them out - so you have to send less text messages :smile:

Seems like the sms-edited platform.xml (inserted only parts) doesn’t change a lot. How can i install busybox via adb and where do I get it? On the other hand: no apps are working but amaze. No internet.
Thought to send the phone back to the netherlands and let it repair by technicians of FP because it seems like I couldn’t solve my problem.

With “doesn’t change a lot”, do you mean no change at all? Or can you access now at least some drive (like internal or external storage).
Basically it should work if the corrupted file gets fixed.

Well, if you can’t get apps running, maybe installing busy box won’t work either. At least the busy box app which I am using is rather an installer that - when opening the app - downloads the necessary components (binary).

For an adb install you basically need to download the apk file to your computer, and with the command “adb install FILENAME” you can install it. Though I am not sure if that will work if you cannot get root access for the adb.

I think if everything fails then you still have a chance to get a running system by yourself. You could download the stock ROM and flash it from the recovery, or you could ask someone who compiled the FP-OSOS if he or she could provide you with the images.

Thanks again for your kind help!
No, I can’t mount the storage or the external card and no app is working.
So I would like to flash the stock rom which I downloaded now. Afterwards I could use your platform.xml again that you kindly provided for me
But I couldn’t find a wiki for flashing the rom for beginners in the forum in a quick search. Is there one?

Hey,
I just saw you already opened up a new thread for continuing on your system rescue mission!
Anyhow, I am not so well versed with flashing and stuff, so I hope others can be of more help. Maybe you can ask @Moritz, he managed to get a softbricked FP2 working again with the OTA zip.

Good Luck! :smile:

Hi there,

I’ve installed open camera and configured the storage location to an existing folder on my external sd card. however the app doesn’t seem to have write permissions there. In the file manager I can change permissions but they doesn’t seem to be permanant.

Any clues?

Regards

Android 5 doesn’t grant general write permissions for the SD card.
With a rooted phone this problem can be fixed. See, for example, posts 2, 3, or 27 in this thread for different solutions.

Oh yeah I distinctly remember something now. Seems I’ve enjoyed Cyanogenmod for too long ;). Anyway thx for pointing that out. Lets see if I can root my new FP2 w/o having a brick :wink:

Yeah, there are many great features from CM that I miss on Android.
Anyhow, rooting isn’t too difficult. See https://forum.fairphone.com/t/pencil2-howto-root-with-superuser/12375

Cool as it turns out rooting the FP2 is almost the same thing as rooting a Samsung device. Not I’m the “king” of my phone with write permissions to my sdcard sweet! :smiley: Now let’s see what we can do about the notification LED color thing :smiley:

Again thanks for the swift help!