getprop("ro.platform.name") == "atlas" || abort("E3004: This package is for \"atlas\" platform devices; this is a \"" + getprop("ro.platform.name") + "\".");
package_extract_file("META-INF/com/symbol/DeviceManifest.xml", "/tmp/DeviceManifest.xml");
ifelse(is_file_exist("/sbin/osu_checker"),
ifelse(is_file_exist("/tmp/DeviceManifest.xml"),
  ( 
    set_metadata("/tmp/DeviceManifest.xml", "uid", 0, "gid", 2000, "mode", 0755); 
    ui_print("Checking Device Manifest ..."); 
    assert(run_program("/sbin/osu_checker", "/tmp/DeviceManifest.xml", 
      "/tmp/DeviceProperties.xml") == 0 
      || (delete(/tmp/DeviceManifest.xml) && abort("This package is not allowed!!"))); 
    delete(/tmp/DeviceManifest.xml); 
  ),
  (abort("Device manifest file missing !!!"))
);, ui_print("osu_checker does not exist, skip checking ..."));

ui_print("Target: Zebra/falcon/falcon:7.1.2/01-01-49-NG-00-A/1:user/release-keys");
ui_print("==== Factory Reset ====");
ui_print("formatting data partition...");
format("ext4", "EMMC", "/dev/block/bootdevice/by-name/userdata", "-16384", "/data");
ui_print("done.");
show_progress(0.100000, 0);
ui_print("formatting enterprise partition...");
mount("ext4", "EMMC", "/dev/block/bootdevice/by-name/enterprise", "/enterprise");
unmount("/enterprise");
format("ext4", "EMMC", "/dev/block/bootdevice/by-name/enterprise", "0", "/enterprise");
ui_print("done.");
show_progress(0.100000, 0);
show_progress(0.750000, 0);
show_progress(0.200000, 10);
set_progress(1.000000);
