Skip to content

[Android] Add exit code constants and ProcessExitInfo data model - #5453

Open
IvanBM18 wants to merge 7 commits into
masterfrom
feature/android-exit-code-constants
Open

[Android] Add exit code constants and ProcessExitInfo data model#5453
IvanBM18 wants to merge 7 commits into
masterfrom
feature/android-exit-code-constants

Conversation

@IvanBM18

@IvanBM18 IvanBM18 commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Bug: b/553141628

Overview

Since Android API level 30 (and all apps targeting Android 11+), Android introduced ApplicationExitInfo to track process exit reasons and historical diagnostic metadata via dumpsys activity exit-info.

Previously, testcase execution using am start almost 99% of the time returned success exit code 0 even when an application process crashed or failed silently. To accurately track process termination reasons and status metadata from dumpsys activity exit-info, this PR defines the structured exit code constants (ExitReason, ExitStatus) and the ProcessExitInfo data model.

Learn more:
https://developer.android.com/reference/android/app/ApplicationExitInfo

Changes

  • src/clusterfuzz/_internal/platforms/android/constants.py: Added ExitReason and ExitStatus constant definitions.
  • src/clusterfuzz/_internal/platforms/android/util.py: Defined ProcessExitInfo dataclass for dumpsys activity exit-info parsing.

Tests performed

PR stack

  • master
    • #PR 2.1a feature/android-exit-code-constants 👈
    • #PR 2.1b feature/android-exit-code-core
    • #PR 2.2 feature/android-exit-code-process-handler
    • #PR 2.3 feature/android-bad-build-check

Comment thread src/clusterfuzz/_internal/platforms/android/constants.py
Comment thread src/clusterfuzz/_internal/platforms/android/constants.py Outdated
Comment thread src/clusterfuzz/_internal/platforms/android/util.py
Comment thread src/clusterfuzz/_internal/platforms/android/util.py Outdated
Comment thread src/clusterfuzz/_internal/platforms/android/util.py
@IvanBM18
IvanBM18 force-pushed the feature/android-exit-code-constants branch from d1dcb71 to a6a04c2 Compare September 4, 2026 22:30

@dylanjew dylanjew left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! please confirm with GOSST whether this will affect the android Clusterfuzz instance and get approval if necessary

Comment thread src/clusterfuzz/_internal/platforms/android/util.py
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.

3 participants