ui_print("==== Factory Reset ====");
ui_print("formatting data partition...");
format("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/userdata", "-16384", "/data");
ui_print("done.");
show_progress(0.100000, 0);
ui_print("formatting cache partition...");
unmount("/cache");
format("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/cache", "0", "/cache");
ui_print("done.");
show_progress(0.100000, 0);
ui_print("formatting enterprise partition...");
ifelse(is_mounted("/enterprise"), unmount("/enterprise"));
format("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/enterprise", "0", "/enterprise");
ui_print("done.");
show_progress(0.100000, 0);
show_progress(0.200000, 10);
