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 Export internal data documents provider patch #3830

Merged
merged 7 commits into from
Dec 9, 2024

Conversation

timschneeb
Copy link
Contributor

@timschneeb timschneeb commented Oct 27, 2024

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.

This change removes the prior 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

@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.

@oSumAtrIX oSumAtrIX force-pushed the dev branch 3 times, most recently from c0cd9d2 to 2ace07d Compare November 6, 2024 16:19
@LisoUseInAIKyrios LisoUseInAIKyrios force-pushed the internal-data-doc-provider branch 3 times, most recently from 10b4808 to 06d25c0 Compare November 19, 2024 07:32
@LisoUseInAIKyrios LisoUseInAIKyrios force-pushed the internal-data-doc-provider branch from 06d25c0 to 73f2638 Compare November 19, 2024 07:33
@oSumAtrIX oSumAtrIX merged commit cb22f65 into ReVanced:dev Dec 9, 2024
1 check passed
Copy link

welcome bot commented Dec 9, 2024

Thank you for contributing to ReVanced. Join us on Discord to receive a role for your contribution.

github-actions bot pushed a commit that referenced this pull request Dec 9, 2024
# [5.4.0-dev.2](v5.4.0-dev.1...v5.4.0-dev.2) (2024-12-09)

### Bug Fixes

* **TikTok - SIM Spoof:** Change patch to default off to fix login ([#4084](#4084)) ([f4659a3](f4659a3))

### Features

* Add Internal data documents provider patch ([#3830](#3830)) ([cb22f65](cb22f65))
github-actions bot pushed a commit to attercopdazzler/revanced-patches-temp that referenced this pull request Dec 11, 2024
# [5.4.0](v5.3.0...v5.4.0) (2024-12-11)

### Bug Fixes

* **TikTok - Settings:** Use correct colors for dark mode ([ReVanced#4087](https://github.com/attercopdazzler/revanced-patches-temp/issues/4087)) ([6bd22ff](6bd22ff))
* **TikTok - SIM Spoof:** Change patch to default off to fix login ([ReVanced#4084](https://github.com/attercopdazzler/revanced-patches-temp/issues/4084)) ([f4659a3](f4659a3))
* **YouTube - Spoof video streams:** Fix error toast that is sometimes shown ([ReVanced#4090](https://github.com/attercopdazzler/revanced-patches-temp/issues/4090)) ([4c46cb2](4c46cb2))
* **YouTube - Spoof video streams:** Resolve playback of age restricted videos ([ReVanced#4096](https://github.com/attercopdazzler/revanced-patches-temp/issues/4096)) ([839a404](839a404))

### Features

* Add Internal data documents provider patch ([ReVanced#3830](https://github.com/attercopdazzler/revanced-patches-temp/issues/3830)) ([cb22f65](cb22f65))
* **Change package name:** Add options to change provider and permission package names to handle installation conflicts ([75c740c](75c740c))
* **Twitch:** Make patches compatible with latest versions ([51b5105](51b5105))
github-actions bot pushed a commit that referenced this pull request Dec 14, 2024
# [5.4.0](v5.3.0...v5.4.0) (2024-12-14)

### Bug Fixes

* **GmsCore support:** Adjust presentation of battery optimization dialog  ([#4091](#4091)) ([5d8fc1b](5d8fc1b))
* **TikTok - Settings:** Use correct colors for dark mode ([#4087](#4087)) ([6bd22ff](6bd22ff))
* **TikTok - SIM Spoof:** Change patch to default off to fix login ([#4084](#4084)) ([f4659a3](f4659a3))
* **YouTube - Hide ads:** Hide new type of featured promotions ([#4113](#4113)) ([13c7592](13c7592))
* **YouTube - Spoof video streams:** Fix error toast that is sometimes shown ([#4090](#4090)) ([4c46cb2](4c46cb2))
* **YouTube - Spoof video streams:** Resolve playback of age restricted videos ([#4096](#4096)) ([839a404](839a404))
* **YouTube Music - Bypass certificate checks:** Add a recommended target version ([#4104](#4104)) ([17a5a6c](17a5a6c))
* **YouTube Music - Spoof video streams:** Disable stable volume ([#4097](#4097)) ([16bb9df](16bb9df))

### Features

* Add Internal data documents provider patch ([#3830](#3830)) ([cb22f65](cb22f65))
* **Change package name:** Add options to change provider and permission package names to handle installation conflicts ([75c740c](75c740c))
* **Twitch:** Make patches compatible with latest versions ([#4099](#4099)) ([eecfbb7](eecfbb7))
* **YouTube - Comments:** Add `Hide 'Chat summary'` ([#4110](#4110)) ([269493c](269493c))
@LisoUseInAIKyrios LisoUseInAIKyrios changed the title feat: Add Internal data documents provider patch feat: Add Export internal data documents provider patch Dec 14, 2024
github-actions bot pushed a commit to Flat/revanced-patches that referenced this pull request Jan 15, 2025
# [5.3.0](v5.2.0...v5.3.0) (2025-01-15)

### Bug Fixes

* **Change package name:** Prevent applying the patch to known incompatible apps ([ReVanced#3943](https://github.com/Flat/revanced-patches/issues/3943)) ([44936e7](44936e7))
* **ci:** update url for publishing ([a08568b](a08568b))
* **GmsCore support:** Adjust presentation of battery optimization dialog  ([ReVanced#4091](https://github.com/Flat/revanced-patches/issues/4091)) ([5d8fc1b](5d8fc1b))
* **GmsCore support:** Do not show battery optimization error on Android Automotive devices (Google built-in) ([ReVanced#4218](https://github.com/Flat/revanced-patches/issues/4218)) ([d6e389c](d6e389c))
* **Reddit:** Fix patches by using correct extension class ([70bdc68](70bdc68))
* **Sync for Reddit:** Fix patches by using correct extension name ([030093e](030093e))
* **TikTok - Settings:** Use correct colors for dark mode ([ReVanced#4087](https://github.com/Flat/revanced-patches/issues/4087)) ([6bd22ff](6bd22ff))
* **TikTok - SIM Spoof:** Change patch to default off to fix login ([ReVanced#4084](https://github.com/Flat/revanced-patches/issues/4084)) ([f4659a3](f4659a3))
* **Twitch:** Change recommended target to the latest app version ([fb32972](fb32972))
* **Twitch:** Resolve setting menu crashes ([ReVanced#4025](https://github.com/Flat/revanced-patches/issues/4025)) ([62df596](62df596))
* **Twitter - Change link sharing domain:** Use correct extension package ([ad7fab6](ad7fab6))
* **twitter:** doubleclick ads ([c32fe2e](c32fe2e))
* **Twitter:** Merge correct extension by depending on correct extension patch ([8281cf6](8281cf6))
* **YouTube - Exit fullscreen mode:** Exit fullscreen mode of first video opened after cold start ([be5cf2e](be5cf2e))
* **YouTube - Force original audio:** If stream spoofing to Android then show a summary text why force audio is not available ([ReVanced#4220](https://github.com/Flat/revanced-patches/issues/4220)) ([029aee8](029aee8))
* **YouTube - Force original audio:** Use correct availability for settings UI ([a7eedcb](a7eedcb))
* **YouTube - Force original audio:** Use correct original audio stream if app language is not English ([0d20171](0d20171))
* **YouTube - Hide ads:** Hide new type of featured promotions ([ReVanced#4113](https://github.com/Flat/revanced-patches/issues/4113)) ([13c7592](13c7592))
* **YouTube - Hide layout components:** Don't hide Shorts channel bar when toggling for video player ([9af6412](9af6412))
* **YouTube - Hide layout components:** Hide new kind of community post ([ReVanced#4155](https://github.com/Flat/revanced-patches/issues/4155)) ([08f68cb](08f68cb))
* **YouTube - Miniplayer:** Use estimated maximum on screen size for devices with low density screens ([ReVanced#4150](https://github.com/Flat/revanced-patches/issues/4150)) ([2694158](2694158))
* **YouTube - Open Shorts in regular player:** Do not show the miniplayer after opening a Short while a video is playing ([894e366](894e366))
* **YouTube - SponsorBlock:** Show a toast and not a dialog if segment submitted successfully ([134b189](134b189))
* **YouTube - SponsorBlock:** Show create new segment error messages using a dialog ([ReVanced#4148](https://github.com/Flat/revanced-patches/issues/4148)) ([5870906](5870906))
* **YouTube - Spoof app version:** Update spoof target to resolve library tab crashes ([ReVanced#4014](https://github.com/Flat/revanced-patches/issues/4014)) ([c8eced5](c8eced5))
* **YouTube - Spoof app version:** Update spoof target to resolve library tab crashes ([ReVanced#4019](https://github.com/Flat/revanced-patches/issues/4019)) ([d89ad65](d89ad65))
* **YouTube - Spoof video stream:** Remove UI client type setting.  Allow setting default audio language. ([ReVanced#4184](https://github.com/Flat/revanced-patches/issues/4184)) ([99f3f29](99f3f29))
* **YouTube - Spoof video streams:** Add 'Android Creator' ([ReVanced#4262](https://github.com/Flat/revanced-patches/issues/4262)) ([0479dd2](0479dd2))
* **YouTube - Spoof video streams:** Add iOS TV client, restore iOS 'force AVC', show client type in stats for nerds ([ReVanced#4202](https://github.com/Flat/revanced-patches/issues/4202)) ([ab29f80](ab29f80))
* **YouTube - Spoof video streams:** Add missing preferred language preference to the settings ([630633c](630633c))
* **YouTube - Spoof video streams:** Change default spoofing to iOS, allow setting a default language with Android VR ([ReVanced#4171](https://github.com/Flat/revanced-patches/issues/4171)) ([171b4e7](171b4e7))
* **YouTube - Spoof video streams:** Enable opus codec by updating iOS client version ([ReVanced#4063](https://github.com/Flat/revanced-patches/issues/4063)) ([0af156f](0af156f))
* **YouTube - Spoof video streams:** Fix error toast that is sometimes shown ([ReVanced#4090](https://github.com/Flat/revanced-patches/issues/4090)) ([4c46cb2](4c46cb2))
* **YouTube - Spoof video streams:** Ignore harmless error toast if hide ads is disabled ([c3423bb](c3423bb))
* **YouTube - Spoof video streams:** Make livestreams start at the current time when using iOS client   ([ReVanced#4137](https://github.com/Flat/revanced-patches/issues/4137)) ([140f484](140f484))
* **YouTube - Spoof video streams:** Remove iOS, add clients Android TV and Android Creator ([ReVanced#4180](https://github.com/Flat/revanced-patches/issues/4180)) ([86abfb2](86abfb2))
* **YouTube - Spoof video streams:** Resolve playback of age restricted videos ([ReVanced#4096](https://github.com/Flat/revanced-patches/issues/4096)) ([839a404](839a404))
* **YouTube - Spoof video streams:** Update `Force AVC` client data ([ReVanced#4064](https://github.com/Flat/revanced-patches/issues/4064)) ([7d537dd](7d537dd))
* **YouTube - Spoof video streams:** Update iOS client version ([df3aeed](df3aeed))
* **YouTube - Spoof video streams:** Use 2 letter device language code ([33ff997](33ff997))
* **YouTube - Spoof video streams:** Use Android VR authentication if using default audio language ([ReVanced#4191](https://github.com/Flat/revanced-patches/issues/4191)) ([98773cc](98773cc))
* **YouTube - Spoof video streams:** Use system language as default iOS audio stream ([ReVanced#4042](https://github.com/Flat/revanced-patches/issues/4042)) ([4017185](4017185))
* **YouTube - Theme:** Use dark theme color for status and navigation bar ([0240efe](0240efe))
* **YouTube Music - Bypass certificate checks:** Add a recommended target version ([ReVanced#4104](https://github.com/Flat/revanced-patches/issues/4104)) ([17a5a6c](17a5a6c))
* **YouTube Music - GmsCore support:** Resolve patching errors ([ReVanced#4056](https://github.com/Flat/revanced-patches/issues/4056)) ([38a4bad](38a4bad))
* **YouTube Music - Hide category bar:** Add support for latest release ([ReVanced#3968](https://github.com/Flat/revanced-patches/issues/3968)) ([b63fdeb](b63fdeb))
* **YouTube Music - Permanent shuffle:** Remove obsolete and non functional patch ([ReVanced#4073](https://github.com/Flat/revanced-patches/issues/4073)) ([fbc6ab6](fbc6ab6))
* **YouTube Music - Spoof video streams:** Disable stable volume ([ReVanced#4097](https://github.com/Flat/revanced-patches/issues/4097)) ([16bb9df](16bb9df))
* **YouTube Music:** Add `Spoof client patch` to fix playback ([ReVanced#4132](https://github.com/Flat/revanced-patches/issues/4132)) ([b092508](b092508))
* **YouTube:** Change fingerprints to support a wider range of target versions ([8a09174](8a09174))
* **YouTube:** Do not reset playback speed to 1.0x after closing comment thread (Fixes stock YouTube bug) ([ReVanced#4195](https://github.com/Flat/revanced-patches/issues/4195)) ([dda788c](dda788c))
* **YouTube:** Fix string translations ([52e04d3](52e04d3))

### Features

* Add Internal data documents provider patch ([ReVanced#3830](https://github.com/Flat/revanced-patches/issues/3830)) ([cb22f65](cb22f65))
* **Change package name:** Add options to change provider and permission package names to handle installation conflicts ([75c740c](75c740c))
* **Nyx:** Remove broken `Unlock pro` patch ([1fe8b16](1fe8b16))
* **Swipe controls:** Add option to enable/disable fullscreen swipe to next video ([ReVanced#4222](https://github.com/Flat/revanced-patches/issues/4222)) ([119092f](119092f))
* **Twitch:** Make patches compatible with latest versions ([ReVanced#4099](https://github.com/Flat/revanced-patches/issues/4099)) ([eecfbb7](eecfbb7))
* **YouTube - Comments:** Add `Hide 'Chat summary'` ([ReVanced#4110](https://github.com/Flat/revanced-patches/issues/4110)) ([269493c](269493c))
* **YouTube - Hide feed components:** Remove obsolete `Hide search result shelf header` option ([ReVanced#4134](https://github.com/Flat/revanced-patches/issues/4134)) ([c71443a](c71443a))
* **YouTube - Hide Shorts components:** Add option to hide Shorts in watch history ([ReVanced#4214](https://github.com/Flat/revanced-patches/issues/4214)) ([19c2742](19c2742))
* **YouTube - Navigation buttons:** Add options to disable translucent status bar and navigation bar ([ReVanced#4133](https://github.com/Flat/revanced-patches/issues/4133)) ([a2d2141](a2d2141))
* **YouTube - Spoof app version:** Add 'Restore old navigation and toolbar icons' ([f84e459](f84e459))
* **YouTube - Spoof video streams:** Allow picking a default audio language track ([ReVanced#4050](https://github.com/Flat/revanced-patches/issues/4050)) ([ede666b](ede666b))
* **YouTube Music:** Add `Spoof video streams` patch to fix playback ([ReVanced#4065](https://github.com/Flat/revanced-patches/issues/4065)) ([cf3116a](cf3116a))
* **YouTube:** Add `Change form factor` patch ([ReVanced#4217](https://github.com/Flat/revanced-patches/issues/4217)) ([644ac5b](644ac5b))
* **YouTube:** Add `Exit fullscreen mode` patch ([ReVanced#4223](https://github.com/Flat/revanced-patches/issues/4223)) ([bb5d03b](bb5d03b))
* **YouTube:** Add `Force original audio` patch ([ReVanced#4122](https://github.com/Flat/revanced-patches/issues/4122)) ([f4aa440](f4aa440))
* **YouTube:** Add `Open Shorts in regular player` patch ([ReVanced#4153](https://github.com/Flat/revanced-patches/issues/4153)) ([c7c5e5b](c7c5e5b))
* **YouTube:** Add `Open videos fullscreen` patch ([ReVanced#4069](https://github.com/Flat/revanced-patches/issues/4069)) ([296d63b](296d63b))
* **YouTube:** Add in app option to select a preferred language for ReVanced specific text ([ReVanced#4231](https://github.com/Flat/revanced-patches/issues/4231)) ([3932af3](3932af3))
* **YouTube:** Support version `19.47.53` ([ReVanced#4182](https://github.com/Flat/revanced-patches/issues/4182)) ([2089e61](2089e61))

### Performance Improvements

* Move variables to local scope ([43c0421](43c0421))
# 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.

3 participants