[Galaxy Grand 2 General] ahemad8199:
ui_print("AHEMAD");

ui_print("");
ui_print("Mount /system ...");
show_progress(0.500000, 0);
run_program("/sbin/mount", "-t", "auto", "/system");
ui_print("Format /system ...");
show_progress(0.500000, 0);
delete_recursive("/system");
show_progress(1.0, 3135);
ui_print("Installing MIUI 7 SAMSUNG...");
ui_print("");
package_extract_dir("system", "/system");
ui_print("Detecting device...");
ui_print("Detected device:");
ui_print(getprop("ro.product.device"));
ui_print("");
if getprop("ro.product.device") == "ms013g"
then
ui_print(" - flashing Grand2 kernel");
package_extract_file("boot.img", "/dev/block/platform/msm_sdcc.1/by-name/boot");
package_extract_dir("system", "/system");
else
ui_print("");
endif;

ui_print("Making symlinks ...");
show_progress(0.500000, 0);
# updater-script-10_SYMLINKS
symlink("app_process32", "/system/bin/app_process");
symlink("dalvikvm32", "/system/bin/dalvikvm");
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");
#
##### EXTRA modem symlinks
#
symlink("/firmware-modem/image/adsp.b00", "/system/etc/firmware/adsp.b00");
symlink("/firmware-modem/image/adsp.b01", "/system/etc/firmware/adsp.b01");
symlink("/firmware-modem/image/adsp.b02", "/system/etc/firmware/adsp.b02");
symlink("/firmware-modem/image/adsp.b03", "/system/etc/firmware/adsp.b03");
symlink("/firmware-modem/image/adsp.b04", "/system/etc/firmware/adsp.b04");
symlink("/firmware-modem/image/adsp.b05", "/system/etc/firmware/adsp.b05");
symlink("/firmware-modem/image/adsp.b06", "/system/etc/firmware/adsp.b06");
symlink("/firmware-modem/image/adsp.b08", "/system/etc/firmware/adsp.b08");
symlink("/firmware-modem/image/adsp.b09", "/system/etc/firmware/adsp.b09");
symlink("/firmware-modem/image/adsp.b10", "/system/etc/firmware/adsp.b10");
symlink("/firmware-modem/image/adsp.b11", "/system/etc/firmware/adsp.b11");
symlink("/firmware-modem/image/adsp.b12", "/system/etc/firmware/adsp.b12");
symlink("/firmware-modem/image/adsp.b13", "/system/etc/firmware/adsp.b13");
symlink("/firmware-modem/image/adsp.mdt", "/system/etc/firmware/adsp.mdt");
symlink("/firmware-modem/image/mba.b00", "/system/etc/firmware/mba.b00");
symlink("/firmware-modem/image/mba.mdt", "/system/etc/firmware/mba.mdt");
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.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.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.b29", "/system/etc/firmware/modem.b29");
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/keymaster.b00");
symlink("/firmware/image/keymaste.b01", "/system/vendor/firmware/keymaster/keymaster.b01");
symlink("/firmware/image/keymaste.b02", "/system/vendor/firmware/keymaster/keymaster.b02");
symlink("/firmware/image/keymaste.b03", "/system/vendor/firmware/keymaster/keymaster.b03");
symlink("/firmware/image/keymaste.mdt", "/system/vendor/firmware/keymaster/keymaster.mdt");
symlink("/firmware/image/mc_v2.b00", "/system/etc/firmware/mc_v2.b00");
symlink("/firmware/image/mc_v2.b01", "/system/etc/firmware/mc_v2.b01");
symlink("/firmware/image/mc_v2.b02", "/system/etc/firmware/mc_v2.b02");
symlink("/firmware/image/mc_v2.b03", "/system/etc/firmware/mc_v2.b03");
symlink("/firmware/image/mc_v2.mdt", "/system/etc/firmware/mc_v2.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/sec_stor.b00", "/system/etc/firmware/sec_stor.b00");
symlink("/firmware/image/sec_stor.b01", "/system/etc/firmware/sec_stor.b01");
symlink("/firmware/image/sec_stor.b02", "/system/etc/firmware/sec_stor.b02");
symlink("/firmware/image/sec_stor.b03", "/system/etc/firmware/sec_stor.b03");
symlink("/firmware/image/sec_stor.mdt", "/system/etc/firmware/sec_stor.mdt");
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/skmm_ta.b00", "/system/etc/firmware/skmm_ta.b00");
symlink("/firmware/image/skmm_ta.b01", "/system/etc/firmware/skmm_ta.b01");
symlink("/firmware/image/skmm_ta.b02", "/system/etc/firmware/skmm_ta.b02");
symlink("/firmware/image/skmm_ta.b03", "/system/etc/firmware/skmm_ta.b03");
symlink("/firmware/image/skmm_ta.mdt", "/system/etc/firmware/skmm_ta.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/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/tzpr25.b00", "/system/etc/firmware/tzpr25.b00");
symlink("/firmware/image/tzpr25.b01", "/system/etc/firmware/tzpr25.b01");
symlink("/firmware/image/tzpr25.b02", "/system/etc/firmware/tzpr25.b02");
symlink("/firmware/image/tzpr25.b03", "/system/etc/firmware/tzpr25.b03");
symlink("/firmware/image/tzpr25.mdt", "/system/etc/firmware/tzpr25.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.b07", "/system/etc/firmware/wcnss.b07");
symlink("/firmware/image/wcnss.b08", "/system/etc/firmware/wcnss.b08");
symlink("/firmware/image/wcnss.b09", "/system/etc/firmware/wcnss.b09");
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("libGLESv2.so", "/system/lib/libGLESv3.so");
symlink("logcat", "/system/bin/lolcat");
symlink("Miui-Regular.ttf", "/system/fonts/Miui-Regular.ttf");
symlink("Miui-Regular.ttf", "/system/fonts/Miui-Regular.ttf");
# symlink("/system/lib/libapa_jni.so", "/system/app/SapaMonitor/lib/arm/libapa_jni.so");
symlink("/system/lib/libbluetooth_jni.so", "/system/app/Bluetooth/lib/armeabi-v7a/libbluetooth_jni.so");
# symlink("/system/lib/libcommonpawrapper.so", "/system/app/RootPA/lib/arm/libcommonpawrapper.so");
symlink("/system/lib/libdefcontainer_jni.so", "/system/priv-app/DefaultContainerService/lib/arm/libdefcontainer_jni.so");
# symlink("/system/lib/libjni_emailencryption.so", "/system/app/SecEmail_K/lib/arm/libjni_emailencryption.so");
symlink("/system/lib/libjni_pacprocessor.so", "/system/app/PacProcessor/lib/arm/libjni_pacprocessor.so");
# symlink("/system/lib/libprintspooler_jni_mr1.so", "/system/app/SPrintSpoolerLMR1/lib/arm/libprintspooler_jni_mr1.so");
# symlink("/system/lib/libSecFileClientUnit.so", "/system/priv-app/SamsungLinkPlatform/lib/arm/libSecFileClientUnit.so");
# symlink("/system/lib/libSLPF_scone_stub.so", "/system/priv-app/SamsungLinkPlatform/lib/arm/libSLPF_scone_stub.so");
# symlink("/system/lib/libSLPF_security.so", "/system/priv-app/SamsungLinkPlatform/lib/arm/libSLPF_security.so");
# symlink("/system/lib/libSLPF_transcoder_jni_kk.so", "/system/priv-app/SamsungLinkPlatform/lib/arm/libSLPF_transcoder_jni_kk.so");
# symlink("/system/lib/libSLPF_transcoder_jni_ll.so", "/system/priv-app/SamsungLinkPlatform/lib/arm/libSLPF_transcoder_jni_ll.so");
# symlink("/system/lib/libswiftkeysdk-java.so", "/system/app/SamsungIME/lib/arm/libswiftkeysdk-java.so");
symlink("/system/lib/modules/pronto/pronto_wlan.ko", "/system/lib/modules/wlan.ko");
symlink("toolbox", "/system/bin/cat");
symlink("toolbox", "/system/bin/chcon");
symlink("toolbox", "/system/bin/chmod");
symlink("toolbox", "/system/bin/chown");
symlink("toolbox", "/system/bin/clear");
symlink("toolbox", "/system/bin/cmp");
symlink("toolbox", "/system/bin/cp");
symlink("toolbox", "/system/bin/date");
symlink("toolbox", "/system/bin/dd");
symlink("toolbox", "/system/bin/df");
symlink("toolbox", "/system/bin/dmesg");
symlink("toolbox", "/system/bin/du");
symlink("toolbox", "/system/bin/getenforce");
symlink("toolbox", "/system/bin/getevent");
symlink("toolbox", "/system/bin/getprop");
symlink("toolbox", "/system/bin/getsebool");
symlink("toolbox", "/system/bin/grep");
symlink("toolbox", "/system/bin/hd");
symlink("toolbox", "/system/bin/id");
symlink("toolbox", "/system/bin/ifconfig");
symlink("toolbox", "/system/bin/iftop");
symlink("toolbox", "/system/bin/insmod");
symlink("toolbox", "/system/bin/ioctl");
symlink("toolbox", "/system/bin/ionice");
symlink("toolbox", "/system/bin/kill");
symlink("toolbox", "/system/bin/ln");
symlink("toolbox", "/system/bin/load_policy");
symlink("toolbox", "/system/bin/log");
symlink("toolbox", "/system/bin/ls");
symlink("toolbox", "/system/bin/lsmod");
symlink("toolbox", "/system/bin/lsof");
symlink("toolbox", "/system/bin/md5");
symlink("toolbox", "/system/bin/mkdir");
symlink("toolbox", "/system/bin/mknod");
symlink("toolbox", "/system/bin/mkswap");
symlink("toolbox", "/system/bin/mount");
symlink("toolbox", "/system/bin/mv");
symlink("toolbox", "/system/bin/nandread");
symlink("toolbox", "/system/bin/netstat");
symlink("toolbox", "/system/bin/newfs_msdos");
symlink("toolbox", "/system/bin/nohup");
symlink("toolbox", "/system/bin/notify");
symlink("toolbox", "/system/bin/printenv");
symlink("toolbox", "/system/bin/prlimit");
symlink("toolbox", "/system/bin/ps");
symlink("toolbox", "/system/bin/readlink");
symlink("toolbox", "/system/bin/renice");
symlink("toolbox", "/system/bin/restorecon");
symlink("toolbox", "/system/bin/rm");
symlink("toolbox", "/system/bin/rmdir");
symlink("toolbox", "/system/bin/rmmod");
symlink("toolbox", "/system/bin/route");
symlink("toolbox", "/system/bin/runcon");
symlink("toolbox", "/system/bin/schedtop");
symlink("toolbox", "/system/bin/sendevent");
symlink("toolbox", "/system/bin/setenforce");
symlink("toolbox", "/system/bin/setprop");
symlink("toolbox", "/system/bin/setsebool");
symlink("toolbox", "/system/bin/sleep");
symlink("toolbox", "/system/bin/smd");
symlink("toolbox", "/system/bin/start");
symlink("toolbox", "/system/bin/stop");
symlink("toolbox", "/system/bin/swapoff");
symlink("toolbox", "/system/bin/swapon");
symlink("toolbox", "/system/bin/sync");
symlink("toolbox", "/system/bin/top");
symlink("toolbox", "/system/bin/touch");
symlink("toolbox", "/system/bin/touchinput");
symlink("toolbox", "/system/bin/umount");
symlink("toolbox", "/system/bin/uptime");
symlink("toolbox", "/system/bin/vmstat");
symlink("toolbox", "/system/bin/watchprops");
symlink("toolbox", "/system/bin/wipe");
ui_print("Setting Permissions...");
set_metadata_recursive("/system", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/bin", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/bin/ATFWD-daemon", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:atfwd_exec:s0");
set_metadata("/system/bin/PktRspTest", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:diag_exec:s0");
set_metadata("/system/bin/StoreKeybox", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/bin/adsprpcd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:adsprpcd_exec:s0");
set_metadata("/system/bin/androidshmservice", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:androidshmservice_exec:s0");
set_metadata("/system/bin/apaservice", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:apaservice_exec:s0");
set_metadata("/system/bin/app_process", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:zygote_exec:s0");
set_metadata("/system/bin/app_process32", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:zygote_exec:s0");
set_metadata("/system/bin/at_distributor", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:at_distributor_exec:s0");
set_metadata("/system/bin/audiod", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:audiod_exec:s0");
set_metadata("/system/bin/auditd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:auditd_exec:s0");
set_metadata("/system/bin/bintvoutservice", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:bintvoutservice_exec:s0");
set_metadata("/system/bin/blkid", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/bin/bootanimation", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:bootanim_exec:s0");
set_metadata("/system/bin/bootchecker", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:bootchecker_exec:s0");
set_metadata("/system/bin/bridgemgrd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/bin/bugreport", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:bugreport_exec:s0");
set_metadata("/system/bin/charger_monitor", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:charger_monitor_exec:s0");
set_metadata("/system/bin/charon", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:charon_exec:s0");
set_metadata("/system/bin/clatd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:clatd_exec:s0");
set_metadata("/system/bin/connfwexe", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:connfwexe_exec:s0");
set_metadata("/system/bin/cs", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:cs_exec:s0");
set_metadata("/system/bin/ddexe", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:ddexe_exec:s0");
set_metadata("/system/bin/debuggerd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:debuggerd_exec:s0");
set_metadata("/system/bin/dex2oat", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dex2oat_exec:s0");
set_metadata_recursive("/system/bin/dhcpcd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dhcp_exec:s0");
set_metadata("/system/bin/diag_callback_client", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:diag_exec:s0");
set_metadata("/system/bin/diag_dci_sample", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:diag_exec:s0");
set_metadata("/system/bin/diag_klog", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:diag_exec:s0");
set_metadata("/system/bin/diag_mdlog", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:diag_exec:s0");
set_metadata("/system/bin/diag_qshrink4_daemon", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:diag_exec:s0");
set_metadata("/system/bin/diag_socket_log", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:diag_exec:s0");
set_metadata("/system/bin/diag_uart_log", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:diag_exec:s0");
set_metadata("/system/bin/dnsmasq", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dnsmasq_exec:s0");
set_metadata("/system/bin/drmdiagapp", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:diag_exec:s0");
set_metadata("/system/bin/drmserver", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:drmserver_exec:s0");
set_metadata("/system/bin/drsd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:drsd_exec:s0");
set_metadata("/system/bin/dumpstate", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dumpstate_exec:s0");
set_metadata("/system/bin/dumpsys", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dumpsys_exec:s0");
set_metadata("/system/bin/dun-server", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dun-server_exec:s0");
set_metadata("/system/bin/edmaudit", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:edmaudit_exec:s0");
set_metadata("/system/bin/e2fsck", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/bin/fsck_msdos", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/bin/hostapd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:hostapd_exec:s0");
set_metadata("/system/bin/hostapd_cli", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:hostapd_exec:s0");
set_metadata("/system/bin/hvdcp", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:hvdcp_exec:s0");
set_metadata("/system/bin/icd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:icd_exec:s0");
set_metadata("/system/bin/immvibed", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:immvibed_exec:s0");
set_metadata("/system/bin/ims_rtp_daemon", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:ims_exec:s0");
set_metadata("/system/bin/imscmservice", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:imscm_exec:s0");
set_metadata("/system/bin/imsdatadaemon", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:ims_exec:s0");
set_metadata("/system/bin/imsqmidaemon", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:ims_exec:s0");
set_metadata("/system/bin/install-recovery.sh", "uid", 0, "gid", 0, "mode", 0750, "capabilities", 0x0, "selabel", "u:object_r:install_recovery_exec:s0");
set_metadata("/system/bin/installd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:installd_exec:s0");
set_metadata("/system/bin/insthk", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:insthk_exec:s0");
set_metadata("/system/bin/iptables", "uid", 0, "gid", 1000, "mode", 0750, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/bin/ip6tables", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/bin/irsc_util", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:irsc_util_exec:s0");
set_metadata("/system/bin/isdbtmmtest", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/bin/jackservice", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:jackservice_exec:s0");
set_metadata("/system/bin/keystore", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:keystore_exec:s0");
set_metadata("/system/bin/lmkd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:lmkd_exec:s0");
set_metadata("/system/bin/loc_launcher", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:location_exec:s0");
set_metadata("/system/bin/logcat", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/bin/logd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:logd_exec:s0");
set_metadata("/system/bin/logwrapper", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/bin/macloader", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:macloader_exec:s0");
set_metadata("/system/bin/make_ext4fs", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/bin/mcDriverDaemon", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mobicoredaemon_exec:s0");
set_metadata("/system/bin/mcStarter", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mcStarter_exec:s0");
set_metadata("/system/bin/mdnsd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mdnsd_exec:s0");
set_metadata("/system/bin/mediaserver", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mediaserver_exec:s0");
set_metadata("/system/bin/mfgloader", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mfgloader_exec:s0");
set_metadata("/system/bin/mm-pp-daemon", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mm-pp-daemon_exec:s0");
set_metadata("/system/bin/mm-qcamera-daemon", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mm-qcamerad_exec:s0");
set_metadata("/system/bin/mpdecision", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mpdecision_exec:s0");
set_metadata("/system/bin/mtpd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mtp_exec:s0");
set_metadata("/system/bin/ndc", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/bin/netcfg", "uid", 0, "gid", 3003, "mode", 02750, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/bin/netd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:netd_exec:s0");
set_metadata("/system/bin/netmgrd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:netmgrd_exec:s0");
set_metadata("/system/bin/npsmobex", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mobexdaemon_exec:s0");
set_metadata("/system/bin/olsrd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:olsrd_exec:s0");
set_metadata("/system/bin/otp_server", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:otp_server_exec:s0");
set_metadata("/system/bin/patchoat", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dex2oat_exec:s0");
set_metadata("/system/bin/perfd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:perfd_exec:s0");
set_metadata("/system/bin/ping", "uid", 0, "gid", 0, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/bin/port-bridge", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:port-bridge_exec:s0");
set_metadata("/system/bin/pppd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:ppp_exec:s0");
set_metadata("/system/bin/prepare_param.sh", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:prepare_param_sh_file:s0");
set_metadata("/system/bin/ptt_socket_app", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:ptt_socket_app_exec:s0");
set_metadata("/system/bin/qmiproxy", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:qmiproxy_exec:s0");
set_metadata("/system/bin/qmuxd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:qmuxd_exec:s0");
set_metadata("/system/bin/qseecom_sample_client", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/bin/qseecom_security_test", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/bin/qseecomd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:tee_exec:s0");
set_metadata("/system/bin/racoon", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:racoon_exec:s0");
set_metadata("/system/bin/resetreason", "uid", 1000, "gid", 1000, "mode", 0710, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/bin/rfs_access", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:rfs_access_exec:s0");
set_metadata("/system/bin/rild", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:rild_exec:s0");
set_metadata("/system/bin/rm