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

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

data_extraction_rules.xml41 lines · 2.2 KiBRaw
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3 News. Audited state:
4 * databases/news-db — Room DB holding CachedArticle (feed stubs merged
5 from the server's news.json snapshot or the on-device crawl, pruned to
6 the newest 500 unbookmarked rows) and CachedBody (article bodies
7 extracted on device from publisher HTML). Both are re-derivable: a
8 fresh install re-fetches the server feed and re-extracts any body
9 from its publisher URL on open, so the DB is a cache, not user data.
10 There is no read-state store. Bookmarked rows are pointers to public
11 publisher articles in that same cache.
12 * files/datastore/news.preferences_pb — NewsPrefs user state only:
13 reader text size / serif and the manually set Local location.
14 * files/datastore/news_feed_cache.preferences_pb — the last-merged
15 server-feed stamp (a cache-coherence marker, not user state). It is
16 kept in a separate DataStore so it never travels with the user
17 prefs: restoring the stamp without the DB would make the first
18 refresh skip the merge and leave the feed empty.
19 * sharedpref/secure_prefs.xml — SQLCipher passphrase wrapped by a
20 non-exportable AndroidKeystore key.
21
22 news-db is excluded from both sections (by allowlist omission): it is
23 SQLCipher-encrypted under a passphrase wrapped by a device-bound
24 AndroidKeystore key that never leaves the old device, so a restored
25 copy cannot be opened — a fresh key/passphrase is minted on the new
26 device, encryptExistingDatabase() skips the already-encrypted file,
27 and Room fails to open it. Shipping it would trade a clean first
28 launch (empty cache, immediate re-fetch) for a crash. The Keystore-
29 wrapped passphrase in secure_prefs.xml is likewise omitted.
30
31 Only the user prefs file travels, in both channels. No BackupAgent is
32 declared, so platform backup applies these rules directly.
33-->
34<data-extraction-rules>
35 <cloud-backup disableIfNoEncryptionCapabilities="true">
36 <include domain="file" path="datastore/news.preferences_pb" />
37 </cloud-backup>
38 <device-transfer>
39 <include domain="file" path="datastore/news.preferences_pb" />
40 </device-transfer>
41</data-extraction-rules>