Modern-Apps.git
Publicgit clone https://git.maproj.org/Modern-Apps.gitModern-Apps.git / youpipe / src / main / res / xml / data_extraction_rules.xml
data_extraction_rules.xml77 lines · 4.7 KiBRaw
| 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <!-- YouTube client. Overrides the permissive default in the shared :library module. |
| 3 | |
| 4 | Storage audited: |
| 5 | database passwords-db Room (SubscriptionDatabase). User data worth restoring: |
| 6 | Subscription + categories, HistoryVideo (incl. resume |
| 7 | positions), Playlist/PlaylistItem and the tuned |
| 8 | recommendation/channel/keyword preference tables. Cache |
| 9 | tables in the same file (SubscriptionVideo feed cache, |
| 10 | CachedRelatedVideo, RecommendationImpression, and |
| 11 | DownloadedVideo rows pointing at excluded external files) |
| 12 | are stripped from the backup payload, not the device. |
| 13 | sharedpref secure_prefs SQLCipher passphrase wrapped by a non-exportable |
| 14 | AndroidKeyStore key. Never transferable. |
| 15 | sharedpref sabr_* PoToken caches and playback diagnostics. Session tokens |
| 16 | bound to this device and install; useless and unsafe |
| 17 | off-device. |
| 18 | file datastore_default.preferences_pb |
| 19 | Settings only: sponsorblock_enabled + categories, |
| 20 | dearrow_enabled, youtube_language, default page, speeds. |
| 21 | file sabr-cloud-policy.bin/.rev Fetched playback policy, refetched on demand. |
| 22 | external downloads/ Downloaded video files. Large and re-downloadable. |
| 23 | |
| 24 | The raw database file must never travel as a file: it is SQLCipher-encrypted |
| 25 | under a passphrase wrapped by the old device's non-exportable AndroidKeyStore |
| 26 | key, so a restored copy cannot be opened on the new device (a fresh key and |
| 27 | passphrase are minted there and Room rejects the foreign file). Instead the |
| 28 | app declares android:backupAgent=".platform.AppBackupAgent" (no |
| 29 | fullBackupOnly, so cloud backup is key/value): the agent exports the |
| 30 | database to plaintext inside its backup zip via YouPipeDbBackupCodec |
| 31 | (cache tables stripped) and re-encrypts it under the new device's key on |
| 32 | restore, and also carries the settings DataStore. |
| 33 | |
| 34 | SCOPE: while the backupAgent is declared, the <cloud-backup> section below |
| 35 | is NOT consulted for cloud backup; it is the correct fallback if the agent |
| 36 | is ever removed. The <device-transfer> section governs device-to-device |
| 37 | file transfer and must stay coherent with the agent: the same plaintext |
| 38 | codec round-trip carries the database, the same settings file is included, |
| 39 | and the raw database, its sidecars, the wrapped passphrase and the SABR |
| 40 | caches are excluded so a raw file copy can never shadow the re-keyed |
| 41 | restore. --> |
| 42 | <data-extraction-rules> |
| 43 | <cloud-backup> |
| 44 | <include domain="file" path="." /> |
| 45 | <include domain="database" path="." /> |
| 46 | <include domain="sharedpref" path="." /> |
| 47 | <include domain="external" path="." /> |
| 48 | <exclude domain="database" path="passwords-db" /> |
| 49 | <exclude domain="database" path="passwords-db-wal" /> |
| 50 | <exclude domain="database" path="passwords-db-shm" /> |
| 51 | <exclude domain="database" path="passwords-db-journal" /> |
| 52 | <exclude domain="sharedpref" path="secure_prefs.xml" /> |
| 53 | <exclude domain="sharedpref" path="sabr_local_dom_video_token_cache.xml" /> |
| 54 | <exclude domain="sharedpref" path="sabr_webpo_video_token_cache.xml" /> |
| 55 | <exclude domain="sharedpref" path="sabr_playback_diagnostics.xml" /> |
| 56 | <exclude domain="file" path="sabr-cloud-policy.bin" /> |
| 57 | <exclude domain="file" path="sabr-cloud-policy.rev" /> |
| 58 | <exclude domain="external" path="downloads" /> |
| 59 | </cloud-backup> |
| 60 | <device-transfer> |
| 61 | <include domain="file" path="." /> |
| 62 | <include domain="database" path="." /> |
| 63 | <include domain="sharedpref" path="." /> |
| 64 | <include domain="external" path="." /> |
| 65 | <exclude domain="database" path="passwords-db" /> |
| 66 | <exclude domain="database" path="passwords-db-wal" /> |
| 67 | <exclude domain="database" path="passwords-db-shm" /> |
| 68 | <exclude domain="database" path="passwords-db-journal" /> |
| 69 | <exclude domain="sharedpref" path="secure_prefs.xml" /> |
| 70 | <exclude domain="sharedpref" path="sabr_local_dom_video_token_cache.xml" /> |
| 71 | <exclude domain="sharedpref" path="sabr_webpo_video_token_cache.xml" /> |
| 72 | <exclude domain="sharedpref" path="sabr_playback_diagnostics.xml" /> |
| 73 | <exclude domain="file" path="sabr-cloud-policy.bin" /> |
| 74 | <exclude domain="file" path="sabr-cloud-policy.rev" /> |
| 75 | <exclude domain="external" path="downloads" /> |
| 76 | </device-transfer> |
| 77 | </data-extraction-rules> |