DEV Community

Android Apps That Fail Security Review: Keystore, API Secrets, and Play Integrity

Google announced global Android developer verification starting January 2027. Yet verified developers can still ship insecure apps.

The uncomfortable truth? Your Android app can pass Google Play review, satisfy functional tests, and still expose production credentials. Developer verification cannot fix insecure architecture.

Why Do Android Apps Fail Security Reviews in 2026?

Android apps fail enterprise security reviews when sensitive information, cryptographic keys, API credentials, or authorization decisions are inadequately protected. Modern Android application development requires security across three boundaries: device storage, backend infrastructure, and runtime integrity.

Passing Google Play review is not equivalent to passing an enterprise penetration test or an OWASP security assessment.

Security failure Root cause Business impact
Insecure Keystore implementation Weak key management Sensitive data exposure
Hardcoded API secrets Client-side credentials Unauthorized API usage
Broken Play Integrity validation Client-side trust decisions Fraud and application abuse
Weak backend authorization Missing access controls Unauthorized data access
Insecure token storage Plaintext persistence Account compromise

If your release pipeline tests functionality but ignores these boundaries, your security coverage is incomplete.

1. Android Keystore: Encryption Without Proper Key Management Is Not Enough

What does Android Keystore actually protect? Android Keystore protects cryptographic key material against extraction and allows developers to restrict how keys are used. Supported devices can provide hardware-backed protection through a Trusted Execution Environment or StrongBox.

However, Keystore does not automatically encrypt application databases, protect arbitrary API credentials, or prevent compromised application processes from misusing authorized cryptographic operations.

Why Android Keystore implementations fail security audits. Common implementation mistakes include:

  • Hardcoding AES encryption keys.
  • Storing encryption keys alongside encrypted data.
  • Reusing initialization vectors with AES-GCM.
  • Assuming every Android device supports StrongBox.
  • Ignoring key invalidation and recovery scenarios.
  • Including sensitive encrypted files in incompatible backup flows.

Kotlin: Generate an Android Keystore-backed AES key

val generator = KeyGenerator
  .getInstance(KeyProperties.KEY_ALGORITHM_AES, "AndroidKeyStore")
generator.init(KeyGenParameterSpec.Builder(
  "app_data_key_v1",
  KeyProperties.PURPOSE_ENCRYPT or KeyProperties.PURPOSE_DECRYPT)
  .setBlockModes(KeyProperties.BLOCK_MODE_GCM)
  .setEncryptionPaddings(KeyProperties.ENCRYPTION_PADDING_NONE)
  .setKeySize(256)
  .build())
val secretKey = generator.generateKey()

This illustrative Kotlin implementation generates a Keystore-managed AES key on supported Android versions. Production implementations should retrieve existing keys when appropriate, generate fresh IVs during encryption, and handle key invalidation safely.

Verify hardware backing using KeyInfo rather than assuming it. Reference: Android Keystore documentation.

Stop blindly recommending EncryptedSharedPreferences. AndroidX has deprecated EncryptedSharedPreferences and its related Security Crypto APIs. Existing applications need a controlled migration strategy rather than simply replacing encrypted preferences with plaintext storage.

For older Android applications, application modernization services can address outdated storage mechanisms without requiring a complete product rewrite.

2. API Secrets: Your APK Is Not a Secret Vault

Can API keys be securely hidden inside Android apps? Privileged API secrets cannot be reliably hidden inside distributed Android applications. Credentials embedded in Kotlin code, BuildConfig, native libraries, or encrypted resources remain exposed to extraction or runtime inspection.

Sensitive third-party credentials should stay on trusted backend infrastructure, while mobile clients use authenticated requests, limited permissions, and short-lived access tokens where appropriate.

Moving credentials into local.properties protects them from accidental source control exposure. It does not protect credentials compiled into the final APK. Neither does R8 obfuscation.

Not all API keys are secrets:

Credential Recommended location
Restricted Google Maps API key Android client, with supported restrictions
AI model provider secret key Backend
Payment provider secret key Backend
Database administrator credentials Backend
OAuth public client ID Android client
User refresh token Protected device storage

Public client identifiers and privileged credentials require fundamentally different security controls.

A safer architecture for Android API security:

Android application | Authenticated HTTPS request | Backend API gateway | Authorization + rate limiting | Server-side secret manager | Third-party API / AI model

The backend must independently verify the user's identity, permissions, and requested resource. For AI-enabled mobile applications, trustworthy ai security services become particularly relevant when protecting model credentials, sensitive user prompts, and enterprise data.

What should you do if a production API secret is exposed?

  1. Revoke or rotate the exposed credential.
  2. Review usage logs for unauthorized activity.
  3. Move privileged operations to the backend.
  4. Remove the credential from future builds.
  5. Scan the final release artifact.

Publishing a patched APK without revoking the compromised credential is insufficient. Reference: OWASP mobile security - hardcoded sensitive data.

3. Play Integrity API: Integration Does Not Equal Protection

Why does Play Integrity fail security reviews? Play Integrity implementations fail security reviews when applications collect integrity tokens but do not validate them correctly on trusted servers. Secure implementations verify the Google-decoded verdict, expected application identity, request binding, freshness, and relevant integrity signals before authorizing sensitive operations.

Play Integrity reduces application abuse but cannot replace user authentication, backend authorization, or transaction-level security controls.

What should the backend verify?

Integrity signal Verification objective
requestHash Bind the verdict to the intended request
timestampMillis Confirm acceptable request freshness
appRecognitionVerdict Assess application authenticity
appLicensingVerdict Evaluate Google Play licensing
deviceRecognitionVerdict Evaluate device integrity

For standard requests, Google provides replay protection. Developers must still verify request binding and prevent duplicate business transactions independently.

Recommended Play Integrity architecture:

Android app requests integrity token | App sends token + business request | Backend requests Google token decoding | Backend validates verdict and request | Backend independently checks authorization | Allow / restrict / reject

Illustrative backend enforcement policy:

if not valid_request_binding:
  deny()
elif not authorized_user:
  deny()
elif high_risk_action and not acceptable_integrity:
  restrict_or_deny()
else:
  process_authorized_request()

Actual enforcement must also account for token freshness, application identity, errors, and distribution requirements.

Should you block every device that fails strong integrity? Not automatically. A blanket MEETS_STRONG_INTEGRITY requirement can exclude legitimate users. Google recommends collecting telemetry before enforcement and applying different security requirements according to transaction risk.

Application action / Example enforcement:

  • Public content browsing / Monitor
  • Account login / Risk assessment
  • Profile changes / Additional verification
  • Financial transactions / Strict integrity policy
  • Sensitive data export / Strict authorization and integrity checks

References: Play Integrity standard requests and Google's integrity enforcement guidance.

4. Android Application Development: Quokka Labs Release Audit Checklist

Quokka Labs, an Ai native engineering company with 15+ years of engineering expertise, recommends evaluating release readiness using verifiable security evidence rather than completed implementation tickets. Use this checklist before approving your next Android release.

Audit control Required evidence Suggested priority
Keystore key management Key configuration and storage tests High
Privileged API secrets Clean release artifact scan Critical
Sensitive data storage Runtime storage inspection High
Play Integrity Backend validation tests High
API authorization Unauthorized request rejection Critical
Production logging No sensitive data exposure High
Signing configuration Protected signing credentials Critical
Dependencies Vulnerability assessment Risk-based
Backup security Backup and restoration tests High
Credential recovery Tested revocation procedure High

Recommended release rule: Unresolved critical vulnerabilities block deployment. High-risk findings require remediation or documented security approval.

Tools developers can use before release:

  • JADX: Inspect compiled Android applications.
  • MobSF: Perform mobile security assessments.
  • Gitleaks: Detect exposed repository credentials.
  • Android Studio Lint: Identify code-level security issues.
  • OWASP MASTG: Perform structured mobile security testing.

Scan both source code and distributed release artifacts. A clean repository scan alone does not establish that the APK is secure.

5. What Should Enterprises Expect From an Android App Development Company?

Enterprises searching for an android app development company usa should prioritize demonstrated security controls over feature delivery alone. Ask your engineering partner to provide:

  • Threat models covering mobile and backend boundaries.
  • OWASP MASVS-aligned assessment results.
  • Release artifact scanning reports.
  • Server-side integrity validation tests.
  • Credential rotation and incident response procedures.

Organizations procuring custom ios application development services should demand equivalent protection through iOS Keychain, App Attest where appropriate, and backend authorization. Security requirements should remain consistent across platforms, even when their implementations differ.

Frequently Asked Questions

Is Play Integrity mandatory for every Android application?

No. Play Integrity is not a universal Google Play publishing requirement. Its implementation should reflect application risk, distribution requirements, and applicable policies.

Can ProGuard or R8 protect Android API secrets?

No. Obfuscation increases reverse-engineering difficulty but does not establish a secure boundary for privileged credentials.

Is Android Keystore always hardware-backed?

No. Hardware protection depends on device capabilities, key configuration, and supported cryptographic operations.

What security standard should Android developers follow?

The OWASP Mobile Application Security Verification Standard (MASVS) provides a structured foundation for mobile storage, cryptography, authentication, networking, and resilience assessments.

When should enterprises perform Android security audits?

Before major releases, after significant authentication or infrastructure changes, and whenever credential exposure or other serious vulnerabilities are identified.

Final Thoughts: Security Must Be a Release Gate

Android security is not established by encryption libraries, obfuscation, or a successful Play Store submission. It requires evidence that credentials remain protected, backend authorization works, and integrity signals influence sensitive operations correctly.

Quokka Labs combines Android application development, security engineering, and Ai Native Engineering services to help enterprises build and modernize production-ready mobile systems. Preparing an Android release for 2027? Connect with Quokka Labs to discuss security assessment and remediation before deployment.

DEV community question: If you audited your production APK today, which would concern you most: Keystore configuration, exposed API secrets, or backend Play Integrity validation? Share your experience in the comments.

Read on DEV Community ↗ ← Back to News

Comments

No comments yet. Start the discussion.