I have the following Android backup rule.
<?xml version="1.0" encoding="utf-8"?>
<full-backup-content>
<!-- /data/user/0/com.xxx.yyy/databases -->
<include domain="database" path="." />
<!-- /data/user/0/com.xxx.yyy/shared_prefs -->
<include domain="sharedpref" path="com.xxx.yyy_preferences.xml" />
<include domain="sharedpref" path="com.xxx.yyy.rate.AppRater.xml" />
<include domain="sharedpref" path="com.xxx.yyy.billing.Affiliater.xml" />
<include domain="sharedpref" path="com.xxx.yyy.consent.Consenter.xml" />
<!-- /storage/emulated/0/Android/data/com.xxx.yyy/files -->
<include domain="external" path="recording/" />
<include domain="external" path="attachment/" />
</full-backup-content>
However, I notice, by doing so, strangely only
/storage/emulated/0/Android/data/com.xxx.yyy/files/recording is backup/ restore successfully.
/storage/emulated/0/Android/data/com.xxx.yyy/files/attachment is ignored.
But, if I change the rule to
<?xml version="1.0" encoding="utf-8"?>
<full-backup-content>
<!-- /data/user/0/com.xxx.yyy/databases -->
<include domain="database" path="." />
<!-- /data/user/0/com.xxx.yyy/shared_prefs -->
<include domain="sharedpref" path="com.xxx.yyy_preferences.xml" />
<include domain="sharedpref" path="com.xxx.yyy.rate.AppRater.xml" />
<include domain="sharedpref" path="com.xxx.yyy.billing.Affiliater.xml" />
<include domain="sharedpref" path="com.xxx.yyy.consent.Consenter.xml" />
<!-- /storage/emulated/0/Android/data/com.xxx.yyy/files -->
<include domain="external" path="attachment/" />
<include domain="external" path="recording/" />
</full-backup-content>
/storage/emulated/0/Android/data/com.xxx.yyy/files/attachment is backup/ restore successfully.
/storage/emulated/0/Android/data/com.xxx.yyy/files/recording is ignored.
Does anyone know it is so? How can I backup both attachment and recording folders?
I am testing using guidelines at
https://developer.android.com/guide/topics/data/testingbackup
I guess we are not allow, to include multiple directories from the same domain?
