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

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

data_extraction_rules.xml56 lines · 2.8 KiBRaw
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3 Uniflix. Audited state:
4 * databases/uniflix-db — Room DB holding real user data: watchlist,
5 continue-watching positions, user lists, title notes and installed
6 addons (including JS plugin source). Not regenerable cache.
7 * secure_prefs.xml — SQLCipher passphrase wrapped by a non-exportable
8 AndroidKeyStore key.
9 * files/datastore/uniflix_addons.preferences_pb — default addon id.
10
11 The raw uniflix-db file is excluded from both sections: it is
12 SQLCipher-encrypted under a passphrase wrapped by a key that never leaves
13 the old device, so a restored copy cannot be opened and would crash on
14 first launch instead of starting clean. secure_prefs.xml is excluded
15 for the same reason — it is only that wrapped passphrase.
16
17 The user data still migrates: Uniflix declares its own BackupAgent
18 (platform/AppBackupAgent), which uses SqlCipherDbCodec to export the DB
19 to plaintext inside the backup payload and re-encrypt it under the new
20 device's key on restore, plus the uniflix_addons DataStore file. That
21 path is the one that works; the raw file copy would only get in its way.
22
23 SCOPE: Uniflix declares android:backupAgent=".platform.AppBackupAgent"
24 and does NOT set android:fullBackupOnly, so Android uses key/value
25 backup here and the <cloud-backup> section below is NOT consulted.
26 Cloud content is exactly AppBackupAgent's uniflixDbConfigs(this) plus
27 the uniflix_addons DataStore. The rules below govern <device-transfer>,
28 and are the correct control if the backupAgent is ever removed.
29-->
30<data-extraction-rules>
31 <!-- Not consulted while android:backupAgent is declared; see SCOPE above. -->
32 <cloud-backup>
33 <include domain="root" path="." />
34 <include domain="file" path="." />
35 <include domain="database" path="." />
36 <exclude domain="database" path="uniflix-db" />
37 <exclude domain="database" path="uniflix-db-wal" />
38 <exclude domain="database" path="uniflix-db-shm" />
39 <exclude domain="database" path="uniflix-db-journal" />
40 <include domain="sharedpref" path="." />
41 <exclude domain="sharedpref" path="secure_prefs.xml" />
42 <include domain="external" path="." />
43 </cloud-backup>
44 <device-transfer>
45 <include domain="root" path="." />
46 <include domain="file" path="." />
47 <include domain="database" path="." />
48 <exclude domain="database" path="uniflix-db" />
49 <exclude domain="database" path="uniflix-db-wal" />
50 <exclude domain="database" path="uniflix-db-shm" />
51 <exclude domain="database" path="uniflix-db-journal" />
52 <include domain="sharedpref" path="." />
53 <exclude domain="sharedpref" path="secure_prefs.xml" />
54 <include domain="external" path="." />
55 </device-transfer>
56</data-extraction-rules>