> For the complete documentation index, see [llms.txt](https://blog.s1rn3tz.ovh/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://blog.s1rn3tz.ovh/pentest-mobile/android/resilience/background-screen-caching.md).

# 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
