Modern-Apps.git
Publicgit clone https://git.maproj.org/Modern-Apps.gitModern-Apps.git / travel / src / main / res / xml / data_extraction_rules.xml
data_extraction_rules.xml58 lines · 2.8 KiBRaw
| 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <!-- |
| 3 | Travel. Audited state: |
| 4 | * databases/travel-db — Room DB with RecentSearch, BookedTrip, FrequentFlyer |
| 5 | and Customer entities. |
| 6 | * secure_prefs.xml — SQLCipher passphrase for that DB. |
| 7 | * filesDir/datastore_default.preferences_pb — UI preferences (TravelViewModel). |
| 8 | |
| 9 | travel-db is excluded from both sections. Two independent reasons: |
| 10 | |
| 11 | 1. Correctness. It is built with library:room buildDatabase(), so it is |
| 12 | SQLCipher-encrypted under a passphrase wrapped by an AndroidKeystore key |
| 13 | that is hardware-bound and never backed up. On the restored device |
| 14 | DatabaseHelper.isKeyGenerated() is false, a new key and passphrase are |
| 15 | generated, encryptExistingDatabase() leaves the already-encrypted file |
| 16 | alone, and Room opens it with the wrong key — |
| 17 | SQLiteNotADatabaseException. The restored file is unusable by |
| 18 | construction. |
| 19 | |
| 20 | 2. Sensitivity. Customer and FrequentFlyer rows are passenger PII (names, |
| 21 | loyalty numbers) and BookedTrip is an itinerary. Even if the encryption |
| 22 | problem were solved, this is not content to push to cloud backup casually. |
| 23 | |
| 24 | Heads-up for whoever owns this app: unlike weather and games/hub, travel does |
| 25 | NOT declare an android:backupAgent, so there is currently no SqlCipherDbCodec |
| 26 | path either. That means bookings do not migrate to a new device at all today. |
| 27 | These rules do not cause that — they just stop the migration from failing |
| 28 | loudly at first launch instead of quietly. Fixing it needs a BackupAgent, not |
| 29 | a backup rule. |
| 30 | |
| 31 | Preferences and the DataStore file still back up normally. |
| 32 | --> |
| 33 | <data-extraction-rules> |
| 34 | <cloud-backup> |
| 35 | <include domain="root" path="." /> |
| 36 | <include domain="file" path="." /> |
| 37 | <include domain="database" path="." /> |
| 38 | <exclude domain="database" path="travel-db" /> |
| 39 | <exclude domain="database" path="travel-db-wal" /> |
| 40 | <exclude domain="database" path="travel-db-shm" /> |
| 41 | <exclude domain="database" path="travel-db-journal" /> |
| 42 | <include domain="sharedpref" path="." /> |
| 43 | <exclude domain="sharedpref" path="secure_prefs.xml" /> |
| 44 | <include domain="external" path="." /> |
| 45 | </cloud-backup> |
| 46 | <device-transfer> |
| 47 | <include domain="root" path="." /> |
| 48 | <include domain="file" path="." /> |
| 49 | <include domain="database" path="." /> |
| 50 | <exclude domain="database" path="travel-db" /> |
| 51 | <exclude domain="database" path="travel-db-wal" /> |
| 52 | <exclude domain="database" path="travel-db-shm" /> |
| 53 | <exclude domain="database" path="travel-db-journal" /> |
| 54 | <include domain="sharedpref" path="." /> |
| 55 | <exclude domain="sharedpref" path="secure_prefs.xml" /> |
| 56 | <include domain="external" path="." /> |
| 57 | </device-transfer> |
| 58 | </data-extraction-rules> |