-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Allow access to all files from SAF #3165
base: master
Are you sure you want to change the base?
Conversation
Did some tests and they worked well. Please merge my PR :) |
I don't know what was the reason to restrict to |
Cool. Hope this PR will be merged soon. |
Add a menu for selecting the directory? |
Would be controlled via |
7c43e10
to
af0f4d8
Compare
Is this even possible? Can the path be changed during runtime? Else, it will likely cause data corruptions or errors. |
Can this be implemented? Can't find anything about that from Google (maybe I just suck at Googling) |
I made an app that exposes many roots, works just fine. The cursor you return in queryRoots can have multiple rows. You create a MatrixCursor and add one row for each root. Here's how I did it in my app. |
Yeah, pretty much. Will also have to prefix a root id in the |
@agnostic-apollo I am looking into this. But how can I add an array property in termux.properties? I cant figure out. |
IMHO, I think we can remove the information for usable bytes ( |
Adding support for multiple roots won't just require an array, it will require a nested dict where each root has its own sub properties like title, summary, icon, whether its read-only, whether canonical paths outside it are accessible, etc. The
What about file managers that don't show this info directly but have internal usages? Moreover, file managers don't have access to termux directories to know how much free space there actually is. It may be same as external storage or their own app data directories but termux app may be installed on a different partition or have custom mounts for specific directories, which will have different free spaces. Moreover, currently the provider is not returning free space for all directories, which ideally should be done. |
This comment was marked as outdated.
This comment was marked as outdated.
New update: I already implemented the majority of these. But how to use getActivity() inside TermuxDocumentsProvider? I need to get the properties from termux.properties. |
Why do you need an https://developer.android.com/reference/android/content/ContentProvider#getContext() Also note that I have rewitten/refactored properties and preferences of all termux apps and moved the classes to support current requirements, user requests and planned future changes, so whatever changes you are making now will have to be redone later. |
And any suggestive changes won't be merged unless they meet the required standards with the issues solved. |
So maybe I will rework my changes from scratch after you made changes and pushed them to here. |
Allow access everything under `/data/data/com.termux/files`, not just `/data/data/com.termux/files/home`
af0f4d8
to
56ab2c5
Compare
I realised we could just expose |
That wouldn't allow root specific options like read only, allow external files access via symlinks, etc. |
Provides accessing a dir, for example, |
Allow access everything under
/data/data/com.termux/files
, not just/data/data/com.termux/files/home