Skip to content

[Android] Adds guardrails for non apk fuzzing - #5470

Open
IvanBM18 wants to merge 5 commits into
masterfrom
fix/android/checks-for-non-apk-fuzzing
Open

IvanBM18 wants to merge 5 commits into
masterfrom
fix/android/checks-for-non-apk-fuzzing

Conversation

@IvanBM18

@IvanBM18 IvanBM18 commented Sep 15, 2026

Copy link
Copy Markdown
Collaborator

Overview

In a previous stack of PRs (See #5453) I made a ton of changes for improving android fuzzing overall error detection when executing test cases, but, as i got pointed out, my changes assumed that android fuzzing work exclusively under apks, so some of the checks/validations didn't take into account jobs where no APK nor PKG_NAME is provided.

This PR focus on tuning various checks/validations previously altered in the stack of Prs above, so that if in android fuzzing with a binary(with this i mean non-apk fuzzing) then we go back to the usual checks that we had in place.

Changes

  • Bad build check in tescase_manager.py now only checks for an apk process liveness if an apk package is found.
  • The test cases directory in app.py defaults to the old (non accesible by apks) dir if no apk is found.
  • When clearing the directory in device.py we now clean using the find command, as my previous command could ignore the hidden files(e.g: .<filename>)
  • Exit info is only checked if fuzzing with an apk, else we ignore this

Tests

  • Introduces a ton of unit tests for the non apk test cases
    Fuzzing is correctly executed on valid APKS:
image

And it continues to fail on invalid apks.

@IvanBM18
IvanBM18 requested a review from dylanjew September 15, 2026 20:15

@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

Comment thread src/clusterfuzz/_internal/platforms/android/app.py
Comment thread src/clusterfuzz/_internal/tests/core/platforms/android/device_test.py Outdated
@IvanBM18
IvanBM18 marked this pull request as ready for review September 15, 2026 23:28
@IvanBM18
IvanBM18 requested a review from a team as a code owner September 15, 2026 23:28
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.

2 participants