I’m sorry that I open yet another SD card thread but I haven’t found anything on this topic in the forum. I have a Fairphone 2 with Fairphone OS 1.2.8 that is not rooted. Rooting is not really an option for me. I use a 64 GB micro SanDisk Ultra that was formatted in my old FP1 and worked there without any problems.
I use Solid Explorer and Amaze to manage my SD card. With both apps I have gone through the steps to grant SD card access. Now I can delete files on my SD card as well as copy and move files from the phone to the SD or create new folders on the SD. Everything seems to work fine. I can even open the files that I copied or moved to the SD from the SD card.
But after a reboot of the phone all the changes on the SD are undone. Files and folders just disappear as if I would have done nothing before the reboot. If I have moved a file from the phone to the SD the file will stay deleted on the phone and disappear on the card, which means it is gone after a reboot.
Does anyone have any idea about a reason of this behavior of the SD card and even better a solution?
I’m am more curious if the files really got written to the sd card. I thought, or understood, that you cannot write to the card by default.
Is it possible that the file browser plays tricks and shows data has been copied but this was only in RAM?
I have seen some behavior like this with amaze, that is, after changing files on the /system partition without remounting it first to rw, it shows changes were made, but they are gone after reboot (since of course I did not have write permissions at the time of change). To me the described problem sounds quite similar to that.
I haven’t taken the card to my Mac but I have connected my phone to it and had a look with Android File Transfer. There the status of the files was as if I had changed nothing (no new folders, deleted files still exist and new files are not available).
Yes, it looks like the file systems only shows the changes and in reality doesn’t change anything.
As I haven’t rooted my phone I had no write access to the SD card from the beginning. I just went through the steps of granting the rights after trying to delete or copy a file for the first time (as also mentioned in the “SD Card no writing permission in FP2” thread in the forum). Now there is no error message after deleting, copying or creating files or folders. It just looks as if everything works fine – until the next reboot.
I’m not sure if I understand what you have been doing. Usually on a unix based system only the owner and superuser (i.e. root) can change file and directory permissions. What I can see on my phone is that the sd card is owned by root and sdcard_r group. So unless you have an app that changes permissions or ownership, I wouldn’t know how to get rw permissions for the sd card without root rights.
In other words, I think you need root rights if you want to change the permissions for the sd card.
I understood that by default changes of the sd card from an app are denied by the phone. But some apps (like file manager) can apply for write access and then you can grant it (like described in the link posted by Irina). And so I did. The screenshot below is taken from the post that was linked in Irnias contribution.
Yes, I tried it several times. The last time shortly after your last post. Folder “test” created with solid explorer and file moved from phone to SD with solid explorer. Both - folder and file - were visible in amaze (see first screenshot).
I also tried this method now, and it doesn’t work for me either.
Though I can create folders and even files (I tried to create txt files), but when I attempted to write something into the files and save it, I got an error message.
After reboot the folders and files where still there, though empty.
In adb logcat I got an error message during that operation, saying that the file /storage/sdcard1/.android_secure is missing.
E/DatabaseUtils( 8996): Writing exception to parcel
E/DatabaseUtils( 8996): java.lang.IllegalArgumentException: Failed to determine if 2065-0A0F:.android_secure is child of 2065-0A0F::
java.io.FileNotFoundException: Missing file for 2065-0A0F:.android_secure at /storage/sdcard1/.android_secure
Maybe someone knows what that means, or if this can lead to an explanation on the problem.
All I found through online search is that this hidden directory is supposed to store information on apps that have been moved to the SD card, maybe it also lists some hidden files that point apps to directories you want to grant them access to.
But I don’t know that.
Anyhow, point is, this method didn’t work for me either.
One thing I could think of, is that the 1.2.8 update messed up something. Other people reported problems with mounting USB drives via USB OTG so this might be related…
My FP2 is rooted and I haven’t done the update yet, so I can’t reproduce these problems. But I know that before rooting I had no problems to use my SD card. So theoretically, the above described method should (and did) work.
I believe neither this .android_secure file nor an equal named folder is the cause of missing sd card write permissions. As @freibadschwimmer wrote, it seems to supports the system moving apps to the external card.
I run FPOSOS on my rooted FP2, my amaze file manager shows the same behavior as already described. I can create folders and files, can rename or move them, but am not allowed to save edited files with one exception - within the folder sdcard:/Android/data/com.amaze.filemanager
So in my case
amaze doesn’t ask for permission to write on sd
hence it is only allowed to write changed files in its own application folder
Since I have root, I edited /system/etc/permissions/platform.xml and added <group gid="media_rw" />
to the section <permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
so that it looks like <permission name="android.permission.WRITE_EXTERNAL_STORAGE" > <group gid="sdcard_r" /> <group gid="sdcard_rw" /> <group gid="media_rw" /> </permission>
After a restart amaze has no problems modifying text files on sd.
Thanks for your comments and your support. I’m really sorry that in the end I kind of wasted your time. No finding a solution within the phone I tried to modify the SD card (add files, delete files, format the card) with different computers and adapters and failed. Therefore I would proceed on the assumption that the card is damaged. With another SD in my FP2 everything works fine (at least at the moment). Sorry again. I could have tested this option in advance. But I had no reason to doubt that the card would work after it has done so for two years in my FP1.
Thanks for caring. It was a SanDisk that died. Fortunately it is still readable - read only - and I could save all my files. I’ve already contacted SanDisk and asked for an exchange because the card is less than two years old.