# Free on GrapheneOS: how an app can check your phone, not you

> Hardware key attestation lets an app confirm a phone runs GrapheneOS with no account, no ID and no server. How it works, and why we use it to give PRO away.

By Alexandr Bykov, OxiSoft. Published 1 December 2026.
Canonical: https://oxisoft.io/blog/free-on-grapheneos-hardware-attestation/

People who install GrapheneOS have already paid for privacy. They bought a specific phone, flashed a new OS, gave up some convenience, and they read permission screens that most people tap through. If any group deserves a thank you from a privacy-first app, it's them.

So we wanted to give them our paid features for free. The hard part was the check. How does an app know a phone runs GrapheneOS without asking the user to prove who they are? No account, no email, no upload of anything. The answer is a feature that most Android phones already have and almost nobody talks about: hardware key attestation.

## The usual way to verify something is to identify someone

Most "are you eligible?" checks work by identity. A student discount wants a university email. A loyalty perk wants a login. A region price wants your location. Each one solves the problem by collecting a fact about you, then trusting that fact.

That's the wrong trade for a privacy OS. Asking a GrapheneOS user to sign up for an account so we can confirm they care about privacy would be a joke with a bad punchline.

What we actually need to know is narrow: is this specific phone, right now, running an official GrapheneOS build? That's a question about the device, not the person. And the phone can answer it without telling us anything else.

## What hardware attestation is

Modern Android phones have a small, separate secure chip, or a protected area inside the main chip, that holds cryptographic keys. The normal OS can ask it to create keys and use them, but it can't read the keys out or change how the chip behaves. Even a rooted phone with a modified OS can't reach inside.

When the chip creates a new key, it can also sign a certificate that describes the phone it lives in. That certificate records things the chip saw for itself while the phone started:

- **Verified boot state.** Whether the OS was checked against a signing key before it ran, and whether that key is the phone maker's own or one the owner installed.
- **The boot key.** A fingerprint of the exact key that signed the OS.
- **Bootloader lock.** Whether the bootloader is locked, which is what makes the boot check mean anything.
- **Patch level.** How recent the OS security patches are.

The certificate is signed by a key inside the secure hardware, and that key is in turn signed up a chain that ends at a published root key. Anyone can check the chain. Nobody outside the chip can produce a valid one with false facts in it.

That last point is the whole trick. The app doesn't trust the OS to describe itself. It trusts hardware that the OS cannot lie through.

## How the check works, step by step

Here is what happens when the app starts on Android:

1. It makes a fresh random challenge for this one check.
2. It asks the secure chip for a new throwaway key, with that challenge attached.
3. The chip returns a certificate chain describing the phone, including the challenge.
4. The app checks every signature in the chain and that the root is one of the known attestation roots.
5. It checks the challenge matches, so an old certificate can't be replayed.
6. It checks the key really lives in secure hardware, not in a software fallback.
7. Then the GrapheneOS part: the OS must be signed by a key the owner installed, the bootloader must be locked, and the boot key must match one of the official GrapheneOS keys.
8. The throwaway key is deleted.

If everything passes, the paid features unlock. If not, nothing changes and the app works as it always did.

Step 7 needs a list of official keys. GrapheneOS publishes them for every supported phone, signed by the project, and we bundle that list in the app. Right now that means the Pixel 6 through the Pixel 10 line. Because the list ships with the app, the check needs no network at all.

## What this check never learns

This is the part we care about most, so it's worth being exact.

- **No identity.** There is no account, no email, no name. The check doesn't ask the user anything.
- **No device ID.** Android can include serial numbers or IMEI in an attestation, but only when an app asks for them and has special system permission. We don't ask.
- **No server.** The certificate is checked on the phone and the result stays on the phone. We never see it, so we couldn't keep a list of GrapheneOS users even if we wanted one.
- **No lasting key.** Each check makes a fresh key and deletes it after. There is no stable identifier left behind to track.

The app keeps one thing: a yes or no, saved locally, and checked again on every launch. That small detail matters. If you restore a backup of the app onto a different phone, the saved "yes" doesn't come along for free. The new phone has to answer for itself.

## Why an unlocked bootloader does not count

This rule can look strict, so here's the reasoning. GrapheneOS with an unlocked bootloader is still GrapheneOS. But with the bootloader unlocked, the phone will boot any OS, and the chip can no longer vouch that what it booted is what it claims to be. The attestation honestly reports "unlocked", and at that point the boot key proves nothing.

A locked bootloader is also what GrapheneOS itself recommends for real use. So the rule follows the project's own security model instead of inventing a new one: if the hardware can vouch for the OS, we believe it. If it can't, we don't pretend.

## The honest limit

The check runs inside the app. Someone who rebuilds the app with the check removed can unlock the features without GrapheneOS. They could just as well remove the payment screen, which is true of every app that sells a one-time unlock.

For a thank-you gift, that's fine. The worst case is someone gets a habit tracker's extra features for free after a lot of effort. For real security decisions, like letting a phone into a company network, you would send the certificate chain to a server and check it there, where the user can't patch the code. Attestation supports that too. We just don't need it, and keeping it on the phone is what lets us avoid any server at all.

There is one more edge. Attestation keys from a small number of phones have leaked over the years, and Google publishes a list of the revoked ones. An app can fetch that list in one request and refuse those certificates. For our use the offline check is enough, and it means the app makes no extra connection to unlock anything.

## Where it ships, and the code

The first app to use this is [Habit Observer](/apps/habitobserver/), our habit tracker: on GrapheneOS with a locked bootloader, every PRO feature is free. Nothing changes on other phones, and the one-time purchase stays where it was.

We put the attestation code in its own small Flutter plugin, [android_attestation](https://github.com/oxisoft/android_attestation), under the MIT license. It has no dependencies beyond Flutter itself, doesn't need Google Play services, and does the full check offline. On iOS or desktop every call simply returns "unavailable" instead of crashing, so a cross-platform app can call it without special cases. If you build Android apps and want to say thank you to the same users, or just want to know what OS your app is really running on, it's there to use.

Privacy apps tend to reward privacy with words. A locked bootloader and a signed boot key are a better kind of proof than any form we could ask someone to fill in, and checking them costs the user nothing. Not even their name. If you're curious what else a de-Googled phone changes for an app, we wrote about that in [what breaks without Google Play services](/blog/android-app-without-google-play-services/).
