Android App Signing: Complete Guide

Android app signing uses a cryptographic signing key and certificate to establish the identity of an application and protect the integrity of its APK or app bundle. Unlike Windows code signing, ordinary Android app signing does not normally require a publicly trusted CA-issued code signing certificate.

Target keyword: “Android code signing certificate” can be misleading. Android's signing model centers on an application signing key and its associated certificate, not the conventional public-CA code signing model used for many desktop software ecosystems.

What is an Android signing certificate?

An Android signing certificate is the public certificate associated with an application's signing key. It contains the public key and identifies the signing identity that Android uses when evaluating an application's signature.

The critical secret is the private signing key. The certificate is public information that helps identify and verify the corresponding key. For ordinary Android app signing, the certificate does not need to be issued by a public Certificate Authority in the same way that a traditional Windows code signing certificate often is.

This difference is important when someone searches for an “Android code signing certificate.” Buying a conventional public code signing certificate is not normally the requirement for signing an Android application.

Android app signing at a glance

The application, signing key, certificate, signed artifact, and Android verification process form one identity chain. The underlying cryptographic model is described by how code signing works.

01

Android app

The application is built into an APK or another release artifact.

02

Signing key

The developer or organization controls the private signing key.

03

Signature + certificate

The artifact is signed and associated with the signer's public certificate.

04

Signed package

The release contains the signing information required for verification.

05

Android verifies

Android evaluates integrity, signer identity, and update authorization.

Android signing certificate vs traditional code signing certificate

This distinction is one of the most important parts of the Android signing model.

AspectAndroid app signingTraditional public code signing
Typical artifactAPK or Android application releaseEXE, DLL, MSI, and other supported software artifacts
Signing keyControlled by the developer or organizationControlled by the developer or organization
Certificate issuerCan be developer-generated/self-signed for ordinary app signingCommonly a public Certificate Authority
Public CA trustNot normally required for the application signing identityOften part of the publisher trust model
Primary identity modelApplication signing key and certificatePublisher identity plus certificate chain and platform trust
Main security propertyApplication integrity and signer continuitySoftware integrity and publisher identity/trust
Key loss impactPotentially severe because updates depend on signing identitySevere for future software signing, with platform-specific recovery options

Why does Android require app signing?

Integrity

Signing gives Android cryptographic evidence that the application has not been altered outside the rules of its signing scheme and package format.

A modified package may no longer satisfy the expected signature relationship, allowing the platform or tooling to detect the change.

Signer identity and continuity

The signing identity associates an application with its signer. That identity also matters when Android determines whether a new version is authorized to update an already installed application.

This makes signing-key continuity a central Android release-management concern. Code signing trust explains the broader role of signer identity in software distribution.

How Android app signing works

A normal release process moves from source code to a signed artifact and then through distribution and device verification.

STEP 1

Build

Compile and package the application into the intended release artifact.

STEP 2

Access key

Load or access the protected private signing key.

STEP 3

Sign

Create the digital signature using the application's signing identity.

STEP 4

Distribute

Upload or distribute the signed release through the selected channel.

STEP 5

Verify

Android and release tooling evaluate the package signature and signer information.

APK vs AAB: what gets signed?

APK

An APK is an installable Android application package. Release APKs are signed so Android can verify the package's signing information and identity.

APK signing is also the context in which tools such as apksigner are commonly used for signing and verification.

Android App Bundle

An AAB is a publishing format used in distribution workflows such as Google Play. The distribution process can produce APKs for individual devices.

Developers therefore need to distinguish the artifact they build and upload from the APKs ultimately delivered to users.

What is Google Play App Signing?

Google Play App Signing changes where the key used to sign APKs delivered to users is controlled. The developer can upload a release using an upload key, while Google Play manages the app signing key used for distributed APKs in the Play App Signing model.

Developer
Build + upload key
→
Google Play
App signing key + distribution
DeveloperBuilds the application
Upload keyAuthenticates release upload
Play signingSigns distributed APKs
Android deviceVerifies the delivered package

This is why an upload key and an app signing key are not necessarily the same key.

Upload key vs app signing key

KeyPurposeWhy it matters
Upload keyAuthenticates the developer's release upload to Google Play.Loss can create an upload authentication problem. A replacement process may be available.
App signing keySigns the APKs distributed to users in the Play App Signing model.It is tied much more directly to the application's distributed signing identity and update continuity.

The exact recovery and upgrade options depend on the Google Play signing configuration. Do not treat an upload-key incident and an app-signing-key incident as the same problem.

Android Keystore and signing keys

Android signing workflows commonly use a keystore to store and manage key material. A keystore can contain key pairs and associated certificates, while an alias identifies a particular entry.

Signing material

  • Key pair
  • Private key
  • Public key
  • Certificate
  • Alias

Protection layer

  • Keystore storage
  • Password or credential protection
  • Controlled access
  • Secure backups
  • CI/CD secret management

Code signing key protection standards address a related concern. Keystore protection and certificate identity are different concerns.

How to generate an Android signing key

The conceptual process is simple, but the security of the resulting key is critical because the application's future release identity may depend on it.

01

Generate key pair

Create the private and public keys for the signing identity.

02

Create certificate

Associate the public key with certificate information.

03

Protect storage

Secure the keystore, alias, passwords, and backups.

04

Configure build

Connect the release signing configuration to the correct key.

05

Verify release

Confirm the resulting artifact has the intended signer identity.

Common tools in this workflow include keytool, Android Studio, Gradle, and apksigner. This page focuses on the signing model rather than turning each tool into a separate command reference.

Android apksigner

apksigner is a command-line tool used to sign APKs and verify their signatures. Its value is not simply that it produces a signed file. It can also help determine whether the resulting APK has the expected signing status and scheme information.

Android release terminal
$ apksigner sign --ks my-release-key.jks app-release.apk
$ apksigner verify --verbose app-release.apk
Verified using v1 scheme: true
Verified using v2 scheme: true
Verified using v3 scheme: true
Signer certificate information: available for inspection

Use the result to inspect the actual release artifact rather than assuming that a build succeeded means the intended signing identity was applied. The wider code signature verification process also applies across software formats.

Android APK signature schemes

Android has evolved its APK signing mechanisms over time. The major schemes commonly encountered are v1, v2, v3, and v4.

SchemeBroad modelWhy it matters
v1JAR-based signing model.Older compatibility model that signs ZIP/JAR entries.
v2APK-level integrity model using the APK Signing Block.Provides stronger coverage of APK contents than the older entry-based model.
v3Builds on APK signing with support for additional signer/key capabilities.Relevant to modern Android signing and key rotation scenarios.
v4Designed for a different verification/use case involving incremental installation.Its role differs from simply replacing v1 with a newer APK signature format.

The correct scheme combination depends on the Android versions, distribution path, and release requirements being supported. Developers should not assume that one scheme is universally appropriate for every target.

Why APK Signature Scheme v2 and later matter

v1 model

The original model is based around signing ZIP/JAR entries. This can verify signed entries, but it does not provide the same broad APK-level coverage introduced by later schemes.

v2+ model

Later schemes use the APK Signing Block and can verify the APK more broadly. This gives Android a stronger mechanism for detecting changes to the package as a whole.

How Android verifies an APK

01

Signature scheme

Determine which APK signing mechanism is present and applicable.

02

Signing certificate

Inspect the certificate associated with the signer.

03

Public key

Use the public key to validate the corresponding signature.

04

APK integrity

Determine whether the signed package contents satisfy the signature scheme.

05

Signer identity

Identify the signing identity represented by the package.

06

Installed app compatibility

Compare the release with the identity of an existing installation when relevant.

07

Update authorization

Determine whether the new package satisfies Android's signer/update rules.

Core difference from Windows: Android app signing trust is primarily based on the application's signing identity and continuity, not on a public CA trust chain.

Android app updates and signing identity

Signing is not only about protecting a single APK. It is also part of the application's long-term identity.

Existing appInstalled with signing identity A
New releaseNew package is prepared
Signer checkAndroid evaluates identity continuity
Update resultAccepted only when update rules are satisfied

If a release is signed with an unrelated identity, Android can treat it as a different signing identity rather than as an authorized update to the installed application. This is why signing-key management must be planned before production distribution.

What happens if you lose the Android signing key?

Key loss and upload-credential loss are not the same event. The impact depends on which key is lost and whether Google Play App Signing is being used.

Lost credentialPotential consequenceKey question
Upload keyRelease upload authentication can fail.Is the application using Google Play App Signing, and can the upload credential be replaced through the supported process?
App signing keyPotentially much more serious because the key is tied to the distributed application signing identity.What signing-key management and recovery options apply to the application's current Play configuration?

For applications distributed outside Google Play, the consequences also depend on how the application is distributed and what signing identity the update mechanism expects.

What happens if an Android signing key is compromised?

Compromise is different from simple loss because an unauthorized party may have access to the secret key. That can potentially allow creation of packages that cryptographically identify with the same signing identity.

01

Contain

Stop unauthorized use and determine whether the key is still exposed.

02

Scope

Identify affected applications, releases, build systems, and credentials.

03

Recover

Use the applicable Android or Google Play key-management and recovery mechanisms.

04

Reconfigure

Update protected signing infrastructure and authorized release processes.

05

Investigate

Review potentially unauthorized builds and signing activity.

A compromised signing key can undermine release integrity; the code signing private key compromise scenario explains the wider risks.

Does an Android signing certificate expire?

Android's application signing model should not be interpreted through the same expiration model used for conventional publicly trusted code signing certificates.

The central operational concern is generally the signing key and application signing identity, rather than simply whether a public certificate has reached an expiration date. Developers still need to manage certificate metadata and signing configurations correctly, but “certificate renewal” is not normally the main Android app-signing lifecycle operation.

Android signing certificate renewal vs key rotation

Certificate renewal

A conventional certificate lifecycle operation in which a certificate is replaced or reissued while the underlying identity and intended purpose remain part of a certificate-management process.

Key rotation or upgrade

A change involving signing key material and potentially the application's signing identity. Android and Google Play provide platform-specific mechanisms for supported key upgrades and rotation scenarios.

Do not use these terms interchangeably. An Android key-management event can have update and distribution consequences that are very different from renewing a conventional CA-issued software certificate.

Android key rotation and upgrade

Key changes may become necessary because of a security incident, cryptographic migration, organizational change, or a supported platform key-upgrade process. The exact mechanism depends on the application's distribution model.

Current keyExisting application identity
Rotation planDetermine supported transition path
New keyProtected replacement signing material
ContinuityPreserve supported update behavior

Key rotation, certificate renewal, and compromise recovery are three different operational events. A production Android team should document which event it is handling before changing signing configuration.

Android app signing with Google Play

01

Developer

Build the release artifact and prepare the required upload credentials.

02

Upload

Authenticate the release submission using the upload-key model.

03

Google Play

Apply the configured Play App Signing workflow.

04

Distributed APK

Users receive the APK produced for their distribution context.

05

Android device

The platform verifies the delivered package and signer information.

The key point is that the developer's upload credential and the key used to sign distributed APKs can have different roles.

Android app signing with Gradle

Gradle connects the build process to release signing configuration. A release build can reference a signing configuration that identifies the appropriate keystore and key entry.

Common configuration concepts

  • signingConfigs
  • Release build type
  • Keystore reference
  • Key alias
  • Protected credentials

What not to do

  • Do not commit private signing keys to source control.
  • Do not hard-code keystore passwords into public build files.
  • Do not give every build agent unrestricted access to production signing material.

Android code signing in CI/CD

Automated Android releases turn signing into a credential-management problem as much as a build problem. The pipeline should be able to produce a repeatable signed artifact without exposing the production signing key to unnecessary systems or people.

01

Source

Commit enters the controlled release pipeline.

02

Build + test

Generate and validate the release artifact before signing.

03

Sign

Access protected signing material only at the required stage.

04

Verify

Confirm signer identity and signature status on the final artifact.

05

Upload

Send the verified release through the configured distribution workflow.

Pipeline controls

Use secret management, restricted build-agent access, protected keystores, separate upload credentials, audit logs, and hardware-backed or remote signing where the environment warrants it.

Android signing with HSM or hardware-backed keys

Hardware-backed key protection can reduce direct exposure of private signing material. The implementation should match the Android signing workflow and the infrastructure available to the organization.

Build system
Release artifact
→
Protected signer
HSM / hardware-backed / remote signing

The goal is not simply to move a keystore somewhere else. Private key protection should cover access, storage, signing operations, and recovery.

How to verify an Android app signature

Use apksigner

Run verification against the actual release APK and inspect the reported signature schemes and signer information.

$ apksigner verify --verbose app-release.apk
Verification result: successful

Inspect the application identity

Review the signing certificate and fingerprints associated with the package. For Play-distributed applications, remember that the distributed signing identity can differ from the developer's upload key.

How to find an Android app's signing certificate

The signing certificate can be inspected from the APK's signing information. Useful fields include the certificate, public key, signer identity, and certificate fingerprints.

InformationWhat it represents
CertificatePublic certificate associated with the signing identity.
SHA-256 fingerprintA compact digest used to identify the certificate in integrations and configuration.
SHA-1 fingerprintAn older fingerprint format that may still appear in legacy integrations.
Public keyPublic cryptographic key corresponding to the private signing key.
Signer identityThe application signing identity represented by the package.

A fingerprint is not a private key. It is derived from certificate information and can be shared for identification purposes. It cannot be used as a replacement for the protected signing secret.

Android signing certificate fingerprints

Developers commonly encounter SHA-256 and SHA-1 fingerprints when configuring Android integrations. A fingerprint is an identifier for certificate material, not the digital signature itself.

SHA-256

Modern security workflows commonly prefer SHA-256 for certificate fingerprint identification.

It may appear in API, OAuth-related, Firebase, Google service, or application-identity configuration.

SHA-1

SHA-1 fingerprints still appear in older documentation and legacy integrations. Their continued appearance does not make SHA-1 equivalent to a modern cryptographic signing algorithm.

Common Android signing errors

Failure areaExamplesTypical direction
KeyKeystore not found, wrong password, alias not found, private key unavailable.Check the selected keystore, alias, credentials, and build-agent access.
SignatureAPK signature invalid, package modified, unsupported signing scheme.Inspect the final artifact with apksigner and confirm the signing configuration.
UpdateCertificate mismatch, app cannot be updated, different signing identity.Compare the installed application's signer with the new release.
Google PlayUpload key problem, app signing mismatch, release signing configuration issue.Determine whether the failing credential is the upload key or the app signing key.
CI/CDMissing keystore, unavailable secret, wrong configuration, build agent cannot access key.Trace secret injection and signing configuration through the pipeline.

How to troubleshoot Android signing problems

01

Identify artifact

Determine whether the problem concerns an APK, AAB workflow, or another release artifact.

02

Identify key

Confirm which signing key and certificate the build actually uses.

03

Check fingerprint

Compare the resulting certificate fingerprint with the expected identity.

04

Verify APK

Use apksigner to inspect signature verification and scheme information.

05

Check update path

Determine whether the problem is installation, update continuity, or Google Play upload.

For Play releases: determine whether Google Play App Signing is involved, then identify whether the failing credential is the upload key or the app signing key.

Android signing security best practices

Protect the identity

  • Protect the app signing key.
  • Back up signing credentials securely.
  • Never commit keystores or passwords to source control.
  • Restrict production signing access.
  • Document the application's signing identity.

Protect the release process

  • Separate upload credentials from app signing credentials.
  • Use Google Play App Signing where appropriate.
  • Secure CI/CD signing environments.
  • Monitor signing-key access.
  • Verify release artifacts before distribution.
  • Plan for key loss and compromise.

Android signing vs Windows code signing

AspectAndroidWindows
Main signing modelApplication signing key and certificateMicrosoft Authenticode
Public CA requiredGenerally no for ordinary app signingPublic CA trust is commonly part of the publisher model
Trust modelApplication signer identity and continuityPublisher identity, certificate chain, and platform trust
Update continuityCritical to application identityImportant but governed by a different platform model
Main artifactAPK / Android distribution artifactsEXE, DLL, MSI, and other supported Windows artifacts
Primary toolsapksigner, Gradle, Android toolingSignTool and Windows verification tools
Certificate renewalNot the normal central lifecycle modelCommon certificate-management operation
TimestampingDifferent application-signing modelCommon in traditional software signing workflows

Common misconceptions

“I need to buy a public code signing certificate for Android.”
Reality: Normally no. Ordinary Android app signing centers on the application's signing key and certificate.
“Android trusts the certificate because a public CA issued it.”
Reality: Android app signing primarily uses the application's signing identity and continuity.
“The upload key and app signing key are the same.”
Reality: Not necessarily. Google Play App Signing can separate those roles.
“Losing the upload key permanently destroys the app.”
Reality: Upload-key loss and app-signing-key loss have different consequences and recovery paths.
“An Android signing certificate works like a Windows Authenticode certificate.”
Reality: The certificate and trust models are different.
“The SHA-256 fingerprint is the private key.”
Reality: A fingerprint identifies certificate material. It is not the secret signing key.
“Signing an APK encrypts it.”
Reality: Signing provides integrity and signer identity evidence. It is not encryption.
“A signed APK is automatically safe.”
Reality: A valid signature does not prove that the application is free of malicious or undesirable behavior.
“Changing the signing key is just certificate renewal.”
Reality: Key changes can affect application identity and update continuity.
“An APK can always update an installed app.”
Reality: Android applies signer and update-authorization rules.

Android signing implementation

Use the implementation resources to plan a controlled signing workflow.

Automate code signing in CI/CD →Code signing implementation →

FAQ

What is an Android code signing certificate?

It is commonly used to describe the certificate associated with an Android application's signing key. Android ordinary app signing does not normally require a publicly trusted CA-issued code signing certificate.

Does Android require a code signing certificate?

Android applications are signed with an application signing key, with an associated certificate used to represent the public signing identity. The certificate does not normally need public CA trust for ordinary app signing.

Do I need to buy an Android code signing certificate?

Normally no. Android app signing is based on developer-controlled signing keys and certificates rather than the conventional public-CA software certificate model.

How does Android app signing work?

The application is built, signed with a protected private key, packaged with the required signing information, distributed, and then verified by Android and relevant release tooling.

What is an Android signing key?

It is the cryptographic key material used to sign an Android application. The private key is the secret component that must be protected.

What is the difference between an Android certificate and signing key?

The certificate contains public information including the public key and signer identity information. The private signing key is secret and is used to create the signature.

What is an upload key?

In the Google Play App Signing model, the upload key is used to authenticate the developer's release upload to Google Play.

What is an app signing key?

It is the key used to sign APKs distributed to users in the Google Play App Signing model, and it is tied closely to the application's distributed signing identity.

What is Google Play App Signing?

It is a Google Play release model in which Google manages the app signing key used for distributed APKs, while developers can use a separate upload key for release submission.

How do I sign an APK?

Build the APK, configure the appropriate signing key, sign the release artifact with Android signing tooling, and verify the final package before distribution.

How do I verify an APK signature?

Use apksigner verification against the actual APK and inspect the resulting signature and signer information.

What is apksigner?

apksigner is a command-line Android tool used to sign APKs and verify their signatures.

What are APK Signature Schemes v1, v2, v3 and v4?

They are successive Android APK signing mechanisms with different signing and verification models. v1 is the older JAR-based model, while v2 and later introduce broader APK-level signing mechanisms and additional capabilities.

What happens if I lose my Android signing key?

The impact depends on which key was lost and the distribution model. Losing an app signing key can be much more serious than losing an upload key because application update identity depends on signing continuity.

What happens if my Android signing key is compromised?

A compromised private key can potentially be used to create unauthorized packages with the same signing identity. The response should include containment, scope assessment, supported key recovery or replacement, and investigation.

Can an Android signing key be rotated?

Supported key rotation or upgrade mechanisms exist in relevant Android and Google Play workflows. The exact process depends on the application's configuration and distribution model.

Does an Android signing certificate expire?

Android application signing is not centered on the same expiration-driven public certificate trust model used for conventional desktop code signing.

Do I need to renew an Android signing certificate?

Android app signing is not normally handled as a traditional CA certificate-renewal process. Developers primarily manage signing keys, application identity, upload keys, Play App Signing, and supported key upgrades.

What is an Android signing certificate fingerprint?

It is a compact digest used to identify certificate material, often for application or service configuration.

What is the difference between SHA-1 and SHA-256 fingerprints?

They are different digest formats used to identify certificate material. SHA-256 is the modern preferred fingerprint format, while SHA-1 may still appear in legacy integrations.

Why can't I update my Android app after changing the signing key?

The new release may not satisfy Android's signer/update rules for the installed application's signing identity. Compare the installed and new package signing identities.

How does Android signing work in CI/CD?

The pipeline builds and tests the release, accesses protected signing material at the signing stage, verifies the final artifact, and uploads it through the configured distribution workflow. Signing secrets should be tightly controlled.

Related code signing resources

Explore these related topics for platform requirements, release verification, and troubleshooting.

Code signing requirements by platformCompare signing requirements across software environments.
Sign software before deploymentPlace signing and verification controls in the release process.
Code signing errorsInvestigate signing failures and verification problems.

Secure automated releases

Automate signing while keeping production credentials under control.

Explore Code Signing Resources → CI/CD code signing workflow →

Need help with release signing?

Discuss your signing and release workflow requirements with the team.

Contact the team →Contact →