BFU vs AFU: why lock state decides what can be extracted
Before and After First Unlock explained through iOS Data Protection classes and Android file-based encryption, plus the inactivity-reboot features.
Updated
In short
TechCrunch summarises the difference as BFU data being near-impossible to access without the passcode, while in AFU "certain data is unencrypted" and may be easier for some forensic tools to extract. Apple's Platform Security Guide says the decrypted class key for Class C data stays in memory after the device locks, and AOSP says Android's credential-encrypted storage is "only available after the user has unlocked the device". A timed reboot returns a locked device to BFU: SWGDE 18-F-003-2.0 warns that an inactivity timer "may cause a reboot", and sources describe 72 hours on iOS 18.1 (Classen), three days on Android (heise) and an 18-hour default on GrapheneOS (project documentation). A Magnet Forensics claim that it can bypass the iOS feature, relayed by 404 Media in 2026, has not been independently tested in any source cited.
Definitions
Before First Unlock (BFU) means the device has booted and the user has not yet entered the passcode. After First Unlock (AFU) means the user has unlocked the device at least once since boot, even if it is locked now. Apple's Platform Security Guide names the underlying classes (for example "Protected Until First User Authentication"), and BFU and AFU are the shorthand used by TechCrunch and Jiska Classen; SWGDE 18-F-003-2.0 also uses them as defined file-system acquisition types ("After First Unlock (AFU/Hot)" and "Before First Unlock (BFU/Cold)"); both map onto documented key-management behaviour on iOS and Android. TechCrunch summarises the practical difference: in BFU the data is fully encrypted and near-impossible to access without the passcode, while in AFU "certain data is unencrypted" and may be easier for some forensic tools to extract even though the screen is locked.
iOS: Data Protection classes
Apple's Platform Security Guide assigns each file to a class when an app creates it:
- Class A, Complete Protection (
NSFileProtectionComplete): the class key is protected by a key derived from the passcode and the device UID. The decrypted key is discarded shortly after the device locks. - Class B, Protected Unless Open (
NSFileProtectionCompleteUnlessOpen): lets a file be written while locked, using elliptic-curve key agreement (ECDH over Curve25519). The per-file key is wiped from memory when the file closes. - Class C, Protected Until First User Authentication (
NSFileProtectionCompleteUntilFirstUserAuthentication): the decrypted class key stays in memory after the device locks. Apple describes it as the default class for third-party app data not otherwise assigned a class. - Class D, No Protection (
NSFileProtectionNone): the class key is protected only by the UID and held in Effaceable Storage; Apple says this offers the benefit of fast remote wipe.
The forensic consequence follows directly. In BFU, class A, B and C keys are not available. In AFU, class C keys remain in memory, so software running on the device, including an extraction agent, can read class C and D files without the passcode. The 2021 Johns Hopkins review (Zinkus, Jois and Green) found that a surprising amount of sensitive data from Apple's built-in apps was stored in the AFU-level class, and argued that seized phones are likely to be in the locked-but-previously-unlocked (AFU) state. That is a 2021 analysis of then-current iOS versions, not a statement about today's releases.
Android: credential-encrypted and device-encrypted storage
Android's file-based encryption keeps two keys per user. Credential-encrypted (CE) storage is the default location and is "only available after the user has unlocked the device". Device-encrypted (DE) storage is available during Direct Boot, before unlock, so that alarms, calls and accessibility services work. Each CE key is encrypted with a key derived from a per-user synthetic password, which the lock-screen credential protects; the docs say the main layer of security against guessing is rate-limiting enforced by a secure element or TEE via Weaver, or by the TEE via Gatekeeper on devices without Weaver. The docs note that before first unlock, CE file names appear Base64-encoded because the key is not yet available. See GrapheneOS and forensic tools for how this plays out on Pixels.
Why seizure practice follows from this
SWGDE 18-F-003-2.0 (version 2.0, 2025-08-21) says that many mobile devices may lose data or initiate additional security measures once powered off or restarted, which could prevent data acquisition, that a device should be connected to a consistent power supply whenever practical, and that mobile operating systems and applications may have automated features that could lead to unrecoverable data under certain conditions, such as after a set period, a brute-force attempt, or when a USB connection is made. The Johns Hopkins review describes seizing devices, isolating them and keeping them charged so that keys are not evicted by shutdown. GrapheneOS stated on 2024-07-18 that keeping a device in AFU mode indefinitely until it can be exploited is standard operating procedure, and that phones are nearly always AFU. That is the project's claim about forensic practice, not a documented procedure.
Inactivity reboot
A timed reboot forces a locked device back to BFU. SWGDE 18-F-003-2.0 (version 2.0, 2025-08-21) likewise warns that an inactivity timer "may cause a reboot" and that a reboot is "potentially moving a device from an AFU state into a BFU state".
iOS. On 2024-11-07 404 Media reported that law-enforcement officers were seeing seized iPhones reboot. On 2024-11-08 (US time) 404 Media reported that Jiska Classen of the Hasso Plattner Institute had confirmed a feature called "inactivity reboot" in iOS 18.1. Her blog post of 2024-11-17 describes the mechanism: the Secure Enclave tracks the time since the last unlock and, after 72 hours, signals the kernel to reboot; the device returns to BFU, and if the kernel does not comply the system panics. She observed that it triggers after exactly 72 hours even while the phone is connected to Wi-Fi, concluding it has nothing to do with wireless connectivity, and notes that in BFU Face ID and Touch ID do not work and the phone will not join Wi-Fi networks because the saved passwords are encrypted. She also wrote that the feature will not lock law enforcement out completely and that three days is still plenty of time for coordinated analysis (TechCrunch).
Magnet Forensics, a GrayKey vendor, wrote on 2024-11-13 that Apple had not documented the feature, that it was tied to lock state, that the timer was 72 hours in iOS 18.1 and 7 days in iOS 18.0, and that examiners can look for a "inactivity reboot" entry in unified logs. Magnet says the feature was already in iOS 18.0 code on a 7-day timer; Classen's analysis first finds it in 18.1. On 2026-10-01 404 Media reported, based on a leaked video, that Magnet claims it can bypass the feature through a product feature called Evidence Preservation Mode. That is a vendor claim relayed by a news outlet, and it has not been independently tested in any source cited here.
Android. heise reported that Google Play services version 25.14 (dated 2025-04-14) would restart Android phones and tablets that have not been unlocked for three days, with cars, TVs and Wear OS watches apparently exempt. The EFF (June 2025) lists a 72-hour "inactivity reboot" among the features of Android's Advanced Protection. Availability and defaults can differ by device and software version, so confirm on the device in front of you.
GrapheneOS. The features page documents an auto-reboot timer that starts when the device locks. The default is 18 hours, configurable from 10 minutes to 72 hours or off. The project says it shipped the feature in June 2021 and that rebooting returns the device to BFU (project statement, 2026-07-26).
What this means in practice
For examiners: record the device state and, where known, time since last unlock; a device that has restarted is BFU regardless of how it was found. Magnet notes that after a restart the lock screen says biometrics require the passcode. For users: on iOS, Android with Advanced Protection and GrapheneOS, the cited sources describe a restart as returning the device to BFU.
Sources
- Apple Platform Security Guide, Data protection classes
- Android Open Source Project, File-based encryption
- Zinkus, Jois, Green (Johns Hopkins), Data Security on Mobile Devices (2021)
- SWGDE 18-F-003-2.0, Best Practices for Mobile Device Evidence Collection & Preservation Handling and Acquisition (Version 2.0, 2025-08-21)
- 404 Media, Police Freak Out at iPhones Mysteriously Rebooting Themselves (2024-11-07)
- 404 Media, Apple Quietly Introduced iPhone Reboot Code Which is Locking Out Cops (2024-11-08 US time, 2024-11-09 UTC)
- Jiska Classen, Reverse engineering iOS 18 inactivity reboot (2024-11-17)
- TechCrunch, New Apple security feature reboots iPhones after 3 days, researchers confirm (2024-11-14)
- Magnet Forensics, Understanding the security impacts of iOS 18's inactivity reboot (2024-11-13, vendor)
- 404 Media, Cops Can Bypass iPhone's Automatic Reboot to Get Into Locked Phones, Leaked Video Claims (2026-10-01)
- heise online, Android smartphones restart themselves after 3 days of inactivity (April 2025)
- EFF, Google's Advanced Protection Arrives on Android (June 2025)
- GrapheneOS on Mastodon, forensic practice and AFU (2024-07-18, project statement)
- GrapheneOS, Features
- GrapheneOS forum, GrapheneOS protections against data extraction from locked devices (2026-07-26, project statement)