#!/sbin/sh outfd=/proc/self/fd/$2 zip="$3" ui_print(){ echo "ui_print $1" > $outfd echo "ui_print" > $outfd } workf=/emmc/kek ui_print " " ui_print "LightROM by JSBmanD and 1Senderman1" ui_print " " ui_print "Mounting emmc and data..." mount /data mount /emmc ui_print "Extracting files..." mkdir -p $workf cd $workf unzip -o "$zip" ui_print "Flashing new system image..." dd if=$workf/system.img of=/dev/block/mmcblk0p4 ui_print "Flashing new boot image..." dd if=$workf/boot.img of=/dev/bootimg ui_print "Cleaning up and wiping dalvik-cache..." rm -r $workf rm /data/dalvik-cache/* ui_print "Unmounting partitions..." cd / umount /data umount /system ui_print "Installation complete!" exit 0