# Backup

Si la permission `android:allowBackup="true"` ou est absente du fichier AndroidManifest, après avoir utilisé toutes les fonctions de l'application, il est possible de faire un backup avec abd comme ceci:

```
$ adb backup -apk -nosystem com.example.xyz
ou
$ adb backup "-apk -nosystem com.example.xyz"
```

Si le backup fonctionne, cela devrait avoir exporté un fichier .ab dans le répertoire courant. afin de le rendre lisible, il est possible de le convertir en .tar comme ceci:

<pre class="language-bash"><code class="lang-bash">$ dd if=mybackup.ab bs=24 skip=1|openssl zlib -d > mybackup.tar
ou
<strong>$ dd if=backup.ab bs=1 skip=24 | python -c "import zlib,sys;sys.stdout.write(zlib.decompress(sys.stdin.read()))" > backup.tar
</strong><strong>ou
</strong><strong>$ ( printf "\x1f\x8b\x08\x00\x00\x00\x00\x00" ; tail -c +25 backup.ab ) |  tar xfvz -
</strong></code></pre>

Une fois que le backup est lisible, le but est d'y rechercher une potentielle fuite d'informations sensibles.

{% hint style="warning" %}
Les backups ne sont pas supportés sur les versions d'**Android > 12**
{% endhint %}


---

# 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/stockage-de-donnees-non-securise/backup.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.
