Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply for "All files access" #16059

Open
sonora opened this issue Dec 25, 2022 · 8 comments
Open

Apply for "All files access" #16059

sonora opened this issue Dec 25, 2022 · 8 comments
Labels
Nice to Have Should be fixed but there is no priority or no possibility to fix it within current horizon planning

Comments

@sonora
Copy link
Member

sonora commented Dec 25, 2022

The Android permission "All files access" (MANAGE_EXTERNAL_STORAGE) is currently the only Google Play Store tolerated way for apps to access arbitrary files from different device storage locations.

Use of the permission is heavily restricted by Play Store regulations, to e.g. apps like file managers. I have, however, recently noticed that also more topic-specific apps like e.g. the sheet music viewer "Mobile Sheets" (https://play.google.com/store/apps/details?id=com.zubersoft.mobilesheetsfree) contains the "All files access" permission. Their store description says:

MobileSheets acts as a file manager for your sheet music files (PDFs, images or text/chord pro files) and links directly to them on the device. It provides a way to organize and quickly access any of those files. Mobile Sheets can be configured to use existing files and folders on the device storage, allowing those files to be organized as desired by the user without them having to be copied or moved.

I think this is rather similar to how OsmAnd acts as an integration software to users' both personal location data (like location favorites, trip recordings, fitness/training records, etc.) and 3rd party procured location data (like from travel guides or hiking guide apps). In both cases the data is often created by 3rd party apps and accordingly scattered across different device storage locations and folders. One of our major features is to manage such (e.g. gpx) data, however recently with the drawback of having to store a duplicate copy of all outside files in ´OsmAnd's own folder tree, certainly a crippling mechanism.

It looks to me that of Google's "Permitted uses of 'All files access'" use cases at https://support.google.com/googleplay/android-developer/answer/10467955?hl=en#zippy=%2Cpermitted-uses-of-the-all-files-access-permission OsmAnd may right away fulfill criteria for the described use cases "File management", "Document management", and "Search (On Device)", in our effort to provide a device-wide software managing all of a user's location-related personal and procured data and visualizing it on offline maps?

@Zirochkabila Zirochkabila added the Nice to Have Should be fixed but there is no priority or no possibility to fix it within current horizon planning label Dec 26, 2022
@vshcherb
Copy link
Member

For sure - no, we can't act as a file manager. We plan to use Media Storage probably in future. However it's tricky ... https://developer.android.com/training/data-storage/shared/documents-files cause we would like to have full folder access. With some extent you can say map or track is a document

@sonora
Copy link
Member Author

sonora commented Dec 26, 2022

@vshcherb I can offer that the two of us review their required template (which I have not seen yet,it's referenced here https://support.google.com/googleplay/android-developer/answer/9214102) and identify the corresponding OsmAnd use cases.

In some instances their wording may be less restrictive than we think. Their definition of e.g. "File management" is

App’s core purpose involves the access, editing, and management (including maintenance) of files and folders outside of its app-specific storage space

which would already be fulfilled by OsmAnd's ability to open users' gpx location data owned by third party hiking / touring/ fitness etc. apps across the device and offering our "Edit" functionality to modify or augment them.

@vshcherb
Copy link
Member

@sonora this is not a correct process I think, Android phones are moving towards direction of enabling access for a specific file. So we need to be able to support large individual sqlite files (like 30-50GB) on external storage but most of our files are fine to be processed in Internal Storage. We're discussing individual files and folder for Maps + folder for Audio / Video notes. All these bugs / workarounds will deprecate very soon, Android updates are coming much faster nowadays, I'm already running Android 13 on 4 years old phone which is unbelievable! Release made 2022 already available so widely.

@sonora
Copy link
Member Author

sonora commented Dec 26, 2022

Agreed, so let's develop a solution we deem more future-proof. I think the requirements and starting points are

  1. to separate user(-specific) data like personal gpx files from generic data which we offer for all users as downloads (maps, voices, etc.).
  2. We have essentially finished separating different types of data into different subfolders. That needs to be diversified now to being able to use different storage locations, because as a rule the personal data will be rather small compared to the generic data, which on many devices exceeds the internal storage capacity.
  3. Users want to be able to sync at least their personal data using 3rd party mechanisms or vaults.
  4. Users want to be able to access, view (on map), and edit their personal location data even if it is created/owned by other apps. In a way OsmAnd needs to behave like a gpx data manager.

@sonora
Copy link
Member Author

sonora commented Mar 1, 2023

PS: In light of our new "Track management" user story currently being implemented, we may in addition argue that OsmAnd is a File Manager software for users' location related files, in particular a GPX File Manager.

Such files do not fall into Google's "Media" or any of the other predefined file types, so "All files access" may actually be the Google-prescribed solution to cover this new core functionality?

@Tombstone2K
Copy link

Tombstone2K commented Jul 5, 2023

I think "All files access" (MANAGE_EXTERNAL_STORAGE) is excessive and not strictly necessary. I believe that MANAGE_EXTERNAL_STORAGE should be used only as a last resort (which is not the case here).

To simplify things, what can be done instead is ->

  • Continue storing maps, voices as done currently
  • Have an option to store gpx files and tracks in user chosen directories via Storage Access Framework (SAF) through the "ACTION_OPEN_DOCUMENT_TREE", which grants the app complete access to that directory (as well as all files and sub-directories in that directory)

@jlmxyz
Copy link

jlmxyz commented Aug 19, 2023

but most of our files are fine to be processed in Internal Storage

I don't agree... internal storage is limited in space, in particular if you have several user on phone (which is my case, one personal and one for work) it's aging very fast and can't be changed... google push forward removing sdcard slot on devices, with all the "known power for freedom" of google... if you loose the phone, because a bad update, because of hardware failure, because of any issue obliging to reset the device, you loose everything, and don't come speak about that sh***y cloud feature, yeah great for privacy! don't want any cloud jail! internal storage is just something I want to go out, the crypto can't be opened on other device for file recovery, even if you're the owner of the phone, they don't follow any pc crypto standard like lucks, veracrypt... so you're not the owner of the files and data stored and backuping files is a headache (oh yeah cloud backup is surprisingly so easy and integrated... wonder why it's so complicated to access files on the device even if you own it, but everything is so easy to backup on google's webservers (in USA of course, where your data is not considered private)? by the way, without any possible access, for example backups are stored on google drive's storage space, but not accessible using any google drive client, or web interface... you own nothing, you're not the owner of your own data, you can't mount a crypted filesystem because they want it to not be accessible... you're not free... you've paid for the phone, but you're not the owner of the phone...) so no, definitly, the less data is on internal storage, the better, at least, a sdcard, you can remove it and access the data... a phone with 512G storage cost more than 1000€ when the same space on sdcard cost less than 60€... and with fair enough speed to not slow down the phone.... and in future, want to upgrade to 1To? sdcard are already there... internal storage is just a jail...

@anaxonda
Copy link

but most of our files are fine to be processed in Internal Storage

I don't agree... internal storage is limited in space, in particular if you have several user on phone (which is my case, one personal and one for work) it's aging very fast and can't be changed... google push forward removing sdcard slot on devices, with all the "known power for freedom" of google...

I agree with this take, and one of the big downsides of osmand for me is not being able to have a truly portable install that I can swap between devices. Yes, I can manually export/backup my profile or use backup app but this is considerably more friction.

Here's some related posts about it:
#18595
#12194

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Nice to Have Should be fixed but there is no priority or no possibility to fix it within current horizon planning
Projects
None yet
Development

No branches or pull requests

6 participants