vab support: merges and unmapping super devices

- check for merges before formatting data
- add advanced option for unmapping super devices

Change-Id: I38d4d3bbdfa071969016c3e000c86a4d03c71e45
diff --git a/gui/action.cpp b/gui/action.cpp
index 8943234..a623ccd 100755
--- a/gui/action.cpp
+++ b/gui/action.cpp
@@ -207,6 +207,7 @@
 		ADD_ACTION(enableadb);
 		ADD_ACTION(enablefastboot);
 		ADD_ACTION(changeterminal);
+		ADD_ACTION(unmapsuperdevices);
 
 		// remember actions that run in the caller thread
 		for (mapFunc::const_iterator it = mf.begin(); it != mf.end(); ++it)
@@ -2266,6 +2267,23 @@
 		gui_changePage("terminalcommand");
 	return 0;
 }
+
+int GUIAction::unmapsuperdevices(std::string arg __unused) {
+	int op_status = 1;
+
+	operation_start("Remove Super Devices");
+	if (simulate) {
+		simulate_progress_bar();
+	} else {
+		if (PartitionManager.Unmap_Super_Devices()) {
+			op_status = 0;
+		}
+	}
+
+	operation_end(op_status);
+	return 0;
+}
+
 #ifndef TW_EXCLUDE_NANO
 int GUIAction::editfile(std::string arg) {
 	if (term != NULL) {