Modern Apps git
git clone https://git.maproj.org/Modern-Apps.git
cov/c3 ▾

Modern-Apps.git / education / src / main / res / xml / data_extraction_rules.xml

data_extraction_rules.xml51 lines · 2.5 KiBRaw
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3 Education. Audited state:
4 * databases/education-db — Room DB with Learner, SkillProgress and Deadline
5 entities.
6 * No SharedPreferences or DataStore usage found; the DB is the app's only
7 persistent store.
8
9 education-db is excluded from both sections because it is SQLCipher-encrypted
10 via library:room buildDatabase(), and the passphrase is wrapped by an
11 AndroidKeystore key (DatabaseHelper alias db_no_auth_key) that is hardware-
12 bound and never leaves the device. A restored copy cannot be decrypted:
13 isKeyGenerated() returns false on the new device, a fresh key and passphrase
14 are minted, encryptExistingDatabase() skips the file because its header is
15 not "SQLite format 3", and Room then fails to open it. Including the file
16 would turn a clean install into a crash on launch.
17
18 secure_prefs.xml is excluded with it — it stores only the Keystore-wrapped
19 ciphertext of the passphrase, which is meaningless without the key.
20
21 Heads-up: education declares no android:backupAgent, so there is no
22 SqlCipherDbCodec re-keying path here. Learner progress therefore does not
23 migrate to a new device today. That is a pre-existing gap in the app, not
24 something these rules introduce, but it needs a BackupAgent to fix.
25-->
26<data-extraction-rules>
27 <cloud-backup>
28 <include domain="root" path="." />
29 <include domain="file" path="." />
30 <include domain="database" path="." />
31 <exclude domain="database" path="education-db" />
32 <exclude domain="database" path="education-db-wal" />
33 <exclude domain="database" path="education-db-shm" />
34 <exclude domain="database" path="education-db-journal" />
35 <include domain="sharedpref" path="." />
36 <exclude domain="sharedpref" path="secure_prefs.xml" />
37 <include domain="external" path="." />
38 </cloud-backup>
39 <device-transfer>
40 <include domain="root" path="." />
41 <include domain="file" path="." />
42 <include domain="database" path="." />
43 <exclude domain="database" path="education-db" />
44 <exclude domain="database" path="education-db-wal" />
45 <exclude domain="database" path="education-db-shm" />
46 <exclude domain="database" path="education-db-journal" />
47 <include domain="sharedpref" path="." />
48 <exclude domain="sharedpref" path="secure_prefs.xml" />
49 <include domain="external" path="." />
50 </device-transfer>
51</data-extraction-rules>