Attestation and Device Binding: How to Check They Hold

Which Play Integrity and key attestation fields your backend must verify, what a fully verified token still cannot tell you, and how to test the rest.

Attestation lets your backend check that a genuine copy of your app, on a certified Android device, answered a request you issued. Device binding ties an account to a key that cannot leave that device’s secure hardware. You check both in two steps: verify every relevant field of the token on your server, then test whether the abuse you care about still gets through, because a token that passes every check still cannot tell you which phone sent the request.

TL;DR

  • Covers: Which Play Integrity and key attestation fields your backend has to verify for an Android app, what each check blocks, and how to test the abuse itself against your backend.
  • Not covered here: iOS, which has its own mechanism, App Attest, and needs a separate article.
  • First step: Pick the outcome you want to prevent, such as fake sign-ups or a cloned app, and try to reach it against your staging backend with the protections switched on.

What Play Integrity and key attestation prove

The Play Integrity API gives your app a token that your server sends to Google. For standard requests, Google’s servers decrypt and verify it through the decodeIntegrityToken call and return a JSON verdict on three things: whether the app is the one Google Play distributes, whether the device is genuine and certified, and whether the user got the app from Play. Your server reads Google’s judgement and never sees a certificate chain.

Android key attestation works at the level of a single key. The app generates a key in the Android keystore and asks for its certificate chain. Each certificate is signed by the next one up, and the chain ends in a Google hardware attestation root. The first certificate describes the key and the device it lives on, including a security level: Software, TrustedEnvironment or StrongBox. Only the last two mean the key lives in hardware.

Device binding is built on key attestation. The private key is non-exportable, so an account bound to it is bound to that device’s hardware. But that protection covers the key alone: a session token or cookie your server issues after binding can be copied like any other bearer token, unless your server keeps asking the device to sign with the key.

Which fields does your backend have to verify?

Play Integrity (standard requests)

Check What it blocks
Send the token to Google’s decodeIntegrityToken from your server. Ignore any result the app reports about itself. A modified app that claims it passed.
requestPackageName is your package, and requestHash equals the hash your server recomputes from the request being authorized. A token captured on one call and attached to another.
timestampMillis falls inside a short window you set. A token stored and reused later.
appRecognitionVerdict is PLAY_RECOGNIZED and certificateSha256Digest matches your signing certificate. A repackaged or modified copy of your app.
deviceRecognitionVerdict contains the label you require: MEETS_DEVICE_INTEGRITY, or MEETS_STRONG_INTEGRITY for your riskiest actions. Rooted, uncertified or emulated devices.

The request hash is what binds the token to the specific request. Without it, the token is bound only to the device.

Key attestation (at enrolment)

Check What it blocks
Verify the chain on your server up to a Google hardware attestation root, and check every certificate against Google’s revocation status list. A keystore emulated in software that signs its own chain.
attestationSecurityLevel is TrustedEnvironment or StrongBox. A key held in software.
attestationChallenge equals the challenge your server issued for this enrolment. An old attestation replayed.
attestationApplicationId lists your package and your signing certificate digest. A key generated by another app.
In RootOfTrust, deviceLocked is true and verifiedBootState is Verified. An unlocked bootloader or a modified OS.

A leaked attestation key still chains to a Google root and passes until Google revokes it, so the revocation check matters as much as the root. And the roots themselves change: Google added a new hardware attestation root that started signing chains on 1 February 2026, and Android has used Remote Key Provisioning since Android 12, whose certificates have different expiry rules from older certificates provisioned at the factory. Because roots and expiry rules change, Google recommends its keyattestation library over a hand-written verifier.

After enrolment, store the attested public key against the account and require a signature from it on each sensitive request, such as a payment or a new beneficiary.

Can a fully verified token still come from an attacker’s phone?

Sergio García built a relay in Chameleon, our own Android build for analyzing apps. The relay forwards the attestation request from the analysis phone to a genuine phone, which answers it and sends the result back. In his tests, opening an app through the relay took 5 to 10 seconds instead of about 2, because the request blocks while the other phone answers. We are rolling the relay out to the Chameleon phones now.

The genuine phone answers the request the app actually made, with its own certified hardware. So the request hash matches, the timestamp is fresh and the device verdict is real, and every row in the Play Integrity table above passes.

The verified token tells your backend that a genuine app on certified hardware answered this request a moment ago. But which phone the request then travelled from is outside what attestation measures. The same holds for a genuine app on a real phone driven by a script.

How to test whether attestation stops your fraud

Start from the outcome you want to prevent: fake sign-ups, promotion abuse, scripted calls to your API, a cloned app. Then try to reach that outcome against your production or staging backend with the protections switched on.

In our app protection testing we try to obtain valid verdicts from a modified app or device, replay them, and reach the actions your attestation guards.

If you want to know what your backend accepts today, tell us about your app. For each bypass you get reproduction steps, the impact, and where the weakness sits: in the protection’s configuration, in the integration or in your backend’s verification. We also report the checks that held.

References

Portrait of Jacobo Casado

Jacobo Casado

Co-Founder & CPO

LinkedIn · View all posts

A necessary cookie remembers your choices for up to 180 days. Privacy policy.