Add force_writable to MapPartitionOnDeviceMapper
In sideloading we will map source partitions with
force_writable = false.
Test: manual sideloading
Bug: 117101719
Change-Id: I7629b8ecce07a9bd2c9e24ac6b64617386067ca5
diff --git a/boot_control_android.cc b/boot_control_android.cc
index 8eafdce..12296d7 100644
--- a/boot_control_android.cc
+++ b/boot_control_android.cc
@@ -298,7 +298,7 @@
super_device, builder.get(), target_slot);
}
-// Unmap all partitions, and remap partitions.
+// Unmap all partitions, and remap partitions as writable.
bool Remap(DynamicPartitionControlInterface* dynamic_control,
const string& super_device,
Slot target_slot,
@@ -318,6 +318,7 @@
super_device,
partition.name + target_suffix,
target_slot,
+ true /* force writable */,
&map_path)) {
return false;
}