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

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

data_extraction_rules.xml97 lines · 5.6 KiBRaw
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3 App store client. Stock-OS backup audit:
4
5 database appstore-db (+ -wal/-shm/-journal)
6 Room, SQLCipher-encrypted. RepoEntity (user-configured repos
7 with index-signing fingerprints), PinnedStampEntity (TOFU
8 source-stamp pins) and AccrescentTrustEntity (verified
9 allowlist cache) are user/trust state; CachedAppEntity (the
10 full catalogue index of every enabled repo, multi-megabyte)
11 is re-derived from the signed repo indexes on the next sync.
12 The raw file must never be copied: its passphrase is wrapped
13 by a non-exportable AndroidKeyStore key (secure_prefs.xml)
14 that never leaves the old device, so a restored copy cannot
15 be opened and the first Room open would crash. Instead
16 AppBackupAgent exports the DB to plaintext via
17 AppStoreDbBackupCodec (catalogue stripped), and re-encrypts
18 under the new device's passphrase on restore.
19 file datastore/appstore-settings.preferences_pb
20 User settings (auto-install opt-in, disabled sources).
21 Portable protobuf; carried by the agent and allowed here.
22 file datastore/accrescent_repodata.preferences_pb
23 Anti-rollback timestamp floor for Accrescent's signed
24 repodata. Portable; guards the restored allowlist.
25 file datastore/play_auth.preferences_pb
26 Live anonymous-Play session credential bound to the old
27 device's gsfId/device profile. Never carried; re-dispensed.
28 file wear-catalog.json, wear-phases.json, wear-apks/
29 Watch-side catalogue/phases and staged verified APKs.
30 Re-synced / re-offered over the conduit; never carried.
31 sharedpref secure_prefs.xml
32 SQLCipher passphrase wrapped by the old device's KeyStore
33 key. Useless off-device and superseded by the agent restore.
34 sharedpref appstore-update-check.xml
35 Comma-joined packages from the last update notification
36 (inventory of the old device's installed apps, only used to
37 suppress repeats). Regenerable; never carried.
38 sharedpref appstore-restricted-packages.xml
39 appstore-tv-incompatible-packages.xml
40 Packages learned as install-restricted / TV-incompatible on
41 THIS device. Device-specific facts (the TV store documents
42 them as never synced or shared); re-learned on the new
43 device at the cost of one refused install.
44 cache Download/verification scratch under getCacheDir(); the
45 platform never backs up cache.
46
47 SCOPE: appstore declares android:backupAgent=".platform.AppBackupAgent"
48 and does NOT set android:fullBackupOnly, so Android uses key/value
49 backup here and the <cloud-backup> section below is NOT consulted.
50 Cloud content is exactly AppBackupAgent's payload: the catalogue-
51 stripped DB (plaintext in-payload, re-encrypted on restore) plus the
52 appstore-settings and accrescent_repodata DataStores. The rules below
53 govern <device-transfer>, and are the correct fallback control for
54 both channels if the backupAgent is ever removed: on neither channel
55 may the raw encrypted DB, its KeyStore-wrapped passphrase, the Play
56 credential, or device-specific learned suppressions move. The external
57 domain is simply never included, so nothing on external storage moves.
58-->
59<data-extraction-rules>
60 <!-- Not consulted while android:backupAgent is declared; see SCOPE above. -->
61 <cloud-backup>
62 <include domain="root" path="." />
63 <include domain="file" path="." />
64 <exclude domain="file" path="datastore/play_auth.preferences_pb" />
65 <exclude domain="file" path="wear-catalog.json" />
66 <exclude domain="file" path="wear-phases.json" />
67 <exclude domain="file" path="wear-apks" />
68 <include domain="database" path="." />
69 <exclude domain="database" path="appstore-db" />
70 <exclude domain="database" path="appstore-db-wal" />
71 <exclude domain="database" path="appstore-db-shm" />
72 <exclude domain="database" path="appstore-db-journal" />
73 <include domain="sharedpref" path="." />
74 <exclude domain="sharedpref" path="secure_prefs.xml" />
75 <exclude domain="sharedpref" path="appstore-update-check.xml" />
76 <exclude domain="sharedpref" path="appstore-restricted-packages.xml" />
77 <exclude domain="sharedpref" path="appstore-tv-incompatible-packages.xml" />
78 </cloud-backup>
79 <device-transfer>
80 <include domain="root" path="." />
81 <include domain="file" path="." />
82 <exclude domain="file" path="datastore/play_auth.preferences_pb" />
83 <exclude domain="file" path="wear-catalog.json" />
84 <exclude domain="file" path="wear-phases.json" />
85 <exclude domain="file" path="wear-apks" />
86 <include domain="database" path="." />
87 <exclude domain="database" path="appstore-db" />
88 <exclude domain="database" path="appstore-db-wal" />
89 <exclude domain="database" path="appstore-db-shm" />
90 <exclude domain="database" path="appstore-db-journal" />
91 <include domain="sharedpref" path="." />
92 <exclude domain="sharedpref" path="secure_prefs.xml" />
93 <exclude domain="sharedpref" path="appstore-update-check.xml" />
94 <exclude domain="sharedpref" path="appstore-restricted-packages.xml" />
95 <exclude domain="sharedpref" path="appstore-tv-incompatible-packages.xml" />
96 </device-transfer>
97</data-extraction-rules>