GrapheneOS duress PIN: wipe your phone under coercion
A duress PIN is a second PIN on GrapheneOS that wipes your phone instead of unlocking it. This guide explains when it helps, how to set it up and what it can't do.

GrapheneOS duress PIN: wipe your phone under coercion
A duress PIN is a second PIN on GrapheneOS that wipes your phone instead of unlocking it. This guide explains when it helps, how to set it up and what it can’t do.
Who this guide is for: Journalists, activists, higher-risk users, and people in stalking or domestic-abuse situations who may realistically face forced phone unlocking. For most everyday users, this goes beyond what they need.
A duress PIN is a second PIN you set alongside your normal unlock code. When entered, it wipes the phone instead of unlocking it. See the official explanation at grapheneos.org.
The scenario: you’re forced to unlock your phone — at a border crossing, during an arrest, or by someone pressuring you. You enter the duress PIN, and the phone wipes itself.
What you gain, and what it costs
You gain a last-resort defense for situations where physical coercion is more realistic than remote hacking. If someone forces you to unlock your phone, you have an option that can erase the device immediately without navigating menus or explaining what you are doing.
The cost is that this feature only works if you remember it correctly and combine it with solid backups. A duress PIN you forget does nothing when you need it, and one you confuse with your normal PIN or enter by accident wipes your phone just as effectively as in a genuine emergency.
When this is overkill
For most people, a strong normal PIN, disabling biometrics when risk rises, and enabling auto-reboot are already enough. A duress PIN mainly belongs in scenarios where forced unlocking is a plausible threat: border crossings, arrests, stalking, domestic abuse, or targeted intimidation.
Legal risk: a wipe in front of officials is its own act
Law text as of 5 November 2026. This is about police, customs and border officers; against a private person who forces you to unlock, these rules don’t come into play.
In the Netherlands, refusing your code and wiping the phone are treated differently:
- Refusing: an order to give access to a device or to decrypt data may not be given to a suspect (article 125k(3) of the Code of Criminal Procedure). People who are not suspects can get such an order, unless they have a legal right to refuse to testify (the article refers to article 96a(3)).
- Wiping: the Criminal Code has offences for deliberately destroying objects that could help bring out the truth, with the aim of preventing their seizure (up to six months, article 189(1)(3°) of the Criminal Code); for destroying or making unusable something that has been seized (up to four years, article 198(2)); and for deliberately not complying with a lawful order from an investigating or supervising official, or obstructing what they do (up to three months, article 184).
Our reading, not a court’s: entering a duress code on a phone that police have just seized, or after you have been ordered to unlock it, can fall under these articles. Whether wiping data counts as destroying an “object” is for a court to decide, and we found no Dutch ruling about a duress PIN. A wipe also doesn’t remove copies in cloud backups, and the wiped phone itself shows that something was erased.
Elsewhere the rules are often stricter. At UK ports, Schedule 7 of the Terrorism Act 2000 requires you to give an examining officer the information they ask for, and wilfully obstructing or trying to frustrate a search or examination is an offence (legislation.gov.uk, paragraphs 5 and 18). In the US, destroying any record or object with the intent to obstruct a federal investigation carries up to 20 years (18 U.S.C. § 1519); US border officers are a federal agency.
This has already reached a US court. In a federal case in Georgia (1:25-CR-499), a traveller stopped at Atlanta airport was indicted under 18 U.S.C. § 2232(a), which covers destroying property to prevent a search or seizure and carries up to five years. The indictment says he destroyed the contents of his phone to stop a border officer (defence filing); the Guardian reports he is accused of doing it with GrapheneOS. He has not been convicted and is challenging the evidence. We found no ruling; the last report we could read is from July 2026.
If you expect police or border contact, ask a lawyer about your situation beforehand. In many cases, a phone without sensitive data on it is the safer choice for a trip than a phone you plan to wipe.
How it works
GrapheneOS supports a duress PIN as a built-in option. After entering it:
- The wipe starts as soon as the duress code is submitted, anywhere the device asks for your credentials: the lock screen of any user, or any user or work profile prompt in the OS
- It needs no reboot and, GrapheneOS says, cannot be interrupted
- It is irreversible: only a backup kept off the phone brings anything back
What it wipes: all data on the phone, for every user and profile, because it destroys the encryption keys. You can’t wipe just one profile. There is one duress PIN and password for the whole phone, set in the owner profile, and it works on every user’s lock screen. GrapheneOS’s lead developer says it prevents data recovery the same way as a factory reset.
What it doesn’t wipe: GrapheneOS itself stays installed. A physical SIM isn’t touched and still carries your number (our reading of the source, which only resets eSIM chips). Copies elsewhere stay too.
eSIMs: the wipe is meant to delete them, but don’t count on it. The lead developer says deleting eSIMs needs eSIM support switched on, and that is off by default even if an eSIM works: check Settings → Network & internet → eSIM support. In that same thread a user reported an eSIM surviving a test wipe, which the developer put down to an eSIM firmware bug. In the source, the phone gives this step about three seconds and doesn’t check the result before powering off (our reading).
What someone watching sees: the screen can show a wrong PIN, then the phone quickly powers off. This isn’t hidden: GrapheneOS says it is very clear that the phone was wiped, and forensic analysis can determine it. The Duress password entry is on every GrapheneOS phone; whether a code is set only shows after the owner’s PIN or password.
The next start: GrapheneOS’s docs don’t describe it. Users who tested it report an error about corrupted data on the recovery screen, with a factory reset as the only way out. After that, you set the phone up as new.
GrapheneOS requires you to set both a duress PIN and a duress password to turn the feature on, because different profiles on the same phone can use different unlock methods. The duress PIN is only used for PIN entry and the duress password only for password entry, so whichever method you unlock with, the matching duress code is the one that triggers the wipe. A duress PIN also wipes the phone when it is entered as the two-factor fingerprint unlock PIN, but not currently when it is entered as the SIM PIN.
When the code doesn’t work
Under pressure you won’t get a second try, so check these before you rely on it:
- Auto-confirm unlock is on. The lock screen then hides the Enter key (until five failed attempts) and submits by itself once you have typed as many digits as your real PIN. A longer duress PIN gets cut off at that length, and a shorter one can’t be submitted. That is what the lock screen source does at this version; a user found the longer case by testing, and the lead developer expects the same for shorter. GrapheneOS’s docs don’t mention it. Turn it off for every user on the phone: Settings → Security & privacy → Device unlock → Screen lock → Auto-confirm unlock. If you keep it, make the duress PIN exactly as long as the real PIN of each user.
- It matches a real code. The real code always wins: the phone unlocks and nothing is wiped. This is checked per user, and setup doesn’t stop you. Check again whenever you change a PIN or password on the phone.
- A lockout timer is running. After repeated wrong attempts the lock screen blocks all entry until the timer ends, so the duress code can’t be typed either (our reading of the source).
- The phone uses a pattern. Only a typed PIN or password is checked. A pattern never triggers a wipe, and neither does a fingerprint.
Setup
Requirements:
- GrapheneOS (this feature does not exist in standard Android)
- A screen lock (PIN or password), since the duress codes only work where the phone asks for one
- Auto-confirm unlock off, see above
Steps:
- In the owner profile, go to Settings → Security & privacy → Device unlock → Duress password
- Enter your current PIN or password when asked
- Tap Add duress PIN and password
- On one screen, fill in the duress PIN twice and the duress password twice (GrapheneOS requires both) — never use the same as your normal unlock code
- Tap Add, read the WARNING and tap Proceed
Done. The feature is active once you see “Added duress PIN and password”. The same screen later offers Update duress PIN and password and Delete duress PIN and password.
Already set one up? Check it against the list above, especially Auto-confirm unlock and the length of your duress PIN.
Choosing your duress PIN carefully
Don’t use:
- A PIN or password that is real on this phone, including for another user
- An obvious variation (your normal PIN +1)
- Something you’d accidentally type when in a hurry
Do use:
- A PIN you’ll remember but won’t enter accidentally. At least 4 digits; anyone who types it on any user’s prompt wipes the whole phone, so people sharing your phone can trigger it too
- With Auto-confirm unlock off, any length works. With it on, only the same length as the real PIN does
Never test it on your primary phone unless you have a full backup off the phone. The wipe function is irreversible: a test erases every user, deletes your eSIMs and leaves the phone needing a factory reset.
Combine with other GrapheneOS security features
Auto-reboot: GrapheneOS can automatically restart the phone after a set time if it has not been unlocked. Configure it via Settings → Security & privacy → Exploit protection → Auto reboot. The default is 18 hours, adjustable from 10 minutes to 72 hours. After a reboot, all data is encrypted at rest and inaccessible without the PIN.
USB access restriction: Settings → Security & privacy → Exploit protection → USB-C port. The GrapheneOS default is already Charging-only when locked: once the phone is locked it blocks new USB connections and cuts USB data at the hardware level when current connections end. For the duress scenario, check that it still reads that way and do not switch it to the looser “Charging-only when locked, except before first unlock” variant. This helps prevent tools like Cellebrite from reading data over USB while the phone is locked.
Lockdown: Press the power button and volume up at the same time to open the power menu, then tap Lockdown. The phone locks and, until the next unlock, fingerprint unlock and lock screen notifications are off (Google’s Android help). Useful if you expect to be coerced: PIN or password required, no fingerprint. It lasts only until you unlock again, so turn it on each time.
Who is this relevant for?
Journalists and activists who have sensitive sources or material on their phone and expect border controls or arrests.
High-risk users in countries with aggressive surveillance or arbitrary device checks.
People in stalking or domestic violence situations where someone can physically force access to the phone.
Less relevant for most everyday users — the threat threshold must justify accepting a wipe function.
What you can’t protect against
A duress PIN doesn’t help if:
- The phone is already unlocked at the time of seizure
- Someone has a backup of your data (iCloud, Google Drive, a previously made copy)
- The attacker uses advanced forensic tools while the phone is on and was unlocked
- The person forcing you is still there and will react. They see the phone power off, and it won’t come back with your data. GrapheneOS’s team says that if erasing the data doesn’t resolve the situation, the feature likely isn’t right for it. In a stalking or domestic-abuse situation, weigh your physical safety first
Always combine the duress PIN with disk encryption (on by default on GrapheneOS), a strong PIN, and auto-reboot.
Next step
Go further
- GrapheneOS hardening guide — broader, maintainable high-risk setup
- GrapheneOS first setup — getting started with GrapheneOS
Profiles
- Profile: journalist or activist — when a duress PIN is part of the picture
- Profile: high risk — complete approach for high threat level