Modern-Apps.git
Publicgit clone https://git.maproj.org/Modern-Apps.gitModern-Apps.git / findfamily / src / main / res / xml / data_extraction_rules.xml
data_extraction_rules.xml74 lines · 4.1 KiBRaw
| 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <!-- |
| 3 | Find Family. Audited state: |
| 4 | * databases/passwords-db — FFDatabase (User/Waypoint/LocationValue/ |
| 5 | TemporaryLink/NoShowAlert): people, saved places, precise location |
| 6 | history, share-link state and no-show watches. |
| 7 | * files/datastore_default.preferences_pb — the default DataStore: |
| 8 | userid plus the E2EE identity keypair ("ff_pqc" PqcIdentity), tracker |
| 9 | secrets/private bundles and powered-off recovery keys. Private key |
| 10 | material, sealed per device. |
| 11 | * shared_prefs/secure_prefs.xml — the SQLCipher passphrase for |
| 12 | passwords-db, wrapped by a non-exportable AndroidKeyStore key. |
| 13 | * files/wear-findfamily-snapshot.json — the watch snapshot: already- |
| 14 | decrypted people summaries, regenerated from Room via the conduit. |
| 15 | Excluded so decrypted location state never rides a raw file copy; the |
| 16 | phone re-publishes it and the watch re-derives it after restore. |
| 17 | |
| 18 | The raw database file must never be copied on either channel: its |
| 19 | passphrase is wrapped by the old device's keystore key, which never |
| 20 | transfers, so a restored copy cannot be opened (the new device mints a |
| 21 | fresh key/passphrase and SQLCipher rejects the already-encrypted file). |
| 22 | The database content instead travels through the declared BackupAgent |
| 23 | (platform/AppBackupAgent + FindFamilyDbBackupCodec, the weather |
| 24 | SqlCipherDbCodec pattern): exported to plaintext inside the backup |
| 25 | payload and re-encrypted under the new device's passphrase on restore, |
| 26 | with pairing secrets, link secrets and tracker rows stripped first |
| 27 | (domain/FindFamilyPlatformBackup documents the key-material decision). |
| 28 | Restored people keep their names/photos/places/history but return as |
| 29 | awaiting-re-pair; identity and link secrets are re-minted/recreated on |
| 30 | the new device, never restored. |
| 31 | |
| 32 | SCOPE: findfamily declares android:backupAgent=".platform.AppBackupAgent" |
| 33 | and does NOT set android:fullBackupOnly, so Android uses key/value backup |
| 34 | for cloud and the <cloud-backup> section below is NOT consulted. Cloud |
| 35 | content is exactly the agent's sanitized passwords-db export — no |
| 36 | DataStore, no preferences, no extra files. The rules below govern |
| 37 | <device-transfer>, and are the correct control if the backupAgent is |
| 38 | ever removed. Both sections are identical so the two channels stay |
| 39 | coherent: no channel ever ships the raw encrypted database, the wrapped |
| 40 | passphrase, or the identity DataStore. |
| 41 | --> |
| 42 | <data-extraction-rules> |
| 43 | <!-- Not consulted while android:backupAgent is declared; see SCOPE above. --> |
| 44 | <cloud-backup> |
| 45 | <include domain="root" path="." /> |
| 46 | <include domain="file" path="." /> |
| 47 | <include domain="database" path="." /> |
| 48 | <exclude domain="database" path="passwords-db" /> |
| 49 | <exclude domain="database" path="passwords-db-wal" /> |
| 50 | <exclude domain="database" path="passwords-db-shm" /> |
| 51 | <exclude domain="database" path="passwords-db-journal" /> |
| 52 | <exclude domain="file" path="datastore_default.preferences_pb" /> |
| 53 | <exclude domain="file" path="datastore/datastore_default.preferences_pb" /> |
| 54 | <exclude domain="file" path="wear-findfamily-snapshot.json" /> |
| 55 | <include domain="sharedpref" path="." /> |
| 56 | <exclude domain="sharedpref" path="secure_prefs.xml" /> |
| 57 | <include domain="external" path="." /> |
| 58 | </cloud-backup> |
| 59 | <device-transfer> |
| 60 | <include domain="root" path="." /> |
| 61 | <include domain="file" path="." /> |
| 62 | <include domain="database" path="." /> |
| 63 | <exclude domain="database" path="passwords-db" /> |
| 64 | <exclude domain="database" path="passwords-db-wal" /> |
| 65 | <exclude domain="database" path="passwords-db-shm" /> |
| 66 | <exclude domain="database" path="passwords-db-journal" /> |
| 67 | <exclude domain="file" path="datastore_default.preferences_pb" /> |
| 68 | <exclude domain="file" path="datastore/datastore_default.preferences_pb" /> |
| 69 | <exclude domain="file" path="wear-findfamily-snapshot.json" /> |
| 70 | <include domain="sharedpref" path="." /> |
| 71 | <exclude domain="sharedpref" path="secure_prefs.xml" /> |
| 72 | <include domain="external" path="." /> |
| 73 | </device-transfer> |
| 74 | </data-extraction-rules> |