[Galaxy Grand Prime General] KoSett:
for miui porting

add symlinks

check present or not

symlink("/data/misc/audio/mbhc.bin", "/system/etc/firmware/wcd9306/wcd9306_mbhc.bin");

symlink("/data/misc/audio/wcd9320_anc.bin", "/system/etc/firmware/wcd9306/wcd9306_anc.bin");

symlink("/data/misc/radio/qcril.db", "/system/vendor/Default/data/misc/radio/qcril.db.link");

symlink("/data/misc/wifi/WCNSS_qcom_cfg.ini", "/system/etc/firmware/wlan/prima/WCNSS_qcom_cfg.ini");

symlink("/firmware-modem/image/mba.mbn", "/system/etc/firmware/mba.mbn");

symlink("/firmware-modem/image/modem.b00", "/system/etc/firmware/modem.b00");

symlink("/firmware-modem/image/modem.b01", "/system/etc/firmware/modem.b01");

symlink("/firmware-modem/image/modem.b02", "/system/etc/firmware/modem.b02");

symlink("/firmware-modem/image/modem.b03", "/system/etc/firmware/modem.b03");

symlink("/firmware-modem/image/modem.b04", "/system/etc/firmware/modem.b04");

symlink("/firmware-modem/image/modem.b05", "/system/etc/firmware/modem.b05");

symlink("/firmware-modem/image/modem.b06", "/system/etc/firmware/modem.b06");

symlink("/firmware-modem/image/modem.b07", "/system/etc/firmware/modem.b07");

symlink("/firmware-modem/image/modem.b08", "/system/etc/firmware/modem.b08");

symlink("/firmware-modem/image/modem.b09", "/system/etc/firmware/modem.b09");

symlink("/firmware-modem/image/modem.b10", "/system/etc/firmware/modem.b10");

symlink("/firmware-modem/image/modem.b11", "/system/etc/firmware/modem.b11");

symlink("/firmware-modem/image/modem.b12", "/system/etc/firmware/modem.b12");

symlink("/firmware-modem/image/modem.b13", "/system/etc/firmware/modem.b13");

symlink("/firmware-modem/image/modem.b14", "/system/etc/firmware/modem.b14");

symlink("/firmware-modem/image/modem.b15", "/system/etc/firmware/modem.b15");

symlink("/firmware-modem/image/modem.b16", "/system/etc/firmware/modem.b16");

symlink("/firmware-modem/image/modem.b17", "/system/etc/firmware/modem.b17");

symlink("/firmware-modem/image/modem.b18", "/system/etc/firmware/modem.b18");

symlink("/firmware-modem/image/modem.b19", "/system/etc/firmware/modem.b19");

symlink("/firmware-modem/image/modem.b20", "/system/etc/firmware/modem.b20");

symlink("/firmware-modem/image/modem.b21", "/system/etc/firmware/modem.b21");

symlink("/firmware-modem/image/modem.b22", "/system/etc/firmware/modem.b22");

symlink("/firmware-modem/image/modem.b23", "/system/etc/firmware/modem.b23");

symlink("/firmware-modem/image/modem.b24", "/system/etc/firmware/modem.b24");

symlink("/firmware-modem/image/modem.b25", "/system/etc/firmware/modem.b25");

symlink("/firmware-modem/image/modem.b26", "/system/etc/firmware/modem.b26");

symlink("/firmware-modem/image/modem.b27", "/system/etc/firmware/modem.b27");

symlink("/firmware-modem/image/modem.b28", "/system/etc/firmware/modem.b28");

symlink("/firmware-modem/image/modem.mdt", "/system/etc/firmware/modem.mdt");

symlink("/firmware/image/cmnlib.b00", "/system/etc/firmware/cmnlib.b00");

symlink("/firmware/image/cmnlib.b01", "/system/etc/firmware/cmnlib.b01");

symlink("/firmware/image/cmnlib.b02", "/system/etc/firmware/cmnlib.b02");

symlink("/firmware/image/cmnlib.b03", "/system/etc/firmware/cmnlib.b03");

symlink("/firmware/image/cmnlib.mdt", "/system/etc/firmware/cmnlib.mdt");

symlink("/firmware/image/isdbtmm.b00", "/system/etc/firmware/isdbtmm.b00");

symlink("/firmware/image/isdbtmm.b01", "/system/etc/firmware/isdbtmm.b01");

symlink("/firmware/image/isdbtmm.b02", "/system/etc/firmware/isdbtmm.b02");

symlink("/firmware/image/isdbtmm.b03", "/system/etc/firmware/isdbtmm.b03");

symlink("/firmware/image/isdbtmm.mdt", "/system/etc/firmware/isdbtmm.mdt");

symlink("/firmware/image/keymaste.b00", "/system/vendor/firmware/keymaster/keymaste.b00");

symlink("/firmware/image/keymaste.b01", "/system/vendor/firmware/keymaster/keymaste.b01");

symlink("/firmware/image/keymaste.b02", "/system/vendor/firmware/keymaster/keymaste.b02");

symlink("/firmware/image/keymaste.b03", "/system/vendor/firmware/keymaster/keymaste.b03");

symlink("/firmware/image/keymaste.mdt", "/system/vendor/firmware/keymaster/keymaste.mdt");

symlink("/firmware/image/playread.b00", "/system/etc/firmware/playread.b00");

symlink("/firmware/image/playread.b01", "/system/etc/firmware/playread.b01");

symlink("/firmware/image/playread.b02", "/system/etc/firmware/playread.b02");

symlink("/firmware/image/playread.b03", "/system/etc/firmware/playread.b03");

symlink("/firmware/image/playread.mdt", "/system/etc/firmware/playread.mdt");

symlink("/firmware/image/prov.b00", "/system/etc/firmware/prov.b00");

symlink("/firmware/image/prov.b01", "/system/etc/firmware/prov.b01");

symlink("/firmware/image/prov.b02", "/system/etc/firmware/prov.b02");

symlink("/firmware/image/prov.b03", "/system/etc/firmware/prov.b03");

symlink("/firmware/image/prov.mtd", "/system/etc/firmware/prov.mtd");

symlink("/firmware/image/skm.b00", "/system/etc/firmware/skm.b00");

symlink("/firmware/image/skm.b01", "/system/etc/firmware/skm.b01");

symlink("/firmware/image/skm.b02", "/system/etc/firmware/skm.b02");

symlink("/firmware/image/skm.b03", "/system/etc/firmware/skm.b03");

symlink("/firmware/image/skm.mdt", "/system/etc/firmware/skm.mdt");

symlink("/firmware/image/sshdcpap.b00", "/system/etc/firmware/sshdcpap.b00");

symlink("/firmware/image/sshdcpap.b01", "/system/etc/firmware/sshdcpap.b01");

symlink("/firmware/image/sshdcpap.b02", "/system/etc/firmware/sshdcpap.b02");

symlink("/firmware/image/sshdcpap.b03", "/system/etc/firmware/sshdcpap.b03");

symlink("/firmware/image/sshdcpap.mdt", "/system/etc/firmware/sshdcpap.mdt");

symlink("/firmware/image/tima_atn.b00", "/system/etc/firmware/tima_atn.b00");

symlink("/firmware/image/tima_atn.b01", "/system/etc/firmware/tima_atn.b01");

symlink("/firmware/image/tima_atn.b02", "/system/etc/firmware/tima_atn.b02");

symlink("/firmware/image/tima_atn.b03", "/system/etc/firmware/tima_atn.b03");

symlink("/firmware/image/tima_atn.mdt", "/system/etc/firmware/tima_atn.mdt");

symlink("/firmware/image/tima_key.b00", "/system/etc/firmware/tima_key.b00");

symlink("/firmware/image/tima_key.b01", "/system/etc/firmware/tima_key.b01");

symlink("/firmware/image/tima_key.b02", "/system/etc/firmware/tima_key.b02");

symlink("/firmware/image/tima_key.b03", "/system/etc/firmware/tima_key.b03");

symlink("/firmware/image/tima_key.mdt", "/system/etc/firmware/tima_key.mdt");

symlink("/firmware/image/tima_lkm.b00", "/system/etc/firmware/tima_lkm.b00");

symlink("/firmware/image/tima_lkm.b01", "/system/etc/firmware/tima_lkm.b01");

symlink("/firmware/image/tima_lkm.b02", "/system/etc/firmware/tima_lkm.b02");

symlink("/firmware/image/tima_lkm.b03", "/system/etc/firmware/tima_lkm.b03");

symlink("/firmware/image/tima_lkm.mdt", "/system/etc/firmware/tima_lkm.mdt");

symlink("/firmware/image/tima_pkm.b00", "/system/etc/firmware/tima_pkm.b00");

symlink("/firmware/image/tima_pkm.b01", "/system/etc/firmware/tima_pkm.b01");

symlink("/firmware/image/tima_pkm.b02", "/system/etc/firmware/tima_pkm.b02");

symlink("/firmware/image/tima_pkm.b03", "/system/etc/firmware/tima_pkm.b03");

symlink("/firmware/image/tima_pkm.mdt", "/system/etc/firmware/tima_pkm.mdt");

symlink("/firmware/image/tz_ccm.b00", "/system/etc/firmware/tz_ccm.b00");

symlink("/firmware/image/tz_ccm.b01", "/system/etc/firmware/tz_ccm.b01");

symlink("/firmware/image/tz_ccm.b02", "/system/etc/firmware/tz_ccm.b02");

symlink("/firmware/image/tz_ccm.b03", "/system/etc/firmware/tz_ccm.b03");

symlink("/firmware/image/tz_ccm.mdt", "/system/etc/firmware/tz_ccm.mdt");

symlink("/firmware/image/venus.b00", "/system/etc/firmware/venus.b00");

symlink("/firmware/image/venus.b01", "/system/etc/firmware/venus.b01");

symlink("/firmware/image/venus.b02", "/system/etc/firmware/venus.b02");

symlink("/firmware/image/venus.b03", "/system/etc/firmware/venus.b03");

symlink("/firmware/image/venus.b04", "/system/etc/firmware/venus.b04");

symlink("/firmware/image/venus.mdt", "/system/etc/firmware/venus.mdt");

symlink("/firmware/image/wcnss.b00", "/system/etc/firmware/wcnss.b00");

symlink("/firmware/image/wcnss.b01", "/system/etc/firmware/wcnss.b01");

symlink("/firmware/image/wcnss.b02", "/system/etc/firmware/wcnss.b02");

symlink("/firmware/image/wcnss.b04", "/system/etc/firmware/wcnss.b04");

symlink("/firmware/image/wcnss.b06", "/system/etc/firmware/wcnss.b06");

symlink("/firmware/image/wcnss.b09", "/system/etc/firmware/wcnss.b09");

symlink("/firmware/image/wcnss.b10", "/system/etc/firmware/wcnss.b10");

symlink("/firmware/image/wcnss.b11", "/system/etc/firmware/wcnss.b11");

symlink("/firmware/image/wcnss.mdt", "/system/etc/firmware/wcnss.mdt");

symlink("/firmware/image/widevine.b00", "/system/vendor/firmware/widevine.b00");

symlink("/firmware/image/widevine.b01", "/system/vendor/firmware/widevine.b01");

symlink("/firmware/image/widevine.b02", "/system/vendor/firmware/widevine.b02");

symlink("/firmware/image/widevine.b03", "/system/vendor/firmware/widevine.b03");

symlink("/firmware/image/widevine.mdt", "/system/vendor/firmware/widevine.mdt");

symlink("/data/miui/miuisdk.apk", "/system/framework/miuisdk.jar");

symlink("/data/miui/miuisystem.apk", "/system/framework/miuisystem.jar");

symlink("/data/tombstones/lpass", "/system/rfs/mdm/adsp/ramdumps",

"/system/rfs/msm/adsp/ramdumps");

symlink("/data/tombstones/modem", "/system/rfs/apq/gnss/ramdumps",

"/system/rfs/mdm/mpss/ramdumps",

"/system/rfs/msm/mpss/ramdumps");

symlink("/data/tombstones/sparrow", "/system/rfs/mdm/sparrow/ramdumps");

symlink("/firmware", "/system/rfs/apq/gnss/readonly/firmware",

"/system/rfs/mdm/adsp/readonly/firmware",

"/system/rfs/mdm/mpss/readonly/firmware",

"/system/rfs/mdm/sparrow/readonly/firmware",

"/system/rfs/msm/adsp/readonly/firmware",

"/system/rfs/msm/mpss/readonly/firmware");

symlink("/persist/WCNSS_qcom_wlan_nv.bin", "/system/etc/firmware/wlan/prima/WCNSS_qcom_wlan_nv.bin");

symlink("/persist/WCNSS_wlan_dictionary.dat", "/system/etc/firmware/wlan/prima/WCNSS_wlan_dictionary.dat");

[MENTION=7960769]Eden532[/MENTION]

try it

for mount ,format nd extract

mount("ext4", "EMMC", "/dev/block/bootdevice/by-name/userdata", "/data", "");

ui_print(" ");

format("ext4", "EMMC", "/dev/block/bootdevice/by-name/system", "0", "/system");

set_progress(0.100000);

mount("ext4", "EMMC", "/dev/block/bootdevice/by-name/system", "/system");

package_extract_dir("system", "/system");

for boot.img extract

package_extract_file("boot.img", "/dev/block/bootdevice/by-name/boot");

for flashng explosion kenel

make a folder named ExplosionLP ,

then rename your explosionLP............zip to ExplosionLP.zip

make sure tem folder

then add in updter script under unmount

ui_print("-FLASHING CUSTOM KERNEL- ");

package_extract_dir("ExplosionLP", "/tmp/ExplosionLP");

run_program("/sbin/busybox", "unzip", "/tmp/ExplosionLP/ExplosionLP.zip", "META-INF/com/google/android/*", "-d", "/tmp/ExplosionLP");

run_program("/sbin/busybox", "sh", "/tmp/ExplosionLP/META-INF/com/google/android/update-binary", "dummy", "1", "/tmp/ExplosionLP/ExplosionLP.zip");