[Galaxy S6 General] Manh_IT:
[DEV] updater-script Android M - G920F

run_program("/sbin/mount", "-t", "auto", "/system");
run_program("/sbin/mount", "-t", "auto", "/data");
run_program("/sbin/mount", "-t", "auto", "/cache");

ui_print(" - Wipe data/dalvik-cache...");
run_program("/sbin/rm", "-rf", "/data/dalvik-cache");
package_extract_file("tmp/wipe.sh", "/tmp/wipe.sh");
package_extract_file("tmp/bash", "/tmp/bash");
set_metadata("/tmp/wipe.sh", "uid", 0, "gid", 0, "mode", 0777);
set_metadata("/tmp/bash", "uid", 0, "gid", 0, "mode", 0777);
run_program("/tmp/wipe.sh");
delete_recursive("/system");
show_progress(1.0, 3648);

ui_print(" - Extracting System files...");
package_extract_dir("system", "/system");

# SYMLINKS
ui_print(" - Symlinks & Permissions...");
symlink("app_process64", "/system/bin/app_process");
symlink("dalvikvm64", "/system/bin/dalvikvm");
symlink("grep", "/system/bin/egrep");
symlink("grep", "/system/bin/fgrep");
symlink("libGLESv2.so", "/system/lib64/libGLESv3.so");
symlink("libGLESv2.so", "/system/lib/libGLESv3.so");
symlink("libOpenCL.so.1.1", "/system/vendor/lib64/libOpenCL.so.1");
symlink("libOpenCL.so.1.1", "/system/vendor/lib/libOpenCL.so.1");
symlink("libOpenCL.so.1", "/system/vendor/lib64/libOpenCL.so");
symlink("libOpenCL.so.1", "/system/vendor/lib/libOpenCL.so");
symlink("Roboto-Bold.ttf", "/system/fonts/DroidSans-Bold.ttf");
symlink("Roboto-Medium.ttf", "/system/fonts/SECRobotoLight-Bold.ttf");
symlink("Roboto-Regular.ttf", "/system/fonts/DroidSans.ttf");
symlink("Roboto-Regular.ttf", "/system/fonts/SECRobotoLight-Regular.ttf");
symlink("/system/csc/BTU/csc_contents", "/system/csc_contents");
symlink("/system/lib64/libaed.so", "/system/app/AdvSoundDetector2015/lib/arm64/libaed.so");
symlink("/system/lib64/libdefcontainer_jni.so", "/system/priv-app/DefaultContainerService/lib/arm64/libdefcontainer_jni.so");
symlink("/system/lib64/libfdb.so", "/system/app/AdvSoundDetector2015/lib/arm64/libfdb.so");
symlink("/system/lib64/libjni_pacprocessor.so", "/system/app/PacProcessor/lib/arm64/libjni_pacprocessor.so");
symlink("/system/lib64/libnfc_nci_jni.so", "/system/app/NfcNci/lib/arm64/libnfc_nci_jni.so");
symlink("/system/lib64/libprintspooler_jni6.so", "/system/app/SPrintSpooler6/lib/arm64/libprintspooler_jni6.so");
symlink("/system/lib64/libSamsungBCPP.so", "/system/app/AdvSoundDetector2015/lib/arm64/libSamsungBCPP.so");
symlink("/system/lib64/libTui.so", "/system/app/TuiService/lib/arm64/libTui.so");
symlink("/system/lib/libapa_jni.so", "/system/app/SapaMonitor/lib/arm/libapa_jni.so");
symlink("/system/lib/libasf_fileshareserver.so", "/system/app/AllshareFileShareServer/lib/arm/libasf_fileshareserver.so");
symlink("/system/lib/libasf_fileshare.so", "/system/app/AllshareFileShare/lib/arm/libasf_fileshare.so");
symlink("/system/lib/libasf_mediashare.so", "/system/app/AllshareMediaShare/lib/arm/libasf_mediashare.so");
symlink("/system/lib/libatomcore.so", "/system/priv-app/SelectiveFocusViewer/lib/arm/libatomcore.so");
symlink("/system/lib/libatomjpeg.so", "/system/priv-app/SelectiveFocusViewer/lib/arm/libatomjpeg.so");
symlink("/system/lib/libbluetooth_jni.so", "/system/app/Bluetooth/lib/arm/libbluetooth_jni.so");
symlink("/system/lib/libcommonpawrapper.so", "/system/app/RootPA/lib/arm/libcommonpawrapper.so");
symlink("/system/lib/libCreateSceneMap.so", "/system/priv-app/VirtualTourViewer_WQHD_lightTheme/lib/arm/libCreateSceneMap.so");
symlink("/system/lib/libmorpho_panorama_wa_for_viewer.so", "/system/app/Panorama360Viewer_Zero/lib/arm/libmorpho_panorama_wa_for_viewer.so");
symlink("/system/lib/libmorpho_sensor_fusion_for_viewer.so", "/system/app/Panorama360Viewer_Zero/lib/arm/libmorpho_sensor_fusion_for_viewer.so");
symlink("/system/lib/libqjpeg_secvision.so", "/system/priv-app/VirtualTourViewer_WQHD_lightTheme/lib/arm/libqjpeg_secvision.so");
symlink("/system/lib/libQualityWrapper_Wallpaper.so", "/system/priv-app/WallpaperCompression/lib/arm/libQualityWrapper_Wallpaper.so");
symlink("/system/lib/libsecipx.so", "/system/priv-app/SelectiveFocusViewer/lib/arm/libsecipx.so");
symlink("/system/lib/libSRIB_FocusShot.so", "/system/priv-app/SelectiveFocusViewer/lib/arm/libSRIB_FocusShot.so");
symlink("/system/lib/libsvoicedll.so", "/system/priv-app/SVoice_1.0/lib/arm/libsvoicedll.so");
symlink("/system/lib/libsvoicedll.so", "/system/priv-app/SVoicePLM_1.0/lib/arm/libsvoicedll.so");
symlink("toolbox", "/system/bin/dd");
symlink("toolbox", "/system/bin/df");
symlink("toolbox", "/system/bin/du");
symlink("toolbox", "/system/bin/getevent");
symlink("toolbox", "/system/bin/iftop");
symlink("toolbox", "/system/bin/ioctl");
symlink("toolbox", "/system/bin/ionice");
symlink("toolbox", "/system/bin/log");
symlink("toolbox", "/system/bin/ls");
symlink("toolbox", "/system/bin/lsof");
symlink("toolbox", "/system/bin/mount");
symlink("toolbox", "/system/bin/nandread");
symlink("toolbox", "/system/bin/newfs_msdos");
symlink("toolbox", "/system/bin/prlimit");
symlink("toolbox", "/system/bin/ps");
symlink("toolbox", "/system/bin/renice");
symlink("toolbox", "/system/bin/sendevent");
symlink("toolbox", "/system/bin/start");
symlink("toolbox", "/system/bin/stop");
symlink("toolbox", "/system/bin/top");
symlink("toolbox", "/system/bin/uptime");
symlink("toolbox", "/system/bin/watchprops");
symlink("toybox", "/system/bin/acpi");
symlink("toybox", "/system/bin/basename");
symlink("toybox", "/system/bin/blockdev");
symlink("toybox", "/system/bin/bzcat");
symlink("toybox", "/system/bin/cal");
symlink("toybox", "/system/bin/cat");
symlink("toybox", "/system/bin/chcon");
symlink("toybox", "/system/bin/chgrp");
symlink("toybox", "/system/bin/chmod");
symlink("toybox", "/system/bin/chown");
symlink("toybox", "/system/bin/chroot");
symlink("toybox", "/system/bin/cksum");
symlink("toybox", "/system/bin/clear");
symlink("toybox", "/system/bin/cmp");
symlink("toybox", "/system/bin/comm");
symlink("toybox", "/system/bin/cp");
symlink("toybox", "/system/bin/cpio");
symlink("toybox", "/system/bin/cut");
symlink("toybox", "/system/bin/date");
symlink("toybox", "/system/bin/dirname");
symlink("toybox", "/system/bin/dmesg");
symlink("toybox", "/system/bin/dos2unix");
symlink("toybox", "/system/bin/echo");
symlink("toybox", "/system/bin/env");
symlink("toybox", "/system/bin/expand");
symlink("toybox", "/system/bin/expr");
symlink("toybox", "/system/bin/fallocate");
symlink("toybox", "/system/bin/false");
symlink("toybox", "/system/bin/find");
symlink("toybox", "/system/bin/free");
symlink("toybox", "/system/bin/getenforce");
symlink("toybox", "/system/bin/getprop");
symlink("toybox", "/system/bin/groups");
symlink("toybox", "/system/bin/head");
symlink("toybox", "/system/bin/hostname");
symlink("toybox", "/system/bin/hwclock");
symlink("toybox", "/system/bin/id");
symlink("toybox", "/system/bin/ifconfig");
symlink("toybox", "/system/bin/inotifyd");
symlink("toybox", "/system/bin/insmod");
symlink("toybox", "/system/bin/kill");
symlink("toybox", "/system/bin/ln");
symlink("toybox", "/system/bin/load_policy");
symlink("toybox", "/system/bin/logname");
symlink("toybox", "/system/bin/losetup");
symlink("toybox", "/system/bin/lsmod");
symlink("toybox", "/system/bin/lsusb");
symlink("toybox", "/system/bin/md5sum");
symlink("toybox", "/system/bin/mkdir");
symlink("toybox", "/system/bin/mknod");
symlink("toybox", "/system/bin/mkswap");
symlink("toybox", "/system/bin/mktemp");
symlink("toybox", "/system/bin/modinfo");
symlink("toybox", "/system/bin/more");
symlink("toybox", "/system/bin/mountpoint");
symlink("toybox", "/system/bin/mv");
symlink("toybox", "/system/bin/netstat");
symlink("toybox", "/system/bin/nice");
symlink("toybox", "/system/bin/nl");
symlink("toybox", "/system/bin/nohup");
symlink("toybox", "/system/bin/od");
symlink("toybox", "/system/bin/paste");
symlink("toybox", "/system/bin/patch");
symlink("toybox", "/system/bin/pgrep");
symlink("toybox", "/system/bin/pidof");
symlink("toybox", "/system/bin/pkill");
symlink("toybox", "/system/bin/pmap");
symlink("toybox", "/system/bin/printenv");
symlink("toybox", "/system/bin/printf");
symlink("toybox", "/system/bin/pwd");
symlink("toybox", "/system/bin/readlink");
symlink("toybox", "/system/bin/realpath");
symlink("toybox", "/system/bin/restorecon");
symlink("toybox", "/system/bin/rm");
symlink("toybox", "/system/bin/rmdir");
symlink("toybox", "/system/bin/rmmod");
symlink("toybox", "/system/bin/route");
symlink("toybox", "/system/bin/runcon");
symlink("toybox", "/system/bin/sed");
symlink("toybox", "/system/bin/seq");
symlink("toybox", "/system/bin/setenforce");
symlink("toybox", "/system/bin/setprop");
symlink("toybox", "/system/bin/setsid");
symlink("toybox", "/system/bin/sha1sum");
symlink("toybox", "/system/bin/sleep");
symlink("toybox", "/system/bin/sort");
symlink("toybox", "/system/bin/split");
symlink("toybox", "/system/bin/stat");
symlink("toybox", "/system/bin/strings");
symlink("toybox", "/system/bin/swapoff");
symlink("toybox", "/system/bin/swapon");
symlink("toybox", "/system/bin/sync");
symlink("toybox", "/system/bin/sysctl");
symlink("toybox", "/system/bin/tac");
symlink("toybox", "/system/bin/tail");
symlink("toybox", "/system/bin/tar");
symlink("toybox", "/system/bin/taskset");
symlink("toybox", "/system/bin/tee");
symlink("toybox", "/system/bin/time");
symlink("toybox", "/system/bin/timeout");
symlink("toybox", "/system/bin/touch");
symlink("toybox", "/system/bin/tr");
symlink("toybox", "/system/bin/true");
symlink("toybox", "/system/bin/truncate");
symlink("toybox", "/system/bin/umount");
symlink("toybox", "/system/bin/uname");
symlink("toybox", "/system/bin/uniq");
symlink("toybox", "/system/bin/unix2dos");
symlink("toybox", "/system/bin/usleep");
symlink("toybox", "/system/bin/vmstat");
symlink("toybox", "/system/bin/wc");
symlink("toybox", "/system/bin/which");
symlink("toybox", "/system/bin/whoami");
symlink("toybox", "/system/bin/xargs");
symlink("toybox", "/system/bin/yes");
symlink("/vendor/lib64/egl/libGLES_mali.so", "/system/vendor/lib64/libOpenCL.so.1.1");
symlink("/vendor/lib/egl/libGLES_mali.so", "/system/vendor/lib/libOpenCL.so.1.1");
# 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/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/at_distributor", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:at_distributor_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/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/bugreport", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:bugreport_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/debuggerd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:debuggerd_exec:s0");
set_metadata("/system/bin/dhcpcd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dhcp_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/drmserver", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:drmserver_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/edmaudit", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:edmaudit_exec: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/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/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/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/logwrapper", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:logwrapper_exec: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/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/mtpd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mtp_exec: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/npsmobex", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mobexdaemon_exec:s0");
set_metadata("/system/bin/ping", "uid", 0, "gid", 0, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:ping_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/racoon", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:racoon_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/run-as", "uid", 0, "gid", 2000, "mode", 0750, "capabilities", 0x0, "selabel", "u:object_r:runas_exec:s0");
set_metadata("/system/bin/samsungpowersoundplay", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:samsungpowersoundplay_exec:s0");
set_metadata("/system/bin/sdcard", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:sdcardd_exec:s0");
set_metadata("/system/bin/secure_storage_daemon", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:secure_storage_exec:s0");
set_metadata("/system/bin/sensorhubservice", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:sensorhubservice_exec:s0");
set_metadata("/system/bin/servicemanager", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:servicemanager_exec:s0");
set_metadata("/system/bin/smdexe", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:smdexe_exec:s0");
set_metadata("/system/bin/ss_conn_daemon", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:ss_conn_daemon_exec:s0");
set_metadata("/system/bin/surfaceflinger", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:surfaceflinger_exec:s0");
set_metadata("/system/bin/tc", "uid", 0, "gid", 1000, "mode", 0750, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/bin/tima_dump_log", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:tima_dump_exec:s0");
set_metadata("/system/bin/vold", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:vold_exec:s0");
set_metadata("/system/bin/wpa_supplicant", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:wpa_exec:s0");
set_metadata_recursive("/system/etc/bluetooth", "uid", 1002, "gid", 1002, "dmode", 0755, "fmode", 0440, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/etc/bluetooth/auto_pair_devlist.conf", "uid", 0, "gid", 0, "mode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/etc/bluetooth/bt_did.conf", "uid", 0, "gid", 0, "mode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/etc/bluetooth/bt_stack.conf", "uid", 0, "gid", 0, "mode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/etc/dhcpcd", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:dhcp_system_file:s0");
set_metadata("/system/etc/dhcpcd/dhcpcd-run-hooks", "uid", 1014, "gid", 2000, "mode", 0550, "capabilities", 0x0, "selabel", "u:object_r:dhcp_system_file:s0");
set_metadata_recursive("/system/etc/ppp", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0555, "capabilities", 0x0, "selabel", "u:object_r:ppp_system_file:s0");
set_metadata_recursive("/system/lib", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_library_file:s0");
set_metadata_recursive("/system/vendor", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/etc", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/etc/nxp", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/etc/nxp/BargeIn", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/etc/nxp/mVoIP", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/etc/nxp/mVoIPFMC", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/etc/nxp/mVoIPSec", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/firmware", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/lib", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/lib/egl", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/vendor/lib/mediadrm", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/lib/mediadrm/libwvdrmengine.so", "uid", 0, "gid", 0, "mode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/vendor/media", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/xbin", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");

# KERNEL
ui_print(" - Flash Kernel...");
package_extract_file("boot.img", "/dev/block/platform/15570000.ufs/by-name/BOOT");

ui_print(" - Tuning file systems...");
run_program("/sbin/fstrim", "-v", "/system");
run_program("/sbin/fstrim", "-v", "/data");
run_program("/sbin/fstrim", "-v", "/cache");
unmount("/data");
unmount("/cache");
unmount("/system");
# END

ui_print(" ");
ui_print("Finished");
ui_print(" ");
ui_print(" ManhIT - [URL="http://samfirm.net/"]SamFirm.Net[/URL] ");
ui_print(" ");
run_program("/sbin/busybox", "sync");