Exclude all our files from backup

Even though we don't allow backup at all, Android seems to go into the direction of overriding this. For now only for device-to-device backups, even though we could not verify this.
This commit is contained in:
Torsten Grote
2021-03-11 16:26:02 -03:00
parent 227f00c10c
commit d5b0556ea2
2 changed files with 23 additions and 1 deletions

View File

@@ -27,7 +27,10 @@
<uses-permission android:name="android.permission.USE_FINGERPRINT" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="18"
tools:ignore="ScopedStorage" />
<uses-permission-sdk-23 android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission-sdk-23 android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
@@ -38,6 +41,7 @@
android:name="org.briarproject.briar.android.BriarApplicationImpl"
android:allowBackup="false"
android:banner="@mipmap/tv_banner"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher_round"
android:label="@string/app_name"
android:logo="@mipmap/ic_launcher_round"

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<full-backup-content>
<!-- docs: https://developer.android.com/guide/topics/data/autobackup#XMLSyntax -->
<exclude
domain="root"
path="." />
<!-- the previous entry should exclude things recursively, but we add more just to be sure -->
<exclude
domain="root"
path="app_db" />
<exclude
domain="root"
path="app_key" />
<!-- we don't use domain=file (getFilesDir()), but ApplicationInfo#dataDir -->
<exclude
domain="sharedpref"
path="." />
</full-backup-content>