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

fix: Make it work on Android 12 and lower by using existing APIs #312

Merged

Conversation

LisoUseInAIKyrios
Copy link
Contributor

Fixes patching failure when using Manger and Android 12 or lower.

All other patcher code seems to compile just fine.

Changing the project Android SDK to 8.0 correctly detects the issue. I'm not sure if Android 8.0 can be set in a gradle config file or somewhere else, as changing the project in Android Studio does not change any project files.

@oSumAtrIX oSumAtrIX changed the title fix: Use method compatible with Android 12 and lower fix: Make it work on Android 12 and lower by using existing APIs Oct 15, 2024
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.

Simplified the code as RawDexIO already implements a reader. Using the expectedSize argument, we can specify a buffer size. Extension DEX are usually about 1MB iirc so should we keep the size?

@LisoUseInAIKyrios
Copy link
Contributor Author

If it's about 1MB then yeah the buffer could be larger. 8092 or 16384 bytes might be good.

@oSumAtrIX
Copy link
Member

I think, passing 0 makes it use a default buffer size of 16kb.

@oSumAtrIX oSumAtrIX merged commit a44802e into ReVanced:dev Oct 15, 2024
1 check passed
@LisoUseInAIKyrios LisoUseInAIKyrios deleted the fix/inputstream_readallbytes branch October 15, 2024 11:39
github-actions bot pushed a commit that referenced this pull request Oct 15, 2024
## [20.0.2-dev.1](v20.0.1...v20.0.2-dev.1) (2024-10-15)

### Bug Fixes

* Make it work on Android 12 and lower by using existing APIs ([#312](#312)) ([a44802e](a44802e))
github-actions bot pushed a commit that referenced this pull request Oct 17, 2024
## [20.0.2](v20.0.1...v20.0.2) (2024-10-17)

### Bug Fixes

* Make it work on Android 12 and lower by using existing APIs ([#312](#312)) ([a44802e](a44802e))
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.

2 participants