Skip to content

Commit 0dec9c9

Browse files
committed
android: be stricter about system backups
we should also exclude D2D because it results in a broken store probably due to KeyStore Fixes #tailscale/tailscale#732 Signed-off-by: LucasMZ <[email protected]>
1 parent 87f0e97 commit 0dec9c9

File tree

3 files changed

+31
-0
lines changed

3 files changed

+31
-0
lines changed

android/src/main/AndroidManifest.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
<application
3333
android:name=".App"
3434
android:allowBackup="false"
35+
android:fullBackupContent="@xml/backup_rules"
36+
android:dataExtractionRules="@xml/data_extraction_rules"
3537
android:banner="@drawable/tv_banner"
3638
android:icon="@mipmap/ic_launcher"
3739
android:label="Tailscale"
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?kml version="1.0" encoding="utf-8"?>
2+
<!-- data_extraction_rules but for devices below Android 12 -->
3+
<full-backup-content>
4+
<exclude domain="root"/>
5+
<exclude domain="file"/>
6+
<exclude domain="database"/>
7+
<exclude domain="sharedpref"/>
8+
<exclude domain="external"/>
9+
</full-backup-content>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Do not allow system backups, including in device-transfer which ignores allowBackup, to not break Tailscale when restoring -->
3+
<!-- It would be nice to have only preferences backed up or some mechanism in-app to solve issues caused by KeyStore not being backed up -->
4+
<data-extraction-rules>
5+
<cloud-backup>
6+
<exclude domain="root"/>
7+
<exclude domain="file"/>
8+
<exclude domain="database"/>
9+
<exclude domain="sharedpref"/>
10+
<exclude domain="external"/>
11+
</cloud-backup>
12+
13+
<device-transfer>
14+
<exclude domain="root"/>
15+
<exclude domain="file"/>
16+
<exclude domain="database"/>
17+
<exclude domain="sharedpref"/>
18+
<exclude domain="external"/>
19+
</device-transfer>
20+
</data-extraction-rules>

0 commit comments

Comments
 (0)