fix: SecurityException when patching application #1856
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Notice a problem with one of the banner? lemme know @ https://github.com/validcube/validcube/issues/new
😊 Issue
Multiple users told us about ReVanced Manager v1.19.4/v1.12.0-dev.X getting killed in Android 14 when attempting to patch. We've found the problem to be originating from one of the dependency that we happened to be using, flutter_background.
Starting In Android 14, all foreground services must list at least one foreground service type or else system will raise
SecurityException
.This issue happen on JulianAssmann/flutter_background@65cf0ec and newer, so a PR to fix this have been opened
The relevant code was line 7 in Manifest and line 128 in IsolateHolderService
https://github.com/JulianAssmann/flutter_background/blob/65cf0ec93486b3a6c74339aadaeb384cf2c9a24b/android/src/main/AndroidManifest.xml#L6-L8
https://github.com/JulianAssmann/flutter_background/blob/65cf0ec93486b3a6c74339aadaeb384cf2c9a24b/android/src/main/kotlin/de/julianassmann/flutter_background/IsolateHolderService.kt#L128
🔧 Testing note
Testing was done in Firebase Device Streaming, which means everything happened remotely in Google's servers... alternatively a physical device farm.
20240405_135732.mp4
fix: #1854, #1841, #1839