Skip to content
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

feat: Add Internal data documents provider patch #3830

Open
wants to merge 1,049 commits into
base: dev
Choose a base branch
from

Conversation

timschneeb
Copy link
Contributor

This PR adds an universal patch that registers a DocumentsProvider with access to the internal app storage of the patched app. This is useful if you want to inspect or manipulate protected files like databases or shared preferences of an app without root access.

The documents provider is accessible through the system file picker and allows 3rd-party file explorer apps (like MiXplorer) to mount it as a virtual storage device.

There's already another patch ChangeDataDirectoryLocationPath that tries to accomplish a similar behavior by redirecting the internal data storage to the external data storage, however, it has a few problems. It does not affect file operations in native libraries or in apps with hardcoded /data/data/{pkgName} paths. It also only redirects calls to Context.getDir(), but not getFilesDir(), getCacheDir(), etc.. which also point to the internal app storage.

Screenshots of a patched app in the system file picker

Screenshot_20241027_161002_Files
Screenshot_20241027_161014_Files

LisoUseInAIKyrios and others added 30 commits December 5, 2023 03:47
…Vanced#534)

Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
Co-authored-by: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com>
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
Co-authored-by: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com>
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
Co-authored-by: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com>
LisoUseInAIKyrios and others added 25 commits October 19, 2024 21:36
@oSumAtrIX
Copy link
Member

There's already another patch ChangeDataDirectoryLocationPath that tries to accomplish a similar behavior by redirecting the internal data storage to the external data storage, however, it has a few problems. It does not affect file operations in native libraries or in apps with hardcoded /data/data/{pkgName} paths. It also only redirects calls to Context.getDir(), but not getFilesDir(), getCacheDir(), etc.. which also point to the internal app storage

Would the patch be subject to be removed in favour of this one?

@timschneeb
Copy link
Contributor Author

I think it can be removed. This patch provides pretty much the same result, just with a different method.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.