# Android 16 KB APK/AAB Native Library Alignment Checker (`symmetrical_omelet_yit/android-native-alignment-preflight`) Actor

Find 16 KB ELF and APK ZIP alignment issues with exact native-library paths. Inspect your APK/AAB builds and export JSON, HTML and CSV reports. Includes a free fixed demo.

- **URL**: https://apify.com/symmetrical_omelet_yit/android-native-alignment-preflight.md
- **Developed by:** [Yigit Ibze](https://apify.com/symmetrical_omelet_yit) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Android 16 KB APK/AAB Native Library Alignment Checker

Find the native dependency or APK packaging detail that needs attention before
your Android release. Submit your own APK or AAB and get exact library paths,
ELF program-header evidence, separate packaging findings, and a readable report.

Useful for release engineers, mobile agencies, Flutter/React Native teams, and
automated build pipelines that need a structured API result without installing
Android native tools on the caller's machine.

**Free beta: no developer fee.** You pay only the normal Apify platform usage
for your runs. Developer earnings are currently off.

### Try the fixed demo

Run the prefilled input, or submit:

```json
{"demoMode": true}
```

The demo inspects two bundled synthetic packages: one aligned and one broken.
It generates zero `artifact-report` events. Custom URLs and non-default settings
are rejected in demo mode. Apify infrastructure charges may still apply.

### Inspect your build

```json
{
  "demoMode": false,
  "artifactUrl": "https://your-download-host.example/release.apk?SIGNED-URL",
  "artifactKind": "apk",
  "artifactLabel": "release-1.0",
  "packageScope": "standalone",
  "expectedAbis": ["arm64-v8a"]
}
```

Replace the illustrative URL with a direct public HTTPS or short-lived signed
download URL. Maximum input size: 200 MiB. The URL is a secret input field and
is never echoed to output or logs. Raw artifacts are deleted from temporary
storage after processing. Reports remain subject to your Apify retention settings.

Use `artifactKind: "auto"` for layout detection. Use `packageScope: "single_split"`
or `"unknown"` when the APK does not establish standalone package coverage.
Expected ABIs are optional caller-supplied expectations.

### Outputs

The dataset contains one complete report for your artifact, including:

- SHA-256, artifact byte count, tool/rule versions and observation time.
- Each native library's ABI, ELF class/machine and PT_LOAD segment values.
- Exact offending paths and zero-based program-header indices.
- Separate ELF and APK ZIP packaging statuses, scope and coverage limitations.
- Findings with code, severity, observed/expected evidence and source IDs.

Run storage also contains `REPORT_JSON`, `REPORT_HTML` and `FINDINGS_CSV`.
Download the readable HTML for review or use JSON to gate a CI workflow.
For example, `ELF_LOAD_ALIGNMENT_TOO_SMALL` identifies the offending segment;
`APK_ZIP_ALIGNMENT` identifies a stored library whose APK payload is misaligned.

### What the checks mean

`NO_FAILURES_FOUND` means no failure in performed static checks.
`CHECKS_FAILED` means a supported check found a problem.
`REVIEW_REQUIRED` means coverage or evidence needs review.
`ERROR` means a technical failure prevented inspection.
`NO_NATIVE_LIBRARIES_OBSERVED` describes only the submitted package.

APK checks cover native ELF evidence and stored ZIP payload alignment.
Compressed libraries have no direct ZIP alignment check. AAB libraries are
inspected, but final generated-APK packaging is `NOT_ASSESSED_AAB`.
32-bit policies remain separate from the 64-bit 16 KB alignment check.
Potential writable-page overlap with GNU_RELRO is a review finding.

Apps are never executed or repaired. Runtime behavior, signing, malware, Android
manifest semantics and Google Play acceptance are outside scope. Unknown/split
coverage never establishes whole-app compatibility. Android Studio, readelf and
zipalign are free local alternatives; this Actor provides hosted reports and API
integration. See [Android's official guidance](https://developer.android.com/guide/practices/page-sizes).

### Free beta pricing and failures

This beta has **no developer fee** for custom APK/AAB reports or the fixed demo.
Apify's normal compute, storage and other platform usage charges still apply,
including resources used by unsuccessful runs. Check the live Pricing tab and
set a maximum run cost before starting. Findings and HTML/CSV mirrors add no
developer fee.

Developer earnings are off while payout and paid pricing setup are deferred.
The stored billing fields describe report delivery; they do not mean that a paid
event is enabled. `REPORT_JSON` and `DELIVERY_LEDGER` hold the final delivery
state. Any future developer fee would be shown in the live Pricing tab before
it takes effect.

Archives are bounded to 800 MiB expanded, 20,000 entries and compression ratio
100\. Up to 5,000 findings are returned with truncation disclosed. Stored and
deflate compression are supported; encrypted archives, traversal, duplicates,
symlinks and global ZIP64 central directories are refused.

### Support

Provide a run ID, error/finding code, expected behavior and a minimal shareable
reproduction. Do not post private signed URLs in public issues. Static checks
should be followed by the platform's recommended runtime testing.

# Actor input Schema

## `demoMode` (type: `boolean`):

See two bundled examples: one aligned APK and one with a native-library issue. Turn this off to inspect your own build. The sample uses fixed settings; leave the other fields at their defaults.

## `artifactUrl` (type: `string`):

Paste a direct HTTPS download link or a short-lived signed URL. Required when the sample report is off. Maximum file size: 200 MiB. Your link is stored as a secret input and is never included in reports.

## `artifactLabel` (type: `string`):

Optional name to help you recognize this build in the report, for example release-1.0. Leave the default for the sample report. Do not include private identifiers.

## `artifactKind` (type: `string`):

Auto-detect works for most builds. Choose APK or AAB only if you want to require that format. Leave Auto-detect selected for the sample report.

## `packageScope` (type: `string`):

Choose Complete standalone APK only when the submitted file contains the whole standalone app. A single split cannot establish whole-app coverage. Leave Not sure selected if you do not know; AAB-generated APK packaging is not assessed.

## `expectedAbis` (type: `array`):

Optional: select the architectures your build should contain. Missing architectures are flagged for review. Leave empty to inspect only what is present, and for the sample report.

## Actor input object example

```json
{
  "demoMode": true,
  "artifactLabel": "artifact",
  "artifactKind": "auto",
  "packageScope": "unknown",
  "expectedAbis": []
}
```

# Actor output Schema

## `reports` (type: `string`):

No description

## `reportJson` (type: `string`):

No description

## `reportHtml` (type: `string`):

No description

## `findingsCsv` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "demoMode": true
};

// Run the Actor and wait for it to finish
const run = await client.actor("symmetrical_omelet_yit/android-native-alignment-preflight").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "demoMode": True }

# Run the Actor and wait for it to finish
run = client.actor("symmetrical_omelet_yit/android-native-alignment-preflight").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "demoMode": true
}' |
apify call symmetrical_omelet_yit/android-native-alignment-preflight --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,symmetrical_omelet_yit/android-native-alignment-preflight"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/Q2SL5txuvmxuoWkd6/builds/88IjXQMmoIuMxHxBU/openapi.json
