[Upgrading, Modifying and Unlocking] hbasoft:
Hi guys, I'm going to show you how to port Lineage 14.1 Samsung S4 I9506 to E330 SKL Korean Edition,

Download Step

First, you need to download notepad++, the Lineage rom in the orignal post, also don't forget to download Google apps (OpenGapps).

Pre-Flash Step

After downloading the rom, open it, then browse to META-INF/com/google/android, extract "updater-script" file then open the extracted file with Notepad++, Replace "ks01ltexx" with:

"ks01lteskt" if your phone is E330S

"ks01ltektt" if your phone is E330K

"ks01ltelgt" if your phone is E330L

Example: E330S update-script file:

assert(getprop("ro.product.device") == "ks01lte" || getprop("ro.build.product") == "ks01lte" || getprop("ro.product.device") == "ks01lteskt" || getprop("ro.build.product") == "ks01lteskt" || getprop("ro.product.device") == "GT-I9506" || getprop("ro.build.product") == "GT-I9506" || abort("E3004: This package is for device: ks01lte,ks01lteskt,GT-I9506; this device is " + getprop("ro.product.device") + ".");); ui_print("Target: samsung/ks01lteskt/ks01lte:5.0.1/LRX22C/I9506XXUDPG2:user/release-keys"); ifelse(is_mounted("/system"), unmount("/system")); package_extract_dir("install", "/tmp/install"); set_metadata_recursive("/tmp/install", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644); set_metadata_recursive("/tmp/install/bin", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0755); mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system", ""); run_program("/tmp/install/bin/backuptool.sh", "backup"); unmount("/system"); if is_mounted("/data") then package_extract_file("META-INF/org/lineageos/releasekey", "/tmp/releasekey"); run_program("/tmp/install/bin/otasigcheck.sh") != "31744" || abort("Can't install this package on top of incompatible data. Please try another package or run a factory reset"); else mount("f2fs", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/userdata", "/data", ""); package_extract_file("META-INF/org/lineageos/releasekey", "/tmp/releasekey"); run_program("/tmp/install/bin/otasigcheck.sh") != "31744" || abort("Can't install this package on top of incompatible data. Please try another package or run a factory reset"); unmount("/data"); endif; show_progress(0.750000, 0); ui_print("Patching system image unconditionally..."); block_image_update("/dev/block/platform/msm_sdcc.1/by-name/system", package_extract_file("system.transfer.list"), "system.new.dat", "system.patch.dat") || abort("E1001: Failed to update system image."); show_progress(0.020000, 10); mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system", ""); run_program("/tmp/install/bin/backuptool.sh", "restore"); 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); set_progress(1.000000);

Note: You need to check which version in

TWRP recovery

if it is E330L or E330S or E330K

not in

about phone menu!

Now, you need to reformat the file to prevent any CWM errors, in Notepad++, go to Edit Menu>EOL Conversion> Convert to UNIX Format. Edit Menu again, Blank Operations> Remove Unbecessary Blank and EOL. Edit Menu>Blank Operation>TAB To Space.

Then save the file and put it in the archive again (replace the old one). Go back to the main directory then go to system folder, extract build.prop and replace ks01ltexx with the suitable version as explained before. save it, replace the old one with the edited one.

Flash Step

All you have to do is to follow the instructions in the original post.

Note: Do not flash Modem/Bootloader !

:D:D:D​