getprop("ro.build.platform") == "WTxx" || abort("Error: This package is for \"WTxx\" platform devices; this is a \"" + getprop("ro.build.platform") + "\".");
ui_print("==== [WTxx] Android 11 Enterprise Reset V4 ====");
getprop("ro.build.version.release") == "11" || abort("Error: This package is not supported for this OS.");
show_progress(0.200000, 10);
ui_print("Formatting data partition...");
format("f2fs", "EMMC", "/dev/block/bootdevice/by-name/userdata", "0", "/data");
ui_print("Done.");
show_progress(0.400000, 10);

ui_print("Formatting metadata partition...");
format("ext4", "EMMC", "/dev/block/bootdevice/by-name/metadata", "0", "/metadata");
ui_print("Done.");
show_progress(0.800000, 10);
if getprop("ro.boot.baseband") == "msm" then 
  ui_print("Formatting modemst1...");
  format("ext4", "EMMC", "/dev/block/bootdevice/by-name/modemst1", "0", "/modemst1");
  ui_print("Done.");
  ui_print("Formatting modemst2...");
  format("ext4", "EMMC", "/dev/block/bootdevice/by-name/modemst2", "0", "/modemst2");
  ui_print("Done.");
else
  ui_print("Done.");
endif;
set_progress(1.000000);
