[Feature]add MT2731_MP2_MR2_SVN388 baseline version
Change-Id: Ief04314834b31e27effab435d3ca8ba33b499059
diff --git a/meta/meta-mediatek/recipes-support/update-engine-sideload/files/erase_partition.patch b/meta/meta-mediatek/recipes-support/update-engine-sideload/files/erase_partition.patch
new file mode 100644
index 0000000..02a4a23
--- /dev/null
+++ b/meta/meta-mediatek/recipes-support/update-engine-sideload/files/erase_partition.patch
@@ -0,0 +1,22 @@
+diff --git a/payload_consumer/delta_performer.cc b/payload_consumer/delta_performer.cc
+index a619d1d9..2abc3baa 100644
+--- a/payload_consumer/delta_performer.cc
++++ b/payload_consumer/delta_performer.cc
+@@ -367,6 +367,17 @@ bool DeltaPerformer::OpenCurrentPartition() {
+ target_path_ = install_part.target_path;
+ int err;
+
++ if (install_plan_->is_resume == false)
++ {
++ string cmd = "flash_eraseall ";
++ string p_cmd;
++
++ p_cmd = cmd + target_path_;
++ LOG(INFO) << "Erase partition, erase cmd=" << p_cmd;
++
++ system(p_cmd.c_str());
++ }
++
+ int flags = O_RDWR;
+ if (!is_interactive_)
+ flags |= O_DSYNC;