Skip to content

[Android Bad Build] Add liveness check - #5434

Merged
PauloVLB merged 1 commit into
masterfrom
fix-android-bad-build-detection
Aug 27, 2026
Merged

[Android Bad Build] Add liveness check#5434
PauloVLB merged 1 commit into
masterfrom
fix-android-bad-build-detection

Conversation

@PauloVLB

@PauloVLB PauloVLB commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

b/546076952

Problem

On Android, check_for_bad_build launches the APK via am start, which exits with return code 0 as soon as the launch intent is delivered regardless of whether the app process survives. If the APK crashes or dies immediately on startup without generating a recognized ASan/security crash pattern in logcat, crash_result.is_crash() returns False. ClusterFuzz treats the build as healthy, falsely recording fuzzing hours for dead builds.

Proposed Solution

Add an Android process liveness check in check_for_bad_build. After launching the app, verify if the package process is actually running via android.adb.get_process_and_child_pids(package_name). If no active PIDs exist for the package, flag is_bad_build = True to halt execution before recording fuzzing hours.

Testing & Validation

  • Added unit tests in testcase_manager_test.py covering both dead APK and running APK scenarios.
  • Verified in dev using the aluminium_asan_chrome_public job on ANDROID_EMULATOR, confirming that invalid builds are now caught and stopped at check_for_bad_build.
  • (See screenshot and logs link in b/546076952#comment7)

@PauloVLB
PauloVLB marked this pull request as ready for review August 24, 2026 15:03
@PauloVLB
PauloVLB requested a review from a team as a code owner August 24, 2026 15:03

@IvanBM18 IvanBM18 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.

Thanks for looking into this, LGTM!

@ViniciustCosta ViniciustCosta 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! Let's try to also get a review from Haiku folks for google3 Android? Or is this only executed for Chrome?

@PauloVLB
PauloVLB merged commit 733e28f into master Aug 27, 2026
24 checks passed
@PauloVLB
PauloVLB deleted the fix-android-bad-build-detection branch August 27, 2026 13:29
@PauloVLB

Copy link
Copy Markdown
Collaborator Author

We had to merge this for the deployment window. Please feel free to leave comments so we can address them in a follow-up PR.

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