Add typecode to sgdisk for proper detection in Android
- Fixes the "Unsupported SD Card" error when partitioning w/TWRP
PS2:
Use hex code instead of GUID to make code more succinct
Update typecode for Linux swap to be consistent
PS3: Revert PS2 changes
Change-Id: I5aec780aa4dfb7bd9025ae8cbceda13bfaaa0b03
diff --git a/partitionmanager.cpp b/partitionmanager.cpp
index 96e3002..eabc5d9 100644
--- a/partitionmanager.cpp
+++ b/partitionmanager.cpp
@@ -1779,7 +1779,7 @@
return false;
}
gui_msg(Msg("create_part=Creating {1} partition...")("FAT32"));
- Command = "sgdisk --new=0:0:" + fat_str + " --change-name=0:\"Microsoft basic data\" " + Device;
+ Command = "sgdisk --new=0:0:" + fat_str + " --change-name=0:\"Microsoft basic data\" --typecode=0:EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 " + Device;
LOGINFO("Command is: '%s'\n", Command.c_str());
if (TWFunc::Exec_Cmd(Command) != 0) {
gui_msg(Msg(msg::kError, "unable_to_create_part=Unable to create {1} partition.")("FAT32"));