# Background screen caching

## Description

Par défaut, les appareils Android comme les appareils IOS sont conçus pour systématiquement prendre un screenshot de la page sur laquel on se trouve sur une application lorsque celle-ci est mise en arrière plan (lorsqu'on switch d'une application à une autre par exemple). Cette action peut sembler bénigne au premier abord mais peut être dangereux dans des cas spécifiques notamment si la page capturé contient des informations sensibles.

Pour contrer cela, Android posséde une solution native consistant simplement à spécifier un "secure flag" qui remplace la page par une page blanche et empêche la capture d'écran d'être effectuée.

<figure><img src="/files/U1nWzKZrPrslcAXB3da0" alt=""><figcaption><p>Before / After</p></figcaption></figure>

Sur les appareils prenant en charge le chiffrement basé sur fichier (FBE), les instantanés sont stockés dans le dossier `/data/system_ce/<USER_ID>/<IMAGE_FOLDER_NAME>`. `<IMAGE_FOLDER_NAME>` dépend du fournisseur, mais les noms les plus courants sont `snapshot` et `recent_image`. Si l'appareil ne prend pas en charge FBE, le dossier `/data/system/<IMAGE_FOLDER_NAME>` est utilisé.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://blog.s1rn3tz.ovh/pentest-mobile/android/resilience/background-screen-caching.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
