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: SecurityException when patching application #1856

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open

Conversation

validcube
Copy link
Member

@validcube validcube commented Apr 5, 2024

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.

📱 Device ⚙️ SDK 📝 Human Verdict
Samsung Galaxy Z Fold 5 Upside Down Cake (34) ✅ Passed
20240405_135732.mp4

fix: #1854, #1841, #1839

@validcube validcube requested a review from Ushie April 5, 2024 07:42
@validcube validcube changed the title build: Switch to forked flutter_background fix: SecurityException when patching application Apr 5, 2024
@Domenic-MZS
Copy link
Contributor

Domenic-MZS commented Apr 6, 2024

(fast check not totally sure) why are we missing the android permission for the foreground tho?

<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>

Which is required by the flutter_background package

@validcube
Copy link
Member Author

(fast check not totally sure) why are we missing the android permission for the foreground tho?

<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>

Which is required by the flutter_background package

That's a good question, I'm finding a reason to git blaming someone in team now :D - aside from that, yeah we should add it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants