Guide

How to scan your Android release build before you publish it

Check the exact APK you are about to ship, privately, before it reaches Google Play: which build to scan, how to get an APK from an AAB, what to compare, and how to gate CI on it.

Last updated 2026-11-26

Short answer: Scan the release build, not a debug build, because debug builds carry a debug certificate and the debuggable flag. Build it the way you ship it, convert an AAB to a universal APK with bundletool, and upload it privately. Then compare the result with the version already on Play, and if you want it on every build, run the same check in CI and fail on new high-severity findings.

Read in context. These instructions need to be adapted to your app and platform version. New scans provide static detections; they do not establish current backend access. Current methodology.

Why check the build, not the source

Source review and linters see your code. They do not see what the release build actually contains: SDKs pulled in by a dependency bump, keys injected by a build variant, resources from a flavour you forgot was enabled, or a manifest merged from a library. The APK is what users install, so it is the thing to check. It is also the last point where a problem costs nothing to fix.

1. Build it the way you ship it

  • Use the release variant. A debug build is signed with the public Android debug key and is usually debuggable, so a scan of it reports problems your release build may not have, and misses the ones only the release build has (R8/ProGuard output, release-only config).
  • Use the same flavour and build type your store listing gets. If you ship several flavours, check each one you publish.
  • Sign it with your release (or upload) key. Signing findings describe the certificate on the file you upload.

2. If you build an AAB, make a universal APK

Google Play takes an Android App Bundle (.aab) and generates the APKs users install. A bundle is not an installable APK, so convert it with Google's bundletool, signing with the same key you use for the bundle:

bundletool build-apks --bundle=app-release.aab --output=app.apks \
  --mode=universal --ks=release.jks --ks-key-alias=release
unzip -p app.apks universal.apk > app-release-universal.apk

The universal APK contains every module and resource configuration in one file, so it is a superset of what any single device receives. That is what you want for a pre-release check.

A note on Play App Signing. If Google signs your app for you, the certificate users see is Google's app-signing key, not the upload key on your local build. A signing finding on the local file is about your upload key; the released app's certificate is visible on its public report once it is on Play.

3. Scan it privately

Sign in and upload the APK from the scan form. Uploads are private to your account and get an upload.… identity rather than a public report, so nothing about an unreleased build appears on a public page. Free accounts have 3 scan attempts a day; files up to 150 MB are accepted. The uploaded file is deleted once the scan finishes; the report is kept in your account.

4. Compare it with what is already live

The useful question before release is usually what changed, not what is there. Open the public report for your package, which reflects the version on Play (if it has not been scanned yet, enter the package name in the scan form), and compare it with the private scan of the new build:

  • New SDKs or trackers. A new ad, analytics or attribution SDK changes what your Data Safety form should say, and matters more if the app is used by children.
  • New findings. A key, endpoint or exported component that was not in the live build is a regression introduced by this release.
  • Signing and manifest changes. A changed signature scheme, a new permission, or cleartext traffic newly allowed are all easy to miss in a large diff.
  • Coverage. Check that the analysis completed on both. A finding missing from one scan is only meaningful if that scan covered the same stages.

5. Make it automatic

A check you remember to run before some releases is weaker than one that runs on every build. The API takes the same upload from CI, and the GitHub Action wraps it: it uploads the built APK, writes SARIF for GitHub code scanning, and fails the job when a finding at or above the severity you choose is present. API access needs a Pro plan.

- name: apk-scanner gate
  uses: ./.github/actions/apk-scanner
  with:
    api-key: ${{ secrets.APK_SCANNER_API_KEY }}
    apk-path: app/build/outputs/apk/release/app-release.apk
    fail-on: high

Start with fail-on: high so the gate blocks real regressions without failing on long-standing low-severity findings, and tighten it once the existing ones are dealt with.

What a clean pre-release scan does and does not tell you

apk-scanner.com provides static findings, build details and analysis coverage. It reads the package; it does not run the app, log in, or exercise your backend, so authentication logic, server-side access rules and runtime behaviour need their own testing. Review the current methodology and each report’s limitations. For what to look for in the findings themselves, use the pre-release security checklist.

Frequently asked questions

Can I scan an .aab file directly?

Upload an APK. An App Bundle is not an installable package, so convert it with bundletool build-apks --mode=universal and scan the universal APK, which contains every module and configuration.

Will scanning my unreleased build make it public?

No. Uploads are private to your account and are given an upload.… identity, not a public report or badge. Public reports cover apps as published on Google Play.

Should I scan the debug build to save time?

No. Debug builds use the public debug certificate and are usually debuggable, so the results describe a build you will never ship. Scan the release variant.

How do I see what changed since the last release?

Compare the private scan of the new build with the public report for your package, which reflects the version on Google Play: new SDKs, new findings, and signing or permission changes are the things to look for.