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

Modern-Apps.git / games / chess / src / main / res / xml / data_extraction_rules.xml

data_extraction_rules.xml41 lines · 2.1 KiBRaw
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3 Chess. Audited state: everything the app persists lives in
4 filesDir/datastore_default.preferences_pb (DataStoreUtils) — Learn-mode stars,
5 achievements, game settings, and the Lichess sign-in (username/user id plus the
6 OAuth access token). The token is stored Keystore-sealed (AES-GCM,
7 data/LichessTokenStore): only ciphertext ever reaches this file, and the
8 non-exportable Keystore key never leaves the device, so a token carried away
9 by backup or device transfer is undecryptable on the destination and simply
10 reads as signed-out there. No Room database, no files written to filesDir
11 or external storage; puzzles.dat / learn.json / achievements.json are read-only
12 APK assets. Stockfish's NNUE is read straight out of the APK.
13
14 So: back everything up. Losing Learn progress on a phone migration is exactly
15 the outcome these rules exist to prevent. The one secret in the file is
16 sealed ciphertext (see above), and the platform already drops cacheDir and
17 code_cache on its own.
18
19 SCOPE: chess declares android:backupAgent=".util.AppBackupAgent" and does NOT
20 set android:fullBackupOnly, so Android uses key/value backup and the
21 <cloud-backup> section below is NOT consulted. Cloud content is exactly
22 AppBackupAgent's datastoreNames = ["datastore_default"], which is the same
23 data this file would have sent. <device-transfer> IS governed here, and these
24 rules become the cloud control too if the backupAgent is ever removed.
25-->
26<data-extraction-rules>
27 <cloud-backup>
28 <include domain="root" path="." />
29 <include domain="file" path="." />
30 <include domain="database" path="." />
31 <include domain="sharedpref" path="." />
32 <include domain="external" path="." />
33 </cloud-backup>
34 <device-transfer>
35 <include domain="root" path="." />
36 <include domain="file" path="." />
37 <include domain="database" path="." />
38 <include domain="sharedpref" path="." />
39 <include domain="external" path="." />
40 </device-transfer>
41</data-extraction-rules>