android icon indicating copy to clipboard operation
android copied to clipboard

No write access to external micro SD card

Open caco3 opened this issue 5 years ago • 39 comments

I have a x86 tablet where I installed Android x86. I know this is a rater unusual setup, but I don't think the issue is related to this since other apps on the same system do not have this issues to write to the external micro SD card.

Issue The Android nextcloud client 3.10.1 has no write access to the external micro SD card. The easiest way to prove this is by trying to upload a file to nextcloud. The app then shows a warning that the file system is read only: resized_DSC_0030

Notes:

  • The app has all permissions!
  • The app never asked me for write permissions on the external micro SD card!

P.S. The bug originally was reported in https://github.com/nextcloud/desktop/issues/1840

caco3 avatar Mar 09 '20 20:03 caco3

* The app never asked me for write permissions on the external micro SD card!

This should be asked…at least something like "wants to access images, etc."?

tobiasKaminsky avatar Mar 21 '20 17:03 tobiasKaminsky

@tobiasKaminsky Please let me know how I can provide more information.

caco3 avatar Mar 22 '20 09:03 caco3

Can you go to app settings (on android side) and check Nextcloud permission if storage is allowed?

tobiasKaminsky avatar Mar 30 '20 13:03 tobiasKaminsky

I have the same issue, storage permission is allowed, but I never had to confirm the access to the SD card. This article might be related.

drdanz avatar Mar 30 '20 21:03 drdanz

Which Android version do you use? And @drdanz which device?

tobiasKaminsky avatar Apr 04 '20 09:04 tobiasKaminsky

Nokia 7.1 Android 10

drdanz avatar Apr 04 '20 20:04 drdanz

I have the same issue, storage permission is allowed, but I never had to confirm the access to the SD card. This article might be related.

I guess that reading external storage is then just granted.

@caco3 without having access to such a device, I fear that I cannot do anything. In your first screenshot "SD Card" should be the extern storage card? It seems that this is a link (on unix fs), which cannot be resolved by Android?

tobiasKaminsky avatar Apr 07 '20 10:04 tobiasKaminsky

@tobiasKaminsky

In your first screenshot "SD Card" should be the extern storage card? It seems that this is a link (on unix fs), which cannot be resolved by Android?

You are mislead :) That is just an empty file indicating that this is my SD Card. I usually have such a file so I easily see from within every file browser where I am :)

caco3 avatar Apr 07 '20 19:04 caco3

Which Android version do you use?

Android 9 (Android x86)

caco3 avatar Apr 07 '20 21:04 caco3

Can you go to app settings (on android side) and check Nextcloud permission if storage is allowed?

All 3 permissions are enabled (checked it already many times)

caco3 avatar Apr 07 '20 21:04 caco3

Do you know if other apps/user have the same problem on x86? Can you ask the maintainer of this?

tobiasKaminsky avatar Apr 08 '20 04:04 tobiasKaminsky

This bug report did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!

stale[bot] avatar May 06 '20 05:05 stale[bot]

No, I am not aware of any other users with this problem. I will try to get more information using the log and the development version of the app.

caco3 avatar May 19 '20 20:05 caco3

This bug report did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!

stale[bot] avatar Jun 17 '20 03:06 stale[bot]

Still not fixed

drdanz avatar Jun 23 '20 12:06 drdanz

Without any test device I fear that I can never fix this. x86 seems to be also a very experimental thing.

tobiasKaminsky avatar Jul 01 '20 11:07 tobiasKaminsky

In my case it is not x86. Also I've seen this issue with at least 3 different phones

To reproduce, just go to settings and change "Storage path" to the SD card, then go to auto upload, and you should probably not be able to configure the "Original file will be..." option

drdanz avatar Jul 02 '20 06:07 drdanz

I think this might be only for folders on the SD card, though. The "Original file will be..." option for a SD folder says "kept in original folder, as it is readonly", but it is possible to configure it for a folder on the main memory

drdanz avatar Jul 02 '20 06:07 drdanz

Yes, as you are allowed to write into those folders that you create (via storage option), but you are not allowed to delete other files (move is technically a copy & then delete).

tobiasKaminsky avatar Jul 03 '20 07:07 tobiasKaminsky

This bug report did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!

stale[bot] avatar Aug 01 '20 10:08 stale[bot]

Still not fixed

drdanz avatar Aug 03 '20 07:08 drdanz

Same problem on Samsung Galaxy A6 with Android 10 Nextcloud Client Version 3.13.0

When I try to upload (or auto upload) a file from my SD-CArd (/storage/0000-0000/DCIM/Camera), I can not choose any action for the source file, because the source directory appears to be read-only (Originaldatei wird ... im Original-Verzeichnis belassen, da nur lesbar)

wis775 avatar Aug 24 '20 18:08 wis775

How is the sdcard mounted? I remember that some Android/Vendor offer to mount sdcards differently, e.g. as external or internal storage.

, I can not choose any action for the source file, because the source directory appears to be read-only

As we have to rely on Android's permission management, I am not sure if we can solve this… (there are file browser that "bypass" this and ask user for temporary permission and then use storage access framework, but this is not a solution we can use, as auto-upload should happen in background without user interaction)

tobiasKaminsky avatar Aug 25 '20 06:08 tobiasKaminsky

How is the sdcard mounted? I remember that some Android/Vendor offer to mount sdcards differently, e.g. as external or internal storage.

In my case it says "portable storage", and I can actually unmount it and insert it in a different device, therefore I assume it is external.

(there are file browser that "bypass" this and ask user for temporary permission and then use storage access framework, but this is not a solution we can use, as auto-upload should happen in background without user interaction)

I don't know how this works, but a few apps asked me to "select" the folder once, to gain access, but after the first time, the permission seems to be granted, and never asked again... I think that granting access once (either when you start the app the first time, or when you setup the auto-upload) is an acceptable solution...

drdanz avatar Aug 25 '20 10:08 drdanz

My phone reports the SD-Card under "Portable Storage" (Mobiler Speicher). The SD-Card is writable by the app, because I can use the SD-Card for App-Data.

When I try to upload any file from the SD-Card, then I can't change the Upload Option, because it appears to be read only. But when I try to upload a file from the Nextcloud App directory on my SD-Card (/storage/0000-0000/Android/media/com.nextcloud.client/....), then I can change the upload options.

wis775 avatar Aug 25 '20 20:08 wis775

I don't know how this works, but a few apps asked me to "select" the folder once, to gain access, but after the first time, the permission seems to be granted, and never asked again...

Do you know an open source app that uses this behaviour? Then we can might adopt this?

tobiasKaminsky avatar Aug 26 '20 08:08 tobiasKaminsky

One app that does that for sure is SD Maid. Unfortunately it is not open source, but you might want to have a look at the Setup page in their wiki, perhaps you might find something useful there. I'm quite sure I had at least another app that was doing the same thing, but unfortunately I cannot recall which one. I'll let you know if it comes to my mind...

drdanz avatar Aug 27 '20 14:08 drdanz

Setup page does not help code wise. Would be great to know the other app. 🤞 that you remember it :-)

tobiasKaminsky avatar Aug 28 '20 05:08 tobiasKaminsky

c:geo does it AFAIK as well and is opensource. I cant test if I am right and when the dialog comes, but in its settings one can select folders to store the data.

caco3 avatar Aug 28 '20 06:08 caco3

Would be great to know the other app. crossed_fingers that you remember it :-)

Found it! The app is "Simple Gallery". I just got the permission request while trying to move a file from the internal storage to the SD card.

I hope this helps...

drdanz avatar Sep 16 '20 22:09 drdanz