Skip to content

Bind to androidx.test.services.SpeakEasyService to mitigate LMK kills. - #2502

Merged
copybara-service[bot] merged 1 commit into
mainfrom
piper_971555287
Sep 4, 2026
Merged

Bind to androidx.test.services.SpeakEasyService to mitigate LMK kills.#2502
copybara-service[bot] merged 1 commit into
mainfrom
piper_971555287

Conversation

@copybara-service

@copybara-service copybara-service Bot commented Sep 4, 2026

Copy link
Copy Markdown

Bind to androidx.test.services.SpeakEasyService to mitigate LMK kills.

When physical devices experience high memory pressure,
androidx.test.services is at risk of being killed by the system's lowmemorykiller due to running as an unbound
background process, causing shell command execution to fail.

This commit raises androidx.test.services by establishing an active binding from the calling test process,
thus inheriting its top-level foreground priority (oom_score_adj = 0).
Shell binder connections are also cached across invocations to reduce unnecessary queries across processes.

This change only effects ShellExecutor when used in the legacy
non-localsocket mode.

When physical devices experience high memory pressure,
`androidx.test.services` is at risk of being killed by the system's lowmemorykiller due to running as an unbound
background process, causing shell command execution to fail.

This commit raises androidx.test.services by establishing an active binding from the calling test process,
thus inheriting its top-level foreground priority (`oom_score_adj = 0`).
Shell binder connections are also cached across invocations to reduce unnecessary queries across processes.

This change only effects ShellExecutor when used in the legacy
non-localsocket mode.

PiperOrigin-RevId: 976536567
@copybara-service
copybara-service Bot merged commit ec1bfc1 into main Sep 4, 2026
6 checks passed
@copybara-service
copybara-service Bot deleted the piper_971555287 branch September 4, 2026 23:05
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.

1 participant