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

Switch to special use foreground service type #23

Merged
merged 1 commit into from
Oct 16, 2023
Merged

Conversation

chenxiaolong
Copy link
Owner

@chenxiaolong chenxiaolong commented Oct 16, 2023

GrapheneOS 14 introduced 1, which unconditionally changes the system exempted foreground type to the special use foreground type within ServiceInfo. This applies to all packages, not just gmscompat-related packages.

However, they don't wrap the corresponding startForeground() calls, so the mismatch causes Custota's service to crash. We can work around this GrapheneOS bug by switching to the special use foreground type, which currently has no downsides compared to the system exempted foreground type.

Fixes: #22

@chenxiaolong chenxiaolong self-assigned this Oct 16, 2023
GrapheneOS 14 introduced [1], which unconditionally changes the system
exempted foreground type to the special use foreground type within
`ServiceInfo`. This applies to all packages, not just gmscompat-related
packages.

However, they don't wrap the corresponding `startForeground()` calls, so
the mismatch causes Custota's service to crash. We can work around this
GrapheneOS bug by switching to the special use foreground type, which
currently has no downsides compared to the system exempted foreground
type.

Fixes: #22

[1]: GrapheneOS/platform_frameworks_base@a350b31

Signed-off-by: Andrew Gunnerson <[email protected]>
@chenxiaolong chenxiaolong merged commit 6fb15a3 into master Oct 16, 2023
4 checks passed
@chenxiaolong chenxiaolong deleted the grapheneos branch October 16, 2023 22:58
chenxiaolong added a commit that referenced this pull request Oct 16, 2023
Signed-off-by: Andrew Gunnerson <[email protected]>
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.

Crash on GrapheneOS 14
1 participant