Skip to content

Enhancement/505760246/apk integration#5340

Draft
fernandofloresg wants to merge 54 commits into
masterfrom
enhancement/505760246/apk-integration
Draft

Enhancement/505760246/apk integration#5340
fernandofloresg wants to merge 54 commits into
masterfrom
enhancement/505760246/apk-integration

Conversation

@fernandofloresg

Copy link
Copy Markdown
Collaborator

No description provided.

fernandofloresg and others added 30 commits April 27, 2026 16:59
…nit, and configure real development GCS buckets
## Overview: 
This PR ensures that Android APKs are installed using the
`--no-streaming` flag during ASan fuzzing jobs. Modern Android versions
default to streaming installation, which prevents the bundled wrap.sh
script (responsible for setting up the ASan library environment) from
triggering correctly. This change dynamically detects ASan environments
and applies the `--no-streaming` workaround. We still left intact the
legacy `asan_device_setup.sh` logic in case any other `haiku` fuzzer job
depends on it

For more details for the `wrap.sh` script see the [NDK
doc](https://developer.android.com/ndk/guides/wrap-script) and the [ASan
docs](https://developer.android.com/ndk/guides/asan)

## Changes:

- `app.py`: Updated the install method signature to accept and forward
additional flags trough `**kwargs`.
- `device.py`: Added a private helper to identify ASan jobs or device
environments options, and to then pass the `--no-streaming` flag during
installation.
- Added new unit tests for this
… and quieting false-positive Trusty symbol downloader errors
… and quieting false-positive Trusty symbol downloader errors
This change adds a way to skip external region load queries
(`get_region_load`) when we only want to verify if a task is configured
to run remotely (e.g. via `is_remote_task` / `is_remote_utask`),
preventing unnecessary external calls and speed issues.

## Changes

### 1. Added `should_check_regions` Parameter to `_get_subconfig`
* **File:**
[service.py](file:///usr/local/google/home/javanlacerda/repos/clusterfuzz/src/clusterfuzz/_internal/batch/service.py)
* **Change:** Introduced an optional `should_check_regions` (defaulting
to `True`) argument. When it is `False` or no `queue_check_regions` are
configured, we skip checking region workloads entirely, log the reason
in a single consolidated log statement, and immediately return a
weighted subconfig.

### 2. Propagated in `_get_specs_from_config`
* **File:**
[service.py](file:///usr/local/google/home/javanlacerda/repos/clusterfuzz/src/clusterfuzz/_internal/batch/service.py)
* **Change:** Propagated `should_check_regions` to the `_get_subconfig`
helper.

### 3. Disabled Region Checks in `is_remote_task`
* **File:**
[service.py](file:///usr/local/google/home/javanlacerda/repos/clusterfuzz/src/clusterfuzz/_internal/batch/service.py)
* **Change:** Passed `should_check_regions=False` when calling
`_get_specs_from_config` inside `is_remote_task` since workload size
does not affect task remote configuration validation.

Signed-off-by: Javan Lacerda <javanlacerda@google.com>
The legacy Android Build API V3 (androidbuildinternal.googleapis.com) is being sunsetted. This CL migrates the client calls to the new V4 Private API (androidbuild-pa.googleapis.com) using standard discovery.

Changes:
- Added a 'use_android_build_api_v4' Datastore Config property to allow runtime feature toggle.
- Refactored 'fetch_artifact.py' to support V4 OnePlatform endpoint and resource names dynamically behind the feature flag.
- Migrated legacy logs to structured dictionary-based logs with '[AndroidBuildAPI]' tagging for easier Cloud Logging filtering.
…Runner for .apk targets and AndroidLibFuzzerRunner for binaries
… allow forcing a specific fuzzer target during preprocessing
…ore running instrumentation to guarantee native stdout write success
…data/ to bypass Android sandbox restrictions
…a/local/tmp and running with SELinux Permissive
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.

5 participants