Bug 447774 - File system expose cannot expose certain folders on Android 11
Summary: File system expose cannot expose certain folders on Android 11
Status: RESOLVED DUPLICATE of bug 447636
Alias: None
Product: kdeconnect
Classification: Applications
Component: android-application (show other bugs)
Version: unspecified
Platform: Android Android 11.x
: NOR normal
Target Milestone: ---
Assignee: Albert Vaca Cintora
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-01 13:20 UTC by l12c-account_for_kde
Modified: 2023-02-27 13:33 UTC (History)
11 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description l12c-account_for_kde 2022-01-01 13:20:34 UTC
SUMMARY
Under Android 11, the Storage Access Framework no longer allows exposing certain folders, for example primary: and the default downloads folder. 

STEPS TO REPRODUCE
1. Go to Plugin Settings > File System Expose
2. Attempt to add primary: as a storage location

OBSERVED RESULT
The SAF file picker says "Can't use this folder. To protect your privacy, choose another folder"

EXPECTED RESULT
I should be able to access this folder remotely from my PC

SOFTWARE/OS VERSIONS
Android 11 (Security patches 2021-11-05)
Kernel 4.14.186+
KDE Connect 1.18.1 (from F-Droid)

ADDITIONAL INFORMATION
Possible workaround is requesting the MANAGE_EXTERNAL_STORAGE (see https://developer.android.com/training/data-storage/manage-all-files) permission, resulting in the user getting a one time popup to allow the app access to all files, possibly in the syle of "The directory you want to select is not available? Click here to allow access to all directories"
Comment 1 Clay Weber 2022-01-07 22:34:04 UTC
I am seeing the same warning message  here.
My phone is in the December 1 security patch level.

I still have access to the storage devices it seems, as I had set up KDE Connect on my phone just after it received A11, and had zero issues setting up KDE Connect when I wiped and refreshed after the  OS upgrade some months back. I assume this is from a more recent Android security update?
Comment 2 Tomáš Reichl 2022-01-18 12:34:00 UTC
I also have this problem.

In permission settings, I found that I can only grant the limited storage permission "Allow access to media only" instead of "Allow management of all files".

KDE Connect 1.18.1 installed from F-Droid
Samsung One UI 3.1, Android 11, security patch level December 1, 2021
Comment 3 Henrique Soares 2022-05-30 14:19:33 UTC
Also having this problem. Not my field of expertise, but it seems to be a permission problem. I've seen some of my mobile games with the option available to select "Allow Management of All Files", on KDE Connect there is only "Allow Access to Media Only".
Comment 4 Lewis L. Foster 2022-07-10 16:06:52 UTC
Im having this on android 12 with my Galaxy S20 FE 5G running security patch 1 June 2022 and one UI 4.1
Comment 5 Sayan Chakroborty 2022-09-01 19:12:25 UTC
(In reply to Henrique Soares from comment #3)
> Also having this problem. Not my field of expertise, but it seems to be a
> permission problem. I've seen some of my mobile games with the option
> available to select "Allow Management of All Files", on KDE Connect there is
> only "Allow Access to Media Only".
Comment 6 Sayan Chakroborty 2022-09-01 19:26:36 UTC
Some other FOSS apps on F-Droid have the permission MANAGE_EXTERNAL_STORAGE (see https://developer.android.com/training/data-storage/manage-all-files). For example, Nextcloud [https://f-droid.org/en/packages/com.nextcloud.client/] and VLC [https://f-droid.org/en/packages/org.videolan.vlc/] ask for the permission "Allow management of all files" as it should be the case for KDE Connect as well. A major feature is broken just for one limited permission, this should be easy to fix.
Comment 7 Gauthier 2022-11-23 18:30:50 UTC
Any idea how to resolve this?
Comment 8 Jan Rathmann 2023-02-27 13:33:34 UTC
*** This bug has been marked as a duplicate of bug 447636 ***