partition: Exclude /data/gsi directory from userdata backup
Change-Id: Iebf60b0f352803cef12267f17332e9f63bb58130
(cherry picked from commit 49f25fa352805b8576bf3863520511cf2b3439ac)
diff --git a/partition.cpp b/partition.cpp
index 14a9fe8..2be94cb 100755
--- a/partition.cpp
+++ b/partition.cpp
@@ -1269,6 +1269,7 @@
backup_exclusions.add_absolute_dir("/data/cache");
backup_exclusions.add_absolute_dir("/data/misc/apexdata/com.android.art"); // exclude this dir to prevent "error 255" on AOSP Android 12
backup_exclusions.add_absolute_dir("/data/extm"); //exclude this dir to prevent "error 255" on MIUI
+ backup_exclusions.add_absolute_dir("/data/gsi"); // Contains huge files (DSU System image + Userdata image), and won't work after restoration (requires configuration files in metadata)
wipe_exclusions.add_absolute_dir(Mount_Point + "/misc/vold"); // adopted storage keys
ExcludeAll(Mount_Point + "/system/storage.xml");