mirror of
https://github.com/Lambada10/SongSync.git
synced 2026-04-25 22:55:54 +03:00
[GH-ISSUE #53] Question on storage permissions #37
Labels
No labels
bug
duplicate
enhancement
invalid
pull-request
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/SongSync#37
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @IzzySoft on GitHub (Jan 22, 2024).
Original GitHub issue: https://github.com/Lambada10/SongSync/issues/53
My scanner just got "revamped" last week, and immediately found something to say about (not just) your app:
Could you please clarify what those permissions are needed for? Especially the latter, as that's usually reserved for applications like e.g. file managers. Thanks in advance!
@nift4 commented on GitHub (Jan 23, 2024):
On Android 13+, the normal READ_EXTERNAL_STORAGE now is a no-op, and split into "read audio"/"read photos"/" read videos", none of those give access to .lrc files. Google recommends requesting access to folder trees. Because Android does not allow selecting top level storage, if someone has a music track on top level storage (ie directly on internal storage or SD card), the app would have no way to discover assosicated .lrc files (used for filtering by "already has lyrics") without showing an open file dialog for each and every .lrc file. Aditionally, the code would be more complex by a great deal. As this app is not on the Play Store, we chose to use MANAGE_EXTERNAL_STORAGE to avoid running into stupid limitations (like the one mentioned above) and support SD cards conveniently, ie without additional work for the user.
Any further questions? :)
@IzzySoft commented on GitHub (Jan 23, 2024):
Hm, I see. From a security point of view, I'd rather say one shouldn't store music collections directly at top level (from an organizational point of view, I never did that even back when I was a "bloody beginner"). Of course that's a decision on your end, but were such cases really coming up frequently and not just in exceptional cases – and wouldn't it be better addressed at the end of those few having their music collection not inside (a) dedicated folder(s)?
I know it would mean a "break" with the existing setup, but thought to raise the question anyway.
MANAGE_EXTERNAL_STORAGEis quite a heavy thing, even if your app is not in Google's Play Store:So yes, this is
Protection level: signature|appop|preinstalled– and IIRC, "appop" indicates the user has to confirm it. Can it be safely denied if one does not have media files in a "root directory"? And if so, is this mentioned before the permission is requested, so users are aware they can safely deny it?For now I've added the READ permission to your app's allow-list:
@nift4 commented on GitHub (Jan 23, 2024):
It's just as heavy as READ_EXTERNAL_STORAGE in the past. Google decided using storage is evil, and while there were many examples of evil usage in the past for sure, there were far more legitimate uses-
No. The code is not fit for using SAF currently, and even if one does not store their files in one of the aforementioned directories, having to force the user to select EVERY directory on the whole internal storage that contains an audio file (if this isn't done, the aforementioned built-in filter options become basically useless and for every .lrc file downloaded, we need to open one dialog, which makes batch download useless as well) is a tedious task. We, as the app developers, don't understand why we should annoy users like that just because Google decided using the storage is evil.
@Lambada10 commented on GitHub (Jan 28, 2024):
@IzzySoft Can I close this?
@IzzySoft commented on GitHub (Jan 28, 2024):
@Lambada10 it seems I miss some notifications lately, so I didn't see the previous comment, apologies! And thanks for the ping! Let me check that first…
So you should store everything in the cloud probably (according to Google). I agree with you that one should always look at their reasoning with both eyes open, lest one misses some "hidden truth".
So if I get that right,
MANAGE_EXTERNAL_STORAGEcannot be avoided – at least not at this time (or in the near future). And yes, full ack, storage permissions on Android are quite a mess. What would you recommend I should put as reason then when adding this permission to SongSync's allow-list – in a way that it doesn't get much longer than 80 chars?"storage access restrictions especially on Android 9 and below make this needed to use music files in different locations"
OK, that's 120 chars. And wouldn't hold true as… when was
MANAGE_EXTERNAL_STORAGEintroduced? SDK 30 aka Android 11. "Allows an application a broad access to external storage in scoped storage." SoDownloads/is probably outside ofMEDIA_*grounds – and can only be accessed withMANAGE, did I get that right? So"needed on Android 11+ to access your music files in e.g. Downloads"
should fit then? If so I'll set that, and then this issue can be closed indeed.
(how should the average Jane and Joe not get lost in those "storage woods" if even those with some technical insights do? No, not blaming you, but those who created that permission-mess…)
@Lambada10 commented on GitHub (Jan 29, 2024):
@IzzySoft "needed on Android 11+ to access your music files in e.g. Downloads" is good
@IzzySoft commented on GitHub (Jan 29, 2024):
Thanks! Done then:
(still marked "bold" as it's considered a sensitive permission, but no longer using the "warning color" and showing the reason instead).