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

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

data_extraction_rules.xml50 lines · 2.9 KiBRaw
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3 Allowlist. Overrides the permissive include-everything default in the shared :library
4 module. Both sections use <include>, so anything not named here is excluded.
5
6 ALLOWED: files/datastore_default.preferences_pb
7 For this app the DataStore holds exactly one key, "bypass_packages" (BypassList.kt),
8 the split-tunnel package allowlist. It is a plaintext user preference with no crypto
9 dependency, it is tedious to rebuild by hand, and it restores correctly. It does
10 reveal which apps are installed and which ones the user routes around the tunnel, so
11 the cloud-backup section sets disableIfNoEncryptionCapabilities="true" and that
12 fingerprint only leaves the device when Google's client-side end-to-end encryption
13 is available.
14
15 EXCLUDED (by omission from the allowlist):
16
17 databases/vpn-db (+ -wal/-shm/-journal)
18 VpnConfigEntity stores privateKey, peerPublicKey and peerPresharedKey as TEXT
19 columns: the WireGuard X25519 static private keys and PSKs. The same file also
20 holds ConnectionLogEntity, a per-flow log of resolved domains, package names and
21 byte counts, i.e. a complete browsing history. The file is SQLCipher-encrypted,
22 but the passphrase is wrapped by the non-exportable AndroidKeyStore key
23 "db_no_auth_key", so the ciphertext is neither safe to ship nor usable once
24 restored. Tunnel profile metadata (name, address, DNS, MTU, endpoint) lives in the
25 same row as the private key, so it cannot be split out at file granularity.
26 databases/vpn-db_temp
27 Transient staging file for the plaintext->SQLCipher migration. This is the one
28 file in the app that can contain private keys as PLAINTEXT SQLite if the process
29 dies mid-migration.
30 shared_prefs/secure_prefs.xml
31 Wrapped SQLCipher passphrase + IV. Restoring it without the Keystore key is worse
32 than not restoring it: DatabaseHelper.isKeyGenerated() sees the IV, reports the
33 key as present, and sends the app down the decrypt path with a missing key.
34 files/datastore_default.preferences_pb.tmp
35 DataStore's atomic-commit temp sibling. Not a named path in the allowlist, so it
36 is not backed up.
37
38 Device transfer carries the same single preference. It is not made more permissive than
39 cloud backup here, because D2D does not migrate AndroidKeyStore material either, so the
40 database would arrive unopenable. Kill switch / always-on / lockdown are system-owned
41 settings, not app storage, and are outside these rules entirely.
42-->
43<data-extraction-rules>
44 <cloud-backup disableIfNoEncryptionCapabilities="true">
45 <include domain="file" path="datastore_default.preferences_pb" />
46 </cloud-backup>
47 <device-transfer>
48 <include domain="file" path="datastore_default.preferences_pb" />
49 </device-transfer>
50</data-extraction-rules>