-
Notifications
You must be signed in to change notification settings - Fork 303
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Use document provider to grant third-party apps access to app-private directories #516
Comments
I'm a bit confused about "does not require file or root permission". Does it mean don't need root device or don't need grant root permission but still need root device? |
AM, of course, would require root permission. How else is AM going to access files and folders accessible only via root? The purpose is to minimise root usage by third-party apps in order to minimise attack surface, allowing the AM users handle app-private data with their favourite file manager or editor app without the need to grant root for the file manager. Document provider is perfect for this because it is an abstract file accessing mechanism (the core part of the Storage Access Framework) where the target app do not know the exact location of the file being processed. |
I see. Btw, maybe it will not very useful for most users but with adb mode users still can access "debuggable" third-party app-private data right? Can we use app_process run a service with that debuggable app permission to access its app-private data? |
Well, it mostly depends on my usage than the users. If I see something useful for me, I implement it in order to suite my need. Besides, many users are incapable of understanding the global picture of a feature unless it is implemented.
Correct. The
I don't know what you've exactly meant here. But |
Is it possible to run a server/daemon(which implement file manager code) in this shell process with |
No. As I've said above, |
For non-rooted users stumbling over this, note that Revanced is able to inject this feature into arbitrary applications: ReVanced/revanced-patches#3830 It isn't working at the moment due to another bug, but I'll try to look into it when I have some time. Also, about this:
I stumbled across this very interesting project: https://github.com/square/stoic It injects into a debuggable application and can:
BI-DI over And also, apparently you can inject Frida in a very similar way too: https://koz.io/library-injection-for-debuggable-android-apps/ Anyways, this is a very niche feature so not expecting you to work on this Muntashir, but I thought it was really cool and kinda relevant so I wanted to document it in case someone else finds it useful. |
With the introduction of File Manager where an elegant method has been developed to support opening any files from any directory via a content provider so that the recipient app does not require any file or root permission, it is possible to enhance this support via a document provider so that a third-party app can access app-specific private directories such as
/data/data/package.name
without root permission. This could greatly reduce the attack surface as fewer number of apps would need to use the root permission.Possible use cases:
/data/system/ifw/
without granting root or even the editors that do not support root but support SAF (AKA document provider)./data/data/io.github.muntashirakon.AppManager/files/profiles
so that you can add/edit profiles directly.The text was updated successfully, but these errors were encountered: