ui_print(" ");
ui_print(" - mounting system partition");
run_program("/sbin/mount", "/system");
ui_print(" - mounting data partition");
run_program("/sbin/mount", "/data");

ui_print(" - flashing boot.img");
run_program("/sbin/busybox", "mknod", "/dev/block/mmcblk0p14", "b", "179", "14");
package_extract_file("boot.img","/dev/block/platform/msm_sdcc.1/by-name/boot");

ui_print(" - tuning file systems");
run_program("/sbin/fstrim", "-v", "/system");
run_program("/sbin/fstrim", "-v", "/data");
run_program("/sbin/fstrim", "-v", "/cache");

ui_print(" - unmounting partition /data");
unmount("/data");

ui_print(" - unmounting partition /system");
unmount("/system");

ui_print(" ");
ui_print("finished");
run_program("/sbin/sync");
