Modern-Apps.git
Publicgit clone https://git.maproj.org/Modern-Apps.gitModern-Apps.git / library / src / main / res / xml / data_extraction_rules.xml
data_extraction_rules.xml35 lines · 1.7 KiBRaw
| 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <!-- |
| 3 | Fail-safe fallback only. Every app in the repo currently ships its own |
| 4 | res/xml/data_extraction_rules.xml, which shadows this one, so nothing uses |
| 5 | this file today. |
| 6 | |
| 7 | It denies cloud-backup on purpose. A new app that forgets to write its own |
| 8 | rules gets no cloud backup rather than silently uploading everything: this |
| 9 | file used to <include> root, file, database, sharedpref and external in both |
| 10 | sections, which meant any app inheriting it shipped its entire sandbox to |
| 11 | Google. Several apps store E2EE identity keys in files/datastore_default and |
| 12 | OAuth tokens in shared_prefs, so that default was the wrong way round. |
| 13 | |
| 14 | If you are adding an app: write a real per-app rules file listing what is |
| 15 | genuinely worth restoring. Two things to know first. |
| 16 | - Room databases here are SQLCipher-encrypted with a passphrase wrapped by |
| 17 | a non-exportable AndroidKeyStore key, so a copied .db file cannot be |
| 18 | decrypted on the target device. Backing one up needs a BackupAgent that |
| 19 | re-keys it (see BaseBackupAgent + SqlCipherDbCodec), not a rule. |
| 20 | - If your app declares android:backupAgent without fullBackupOnly, it uses |
| 21 | key/value backup and the <cloud-backup> section below is not consulted. |
| 22 | --> |
| 23 | <data-extraction-rules> |
| 24 | <cloud-backup> |
| 25 | <exclude domain="root" path="." /> |
| 26 | <exclude domain="file" path="." /> |
| 27 | <exclude domain="database" path="." /> |
| 28 | <exclude domain="sharedpref" path="." /> |
| 29 | <exclude domain="external" path="." /> |
| 30 | </cloud-backup> |
| 31 | <device-transfer> |
| 32 | <include domain="file" path="." /> |
| 33 | <include domain="sharedpref" path="." /> |
| 34 | </device-transfer> |
| 35 | </data-extraction-rules> |