When traveling abroad, you may be asked to unlock your smartphone during immigration or customs checks. Have you ever heard stories like this in the news and felt worried?
Among GrapheneOS users, whenever this topic comes up, someone always says, “Just set a Duress PIN.”
A Duress PIN is a powerful GrapheneOS feature that completely erases your device the instant you enter it.
But let’s start with the conclusion. A Duress PIN should not be your first line of defense against a border inspection.
Rather, it’s a feature for the very last resort—one that most people should expect never to use.
What really works is more mundane preparation.
This article explains what to do before traveling, in order of priority.
Please note that this article is not legal advice.
Border search rules vary widely depending on the country, immigration status, and timing, and they change frequently.
Be sure to check the latest rules for your destination using official sources or consulting a professional, such as a lawyer.
This article covers only preparations that are technically possible.
The premise: The border is a place where “the usual rules” don’t apply
The first thing to know is that in many countries, authorities have broader search powers at the border than they do within the country.
Let’s look at the United States as an example.
Under the “border search exception,” U.S. Customs and Border Protection (CBP) has the legal authority to conduct basic searches of electronic devices without a warrant or individualized suspicion.
A new directive (Directive 3340-049B), which took effect in January 2026, clarified the scope of this authority. In fiscal year 2025, 55,318 devices were searched, a 17% increase from the previous year.
There are two types of searches.
A “basic search” involves an officer manually checking content shown on the device, such as photos and messages, and can be conducted without suspicion.
An “advanced search” uses forensic software to copy, extract, and analyze data, and requires reasonable suspicion and supervisory approval.
What happens if you refuse to unlock your device? This is where your immigration status makes a big difference.
U.S. citizens and permanent residents cannot be denied entry simply for refusing to unlock their devices.
By contrast, travelers entering on a visa or under the Visa Waiver Program who refuse could be denied entry and sent back on the next flight.
Most of us traveling on Japanese passports under ESTA fall into the latter category.
Also, refusing could lead to your device being temporarily confiscated or your inspection being significantly prolonged.
In other words, planning to “refuse on the spot and fight back” isn’t practical for most Japanese travelers.
That’s why it’s important to cross the border only after putting yourself in a position where you wouldn’t mind showing your device.
Why a Duress PIN is a “last resort”
Let’s review how the Duress PIN feature works on GrapheneOS.
A Duress PIN/password is a feature that irreversibly erases the device (including any installed eSIMs) when entered wherever the OS requests credentials, such as the lock screen.
There’s no confirmation screen, and there’s no undo.
Erasure affects every profile on the device, including all profiles if you’ve separated work and personal use.
There’s no doubt it’s a powerful feature. But specifically for border inspections, it’s not suitable for the following three reasons.
Reason 1: Using it in front of an officer risks being seen as destroying evidence
Entering a Duress PIN when an officer asks you to hand over your device could, depending on the country and circumstances, lead to far more serious legal trouble than having your data inspected, such as charges for destroying evidence or obstructing an officer.
Duress PINs are designed for coercive situations involving imminent danger to your life, such as robbery or kidnapping.
Border inspections are administrative procedures, entirely different from the situations this is meant for.
Reason 2: The cost of losing everything is too high
All profiles, including eSIMs, will be erased, leaving you without a way to communicate at your destination.
Without a backup, your data is gone forever.
Reason 3: If you don’t bring data you’d need to erase, there’s no need to erase anything
This is the heart of this article: the best way to protect data at the border is not to bring it across the border in the first place.
Setting a Duress PIN can be reasonable, depending on your threat model.
But this is the “last line of defense,” not your main border security measure—be sure not to get the order wrong.
Preparation 1: Data minimization: “You can’t show what you don’t have”
The golden rule for preparing for border inspections is surprisingly simple.
Data that isn't on the device can't be inspected.
Before traveling, we recommend organizing your device as follows.
-
Delete unnecessary apps. Pay special attention to messaging apps, social media, and email, where large amounts of past communications may have accumulated. If you won't use an app while traveling, the surest option is to delete it and reinstall it after returning home.
-
Organize your photos and videos. The gallery on your device is one of the first places checked during a routine inspection. After backing up, delete anything you don't need for your trip from the device.
-
Log out of cloud services. Under the 2026 directive, officers are said to be allowed to access only data stored locally on the device, with access to data in the cloud restricted. That said, apps you're still logged into may have cached data (copies stored on the device). Logging out of cloud apps and deleting locally cached files can limit what may be accessed during an inspection.
- For a more thorough approach, use a travel-only setup. If you have a higher-risk threat model, you could back up your device before traveling, factory reset it, and set up a “travel configuration” with only the minimum apps you need for the trip. Restore from the backup after returning home to get back to your original setup.
There's one thing to keep in mind.
A device that's “suspiciously empty” could itself invite further questions.
Think of data minimization not as “disguise to avoid suspicion,” but as preparation to “minimize harm if your data is examined.”
And, of course, never lie to an officer.
In many countries, making a false declaration can have more serious consequences than having your data examined.
Preparation 2: Organize profiles before travel
As we've discussed repeatedly on this blog, GrapheneOS lets you compartmentalize data using secondary users and Private Space.
If you normally use this setup, you need to decide what to do with your profiles before traveling.
The basic approach is this.
-
Back up and delete any profiles you won't use while traveling. If you won't use a profile that isolates banking apps or work data while traveling, there's no reason to keep it on the device. Once deleted, that data will no longer be on the device.
-
Assume that the “existence of profiles” itself cannot be hidden. If an unlocked device is inspected, multiple profiles may be discovered through the user-switching screen, for example. The idea of “showing your main profile and relying on a hidden profile” will only invite additional demands to unlock the device or arouse suspicion. Rather than trying to hide a profile, the surest approach is not to have it there in the first place.
-
It is true that inactive profiles are encrypted at rest—but if you're asked to unlock them, the result is the same. As explained in the previous article, “Should you put banking apps in Private Space or a secondary user?”, both offer the same level of encryption at rest. In the context of border crossings, what matters is not the difference in encryption strength, but whether the data is on the device at all.
Before deleting any profiles, be sure to complete the following “Preparation 3.” Get the order wrong and you could lose your own data.
Preparation 3: The foundation for everything - backups
Your ability to carry out the “deletion” described so far with confidence depends on your backups.
The actual steps for preparing before travel are as follows.
-
Back up each profile with Seedvault. Note that backups are independent for each profile. You need to run Seedvault separately in the owner profile and each secondary user profile.
-
Store backups somewhere you won't take with you. Save them somewhere that won't cross the border with your device, such as a USB drive or your home NAS. If you carry the backup media with your device, all that careful deletion will be pointless (the backup media itself may also be subject to inspection).
-
You don't need to test the restore, but be sure to check that you have a copy of the recovery code (12 words). If you lose it, you won't be able to decrypt the backup.
- Then delete any unnecessary profiles, apps, and data.
- After returning home, restore from the backup.
For detailed instructions on using Seedvault and important points to note (including changes to LAN backups in Android 17), see the previous article.
Preparation 4: Understand Auto reboot and what “shutting down” means for BFU
Finally, let's talk about the device's “state” on the day.
This is where Antispyphone S really shines, so let's go into a little more detail.
Android devices actually have two states.
-
BFU (Before First Unlock): The state after the device is powered on but before a PIN has been entered even once. In this state, most user data remains encrypted and inaccessible until the device is unlocked for the first time.
- AFU (After First Unlock): The state after the device has been unlocked at least once. Data is decrypted and accessible, and forensic tools may be able to extract at least some data even when the screen is locked.
To use a safe as an analogy, BFU is a “safe with the door shut and locked,” while AFU is a “safe with the door shut but unlocked.” In a seizure or inspection, this difference is decisive.
The practical takeaway is simple: Turn off your device (or restart it and don't enter your PIN) before heading to the inspection area.
That's all it takes to put the device in the BFU state and return its data to a fully encrypted state.
As a side benefit, after a restart, fingerprint and face unlock are disabled, and entering your PIN is required.
Biometric authentication can be bypassed by making you place your finger on the device, so turning it off is effective in this respect too.
And the feature that automates this return to BFU is Antispyphone's Auto reboot.
You can configure this under Settings → Security & privacy → Exploit protection → Auto reboot. The default is 18 hours after locking, and you can adjust it from 10 minutes to 72 hours.
If the device isn't unlocked within the set time, it automatically restarts and returns to the BFU state.
This protection is useful not just when traveling, but in everyday life too.
Even if your device is seized and kept in an AFU state, this feature automatically returns it to BFU when the timer expires. Antispyphone pioneered this feature, which Google later adopted in standard Android as well (with a longer interval). While traveling, you could set a shorter interval than usual, such as 1–2 hours.
Here's a quick tip for those who normally use fingerprint authentication.
On Antispyphone, fingerprint attempts are limited to five in total. Deliberately fail five times using a different finger to immediately disable fingerprint unlocking.
It's reassuring to keep this in mind as an alternative for situations when you don't have time to turn off your device.
How to act on the day: Win through preparation, not resistance
If you've completed all your preparations, there's very little to do on the day.
- Turn off your device before entering the inspection area.
- Answer questions honestly. Never lie.
- What to do if you're asked to unlock your device depends on the laws of your destination and your immigration status. As mentioned earlier, in the US, travelers on visas or ESTA may be denied entry if they refuse. Only a limited number of people are in a position to use the strategy of “refusing to protect their data.” That's why it's important to prepare in advance so that you won't be concerned even if you have to unlock your device and show it.
- If your device is seized, make sure you can piece together what happened later: get a receipt (a Custody Receipt in the US), and record the date, time, and officers' details.
Summary: Pre-Travel Checklist
Finally, let's summarize the article in a checklist.
-
Backups: Run Seedvault on all profiles. Store the backup somewhere you won't take with you. Check that you have a copy of your recovery codes.
-
Minimize data: Delete unnecessary apps, photos, and chat history. Log out of cloud services and clear caches.
-
Organize profiles: Delete secondary users/private spaces you won't use while traveling.
-
Auto reboot: Set a shorter interval (consider 1–2 hours while traveling, for example).
-
On the day: Turn the phone off before inspection (= BFU state). Answer questions honestly.
- Duress PIN: Whether to set one depends on your threat model. Just understand that it is not meant to be used at border inspections.
Boring preparation beats a flashy “ultimate weapon.”
Data protection at the border is largely determined before you arrive at the airport. I hope this article helps you prepare to travel with peace of mind.
0 comments