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

feat: Add Change data directory location patch #3602

Merged
merged 6 commits into from
Sep 6, 2024

Conversation

KrystianQur
Copy link
Contributor

Added a patch to automate changing app files location from data/0 to android/data for root-less devices

@oSumAtrIX
Copy link
Member

What are these locations and what do they have to do with root?

@KrystianQur
Copy link
Contributor Author

Application on data/0 can not be accessed without root, by changing everything in the application to "getFilesExternalDir" the application fully is accessible at android/data instead of data/0 without needing root for access

@KrystianQur KrystianQur changed the base branch from main to dev August 31, 2024 16:16
@Ushie
Copy link
Member

Ushie commented Aug 31, 2024

What's the benefit of this? the expected usage?

@KrystianQur
Copy link
Contributor Author

For some applications/games it is useful to modify the files from here, which are hidden without the patch

Copy link
Member

@oSumAtrIX oSumAtrIX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If an app uses the external directory already, will that cause issues?

@indrastorms
Copy link

android/data is also inaccessible in android 12+ without adb/shizuku

@KrystianQur
Copy link
Contributor Author

@indrastorms I have android 14 and can normally access android/data without adb/shizuku

@KrystianQur
Copy link
Contributor Author

@oSumAtrIX No

@oSumAtrIX
Copy link
Member

And what if the app writes to a file called a in the external directory and the internal?

@KrystianQur
Copy link
Contributor Author

Too nothing, the patch searches for "getDir" methods and replaces with these external ones

@indrastorms
Copy link

@indrastorms I have android 14 and can normally access android/data without adb/shizuku

Not possible maybe your oem doesn't restrict it.
https://developer.android.com/about/versions/11/privacy/storage#other-apps-data

@oSumAtrIX
Copy link
Member

This is offtopic. The patch says non-root and that's the case here

@KrystianQur
Copy link
Contributor Author

Android 14 got new security ways which ZArchiver uses to access android/data as I know

@oSumAtrIX
Copy link
Member

Too nothing, the patch searches for "getDir" methods and replaces with these external ones

Yes, so if it returns the external directory instead which is already used by the app for other purposes it could cause conflicts like in the example i mentioned.

@KrystianQur
Copy link
Contributor Author

Too nothing, the patch searches for "getDir" methods and replaces with these external ones

Yes, so if it returns the external directory instead which is already used by the app for other purposes it could cause conflicts like in the example i mentioned.

Yeah maybe, but I tested in few app's, and it was working fine.

@oSumAtrIX oSumAtrIX merged commit 5998029 into ReVanced:dev Sep 6, 2024
2 checks passed
Copy link

welcome bot commented Sep 6, 2024

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

revanced-bot pushed a commit that referenced this pull request Sep 6, 2024
# [4.14.0-dev.6](v4.14.0-dev.5...v4.14.0-dev.6) (2024-09-06)

### Features

* Add `Change data directory location` patch ([#3602](#3602)) ([5998029](5998029))
E85Addict pushed a commit to E85Addict/revanced-patches that referenced this pull request Sep 9, 2024
# [4.14.0-dev.1](v4.13.3...v4.14.0-dev.1) (2024-09-09)

### Bug Fixes

* **Pixiv - Hide ads:** Fix for latest version ([ReVanced#3616](https://github.com/E85Addict/revanced-patches/issues/3616)) ([98956e8](98956e8))
* **SwissID:** Rename `Remove Google Play Integrity Integrity check` to `Remove Google Play Integrity check` ([ReVanced#3558](https://github.com/E85Addict/revanced-patches/issues/3558)) ([0f5a771](0f5a771))
* **YouTube - ReturnYouTubeDislike:** Show estimated like count for videos with hidden likes ([ReVanced#3601](https://github.com/E85Addict/revanced-patches/issues/3601)) ([005be82](005be82))
* **YouTube - SponsorBlock:** Handle if the user enters an invalid number into any SB settings ([37b3dd1](37b3dd1))

### Features

* Add `Change data directory location` patch ([ReVanced#3602](https://github.com/E85Addict/revanced-patches/issues/3602)) ([5998029](5998029))
* Add `Check environment` patch ([ReVanced#3610](https://github.com/E85Addict/revanced-patches/issues/3610)) ([fbcbdaf](fbcbdaf))
* **Duolingo:** Add `Disable ads` and `Enable debug menu` patch ([ReVanced#3422](https://github.com/E85Addict/revanced-patches/issues/3422)) ([d0a8599](d0a8599))
* **YouTube - Keyword filter:** Add syntax to match whole keywords and not substrings ([ReVanced#3592](https://github.com/E85Addict/revanced-patches/issues/3592)) ([f5fb351](f5fb351))
* **YouTube - Spoof client:** Allow forcing AVC codec with iOS ([ReVanced#3570](https://github.com/E85Addict/revanced-patches/issues/3570)) ([1a49d1f](1a49d1f))
* **YouTube:** Support versions 19.17 thru 19.30 ([a69c4f3](a69c4f3))
revanced-bot pushed a commit that referenced this pull request Sep 18, 2024
# [4.14.0](v4.13.3...v4.14.0) (2024-09-18)

### Bug Fixes

* **Pixiv - Hide ads:** Fix for latest version ([#3616](#3616)) ([98956e8](98956e8))
* **Soundcloud - Hide ads:** Support latest version ([#3628](#3628)) ([66e7e33](66e7e33))
* **SwissID:** Rename `Remove Google Play Integrity Integrity check` to `Remove Google Play Integrity check` ([#3558](#3558)) ([0f5a771](0f5a771))
* **YouTube - ReturnYouTubeDislike:** Show estimated like count for videos with hidden likes ([#3601](#3601)) ([005be82](005be82))
* **YouTube - SponsorBlock:** Add summary text to 'view my segments' button ([df80b9f](df80b9f))
* **YouTube - SponsorBlock:** Handle if the user enters an invalid number into any SB settings ([37b3dd1](37b3dd1))
* **YouTube:** Fix issues related to playback by replace streaming data ([#3582](#3582)) ([dfa94d7](dfa94d7))

### Features

* Add `Change data directory location` patch ([#3602](#3602)) ([5998029](5998029))
* Add `Check environment` patch ([#3610](#3610)) ([fbcbdaf](fbcbdaf))
* **Duolingo:** Add `Disable ads` and `Enable debug menu` patch ([#3422](#3422)) ([d0a8599](d0a8599))
* **Sync for Reddit:** Add `Fix /user/ endpoint` patch ([46d11f3](46d11f3))
* **Sync for Reddit:** Rename patch to `Use /user/ endpoint` ([98ead49](98ead49))
* **YouTube - Hide Shorts components:** Hide 'Use this sound' button ([#3647](#3647)) ([33fc090](33fc090))
* **YouTube - Keyword filter:** Add syntax to match whole keywords and not substrings ([#3592](#3592)) ([f5fb351](f5fb351))
* **YouTube - Spoof client:** Allow forcing AVC codec with iOS ([#3570](#3570)) ([1a49d1f](1a49d1f))
* **YouTube Music:** Make working patches compatible with latest versions ([#3556](#3556)) ([12f6f19](12f6f19))
* **YouTube:** Add donation link to settings about screen ([#3626](#3626)) ([0684ab5](0684ab5))
E85Addict pushed a commit to E85Addict/revanced-patches that referenced this pull request Sep 18, 2024
# [4.14.0](v4.13.3...v4.14.0) (2024-09-18)

### Bug Fixes

* **Pixiv - Hide ads:** Fix for latest version ([ReVanced#3616](https://github.com/E85Addict/revanced-patches/issues/3616)) ([98956e8](98956e8))
* **Soundcloud - Hide ads:** Support latest version ([ReVanced#3628](https://github.com/E85Addict/revanced-patches/issues/3628)) ([66e7e33](66e7e33))
* **SwissID:** Rename `Remove Google Play Integrity Integrity check` to `Remove Google Play Integrity check` ([ReVanced#3558](https://github.com/E85Addict/revanced-patches/issues/3558)) ([0f5a771](0f5a771))
* **YouTube - ReturnYouTubeDislike:** Show estimated like count for videos with hidden likes ([ReVanced#3601](https://github.com/E85Addict/revanced-patches/issues/3601)) ([005be82](005be82))
* **YouTube - SponsorBlock:** Add summary text to 'view my segments' button ([df80b9f](df80b9f))
* **YouTube - SponsorBlock:** Handle if the user enters an invalid number into any SB settings ([37b3dd1](37b3dd1))
* **YouTube:** Fix issues related to playback by replace streaming data ([ReVanced#3582](https://github.com/E85Addict/revanced-patches/issues/3582)) ([dfa94d7](dfa94d7))

### Features

* Add `Change data directory location` patch ([ReVanced#3602](https://github.com/E85Addict/revanced-patches/issues/3602)) ([5998029](5998029))
* Add `Check environment` patch ([ReVanced#3610](https://github.com/E85Addict/revanced-patches/issues/3610)) ([fbcbdaf](fbcbdaf))
* **Duolingo:** Add `Disable ads` and `Enable debug menu` patch ([ReVanced#3422](https://github.com/E85Addict/revanced-patches/issues/3422)) ([d0a8599](d0a8599))
* **Sync for Reddit:** Add `Fix /user/ endpoint` patch ([46d11f3](46d11f3))
* **Sync for Reddit:** Rename patch to `Use /user/ endpoint` ([98ead49](98ead49))
* **YouTube - Hide Shorts components:** Hide 'Use this sound' button ([ReVanced#3647](https://github.com/E85Addict/revanced-patches/issues/3647)) ([33fc090](33fc090))
* **YouTube - Keyword filter:** Add syntax to match whole keywords and not substrings ([ReVanced#3592](https://github.com/E85Addict/revanced-patches/issues/3592)) ([f5fb351](f5fb351))
* **YouTube - Spoof client:** Allow forcing AVC codec with iOS ([ReVanced#3570](https://github.com/E85Addict/revanced-patches/issues/3570)) ([1a49d1f](1a49d1f))
* **YouTube Music:** Make working patches compatible with latest versions ([ReVanced#3556](https://github.com/E85Addict/revanced-patches/issues/3556)) ([12f6f19](12f6f19))
* **YouTube:** Add donation link to settings about screen ([ReVanced#3626](https://github.com/E85Addict/revanced-patches/issues/3626)) ([0684ab5](0684ab5))

### Performance Improvements

* Personal Logo && Add upstream sync ([2e4ef0a](2e4ef0a))
E85Addict pushed a commit to E85Addict/revanced-patches that referenced this pull request Sep 18, 2024
# [4.14.0](v4.13.3...v4.14.0) (2024-09-18)

### Bug Fixes

* **Pixiv - Hide ads:** Fix for latest version ([ReVanced#3616](https://github.com/E85Addict/revanced-patches/issues/3616)) ([98956e8](98956e8))
* **Soundcloud - Hide ads:** Support latest version ([ReVanced#3628](https://github.com/E85Addict/revanced-patches/issues/3628)) ([66e7e33](66e7e33))
* **SwissID:** Rename `Remove Google Play Integrity Integrity check` to `Remove Google Play Integrity check` ([ReVanced#3558](https://github.com/E85Addict/revanced-patches/issues/3558)) ([0f5a771](0f5a771))
* **YouTube - ReturnYouTubeDislike:** Show estimated like count for videos with hidden likes ([ReVanced#3601](https://github.com/E85Addict/revanced-patches/issues/3601)) ([005be82](005be82))
* **YouTube - SponsorBlock:** Add summary text to 'view my segments' button ([df80b9f](df80b9f))
* **YouTube - SponsorBlock:** Handle if the user enters an invalid number into any SB settings ([37b3dd1](37b3dd1))
* **YouTube:** Fix issues related to playback by replace streaming data ([ReVanced#3582](https://github.com/E85Addict/revanced-patches/issues/3582)) ([dfa94d7](dfa94d7))

### Features

* Add `Change data directory location` patch ([ReVanced#3602](https://github.com/E85Addict/revanced-patches/issues/3602)) ([5998029](5998029))
* Add `Check environment` patch ([ReVanced#3610](https://github.com/E85Addict/revanced-patches/issues/3610)) ([fbcbdaf](fbcbdaf))
* **Duolingo:** Add `Disable ads` and `Enable debug menu` patch ([ReVanced#3422](https://github.com/E85Addict/revanced-patches/issues/3422)) ([d0a8599](d0a8599))
* **Sync for Reddit:** Add `Fix /user/ endpoint` patch ([46d11f3](46d11f3))
* **Sync for Reddit:** Rename patch to `Use /user/ endpoint` ([98ead49](98ead49))
* **YouTube - Hide Shorts components:** Hide 'Use this sound' button ([ReVanced#3647](https://github.com/E85Addict/revanced-patches/issues/3647)) ([33fc090](33fc090))
* **YouTube - Keyword filter:** Add syntax to match whole keywords and not substrings ([ReVanced#3592](https://github.com/E85Addict/revanced-patches/issues/3592)) ([f5fb351](f5fb351))
* **YouTube - Spoof client:** Allow forcing AVC codec with iOS ([ReVanced#3570](https://github.com/E85Addict/revanced-patches/issues/3570)) ([1a49d1f](1a49d1f))
* **YouTube Music:** Make working patches compatible with latest versions ([ReVanced#3556](https://github.com/E85Addict/revanced-patches/issues/3556)) ([12f6f19](12f6f19))
* **YouTube:** Add donation link to settings about screen ([ReVanced#3626](https://github.com/E85Addict/revanced-patches/issues/3626)) ([0684ab5](0684ab5))

### Performance Improvements

* Personal Logo && Add upstream sync ([2e4ef0a](2e4ef0a))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants