partitionmanager: Unlock every block partitions during setup

For example, Super volumes are read-only by default.

Change-Id: I0fc144842e42177d715c968bd1ee79e1406dae59
(cherry picked from commit d63fcaa879adc8f4be6ca2de3967e767c7542877)
diff --git a/partitionmanager.cpp b/partitionmanager.cpp
index 8043a07..eb7b604 100755
--- a/partitionmanager.cpp
+++ b/partitionmanager.cpp
@@ -303,6 +303,8 @@
 				Prepare_Super_Volume((*iter));
 		}
 
+		Unlock_Block_Partitions();
+
 		//Setup Apex before decryption
 		TWPartition* sys = PartitionManager.Find_Partition_By_Path(PartitionManager.Get_Android_Root_Path());
 		TWPartition* ven = PartitionManager.Find_Partition_By_Path("/vendor");
@@ -2834,8 +2836,6 @@
 
 	full_filename = path + "/" + filename;
 
-	Unlock_Block_Partitions();
-
 	gui_msg("image_flash_start=[IMAGE FLASH STARTED]");
 	gui_msg(Msg("img_to_flash=Image to flash: '{1}'")(full_filename));
 
@@ -3550,7 +3550,7 @@
 					continue;
 				}
 				if (ioctl(fd, BLKROSET, &OFF) == -1) {
-					LOGERR("Unable to unlock %s for flashing: %s\n", block_device.c_str());
+					LOGERR("Unable to unlock %s: %s\n", block_device.c_str());
 					continue;
 				}
 				close(fd);