Skip to content
This repository has been archived by the owner on Feb 15, 2020. It is now read-only.

Support Android-specific storage facilities #2

Closed
Alexander-- opened this issue May 10, 2016 · 0 comments
Closed

Support Android-specific storage facilities #2

Alexander-- opened this issue May 10, 2016 · 0 comments

Comments

@Alexander--
Copy link
Collaborator

Alexander-- commented May 10, 2016

As of Android 6.0 there are multiple facilities, meant to improve security of Android storage access. A few especially abhorrent of them are grouped into something, called "SAF", or how it's creators prefer to call it "Storage Access Framework".

Here is a concept behind that abomination:

  1. Prevent developers from accessing certain parts of file system (e.g. external storage)
  2. Subsequently give them a limited "access" by letting Java applications open individual files via proxy (a specialized application-filepicker)
  3. After a couple more OS versions give them more "access" by allowing Java applications to group their files in groups and allow granting/remember permissions for those groups as whole.

All of permissions are stored by Android system in xml files, which have to be carefully managed by apps themselves. Those permissions have nothing to do with actual filesystem permissions (which still prohibit writing to most directories on device). Likewise actual layout of "directories", available via SAF, does not have to correspond to underlying filesystem.

There are no facilities for accessing the "Storage Access Framework" from native applications. The closest thing possible is giving those applications file descriptors, corresponding to individual files. As of Android-O developer preview, it is not possible to obtain file descriptors of directories via SAF (and even if it were, I am not aware of any facilities in LInux, that would make such descriptors useful)

TL; DR: in Android non-Java code has no means to use SAF

It seems, that integrating support for SAF in aria2 is not currently feasible.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant