﻿# Android Direct Boot separates pre-unlock resources from private AI context

A provisioned local model does not make private context available before the first unlock after reboot. Keep Android storage scope and user-unlock state explicit.

Author: Retrivium team
Updated: 2026-11-06
Canonical URL: https://retrivium.ai/journal/edge-android-direct-boot-private-context-boundary/
Language: en

## A reboot changes more than network availability

A local assistant has downloaded its model and private document context. After the phone reboots, a notification component starts before the user first unlocks the device and cannot read that context. Treating this as an incomplete model download confuses artifact presence with operating-system access state. Define what the application should do in this pre-unlock phase, including which requests remain deferred rather than answered with missing or silently substituted private information.

## Separate the two protected storage scopes

The [Direct Boot guide](https://developer.android.com/privacy-and-security/direct-boot) distinguishes credential-encrypted storage, available after the user unlocks, from device-encrypted storage available during Direct Boot. It also explains that ordinary screen locking after the first unlock does not make credential-encrypted storage unavailable again; reboot is a different transition. Do not design a security policy around the assumption that a dark or locked screen proves the private context became unreadable to the application.

## Keep the pre-unlock component minimal

Direct Boot participation requires an explicitly eligible component and the appropriate storage context. Declare which non-private resources that component actually needs, rather than relocating the entire assistant database for convenience. The guide warns against moving passwords or authorization tokens into device-encrypted storage. Apply the same data-classification review to personal retrieval context. A packaged model may be suitable for the early path while personalized prompts, credentials and historical documents require deferral under the chosen application design.

## Observe the relevant user-unlock state

The [UserManager reference](https://developer.android.com/reference/android/os/UserManager) defines isUserUnlocked for the relevant user and the corresponding storage availability. A running user or foreground process is not the same observation. Follow the supported unlock notification and state-check contract when transitioning to private context. Preserve the identity of the user or profile being considered; a signal for another profile must not cause the assistant to select that profile’s documents. Do not infer universal multi-user behavior from a single-profile development phone.

## Propose a reboot-to-unlock fixture

Use a disposable test profile with harmless markers in the intended storage scopes. Compare startup before first unlock, the supported unlock transition and later screen locking. Observe which component runs, which storage context it opens and whether deferred work resumes against the intended private source. Acceptance requires the pre-unlock path to stay within its declared data scope. No phone was rebooted, encryption configuration changed or private data migrated here; destructive conversion procedures are unnecessary for this proposed check.

## Keep offline readiness narrower than storage authority

[Orbit’s offline boundary](/journal/orbit-gemma4-android-local-inference-offline-boundary/) covers application dependencies. [Pinned offline packages](/journal/huggingface-pinned-offline-snapshot/) cover local model completeness. Neither proves pre-unlock access to private context. Record model provisioning, supported component execution, user-unlock state and permitted data scope separately. A useful early assistant can explicitly defer personalized work; it should not weaken storage placement merely to make every startup look like a fully available private session.
