[Galaxy S 4 i9505 Original Android Development] lukas77:
New CM12 builds, at least for Galaxy S5, has new file structure. There is system.new.dat and system.patch.dat which is extracted during ROM flashing. Unfortunatelly after ROM flashing system not booting up, just stuck on bootloader screen. There is no error during ROM patching.

updater-script:

assert(getprop("ro.product.device") == "kltexx" || getprop("ro.build.product") == "kltexx" || getprop("ro.product.device") == "kltelra" || getprop("ro.build.product") == "kltelra" || getprop("ro.product.device") == "kltetmo" || getprop("ro.build.product") == "kltetmo" || getprop("ro.product.device") == "kltecan" || getprop("ro.build.product") == "kltecan" || getprop("ro.product.device") == "klteatt" || getprop("ro.build.product") == "klteatt" || getprop("ro.product.device") == "klteub" || getprop("ro.build.product") == "klteub" || getprop("ro.product.device") == "klteacg" || getprop("ro.build.product") == "klteacg" || getprop("ro.product.device") == "klte" || getprop("ro.build.product") == "klte" || abort("This package is for device: kltexx,kltelra,kltetmo,kltecan,klteatt,klteub,klteacg,klte; this device is " + getprop("ro.product.device") + "."););

mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system", "");

package_extract_file("system/bin/backuptool.sh", "/tmp/backuptool.sh");

package_extract_file("system/bin/backuptool.functions", "/tmp/backuptool.functions");

set_metadata("/tmp/backuptool.sh", "uid", 0, "gid", 0, "mode", 0755);

set_metadata("/tmp/backuptool.functions", "uid", 0, "gid", 0, "mode", 0644);

run_program("/tmp/backuptool.sh", "backup");

unmount("/system");

mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/userdata", "/data", "");

package_extract_file("system/bin/otasigcheck.sh", "/tmp/otasigcheck.sh");

package_extract_file("META-INF/org/cyanogenmod/releasekey", "/tmp/releasekey");

set_metadata("/tmp/otasigcheck.sh", "uid", 0, "gid", 0, "mode", 0755);

run_program("/tmp/otasigcheck.sh");

sha1_check(read_file("/tmp/releasekey"),"7241e92725436afc79389d4fc2333a2aa8c20230") && abort("Can't install this package on top of incompatible data. Please try another package or run a factory reset");

unmount("/data");

show_progress(0.750000, 0);

block_image_update("/dev/block/platform/msm_sdcc.1/by-name/system", package_extract_file("system.transfer.list"), "system.new.dat", "system.patch.dat");

mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system", "");

delete("/system/bin/otasigcheck.sh");

unmount("/system");

show_progress(0.020000, 10);

mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system", "");

package_extract_file("system/bin/backuptool.sh", "/tmp/backuptool.sh");

package_extract_file("system/bin/backuptool.functions", "/tmp/backuptool.functions");

set_metadata("/tmp/backuptool.sh", "uid", 0, "gid", 0, "mode", 0755);

set_metadata("/tmp/backuptool.functions", "uid", 0, "gid", 0, "mode", 0644);

run_program("/tmp/backuptool.sh", "restore");

delete("/system/bin/backuptool.sh");

delete("/system/bin/backuptool.functions");

unmount("/system");

show_progress(0.050000, 5);

package_extract_file("boot.img", "/dev/block/platform/msm_sdcc.1/by-name/boot");

show_progress(0.200000, 10);