[Samsung Galaxy S5 Neo Guides, News, & Discussion] :
about permissions;

here is stock S6 Marshmallow update permissions

ui_print("Symlinks and permissions...");

delete("/system/priv-app/WallpaperCompression/lib/arm/libQualityWrapper_Wallpaper.so",

"/system/priv-app/SelectiveFocusViewer/lib/arm/libSRIB_FocusShot.so",

"/system/priv-app/SelectiveFocusViewer/lib/arm/libatomcore.so",

"/system/priv-app/SelectiveFocusViewer/lib/arm/libatomjpeg.so",

"/system/priv-app/SelectiveFocusViewer/lib/arm/libsecipx.so",

"/system/priv-app/SVoicePLM_1.0/lib/arm/libsvoicedll.so",

"/system/priv-app/SVoice_1.0/lib/arm/libsvoicedll.so",

"/system/app/TuiService/lib/arm64/libTui.so",

"/system/app/SPrintSpooler6/lib/arm64/libprintspooler_jni6.so",

"/system/fonts/SECRobotoLight-Bold.ttf",

"/system/fonts/SECRobotoLight-Regular.ttf", "/system/bin/egrep",

"/system/bin/fgrep", "/system/bin/acpi", "/system/bin/basename",

"/system/bin/blockdev", "/system/bin/bzcat", "/system/bin/cal",

"/system/bin/cat", "/system/bin/chcon", "/system/bin/chgrp",

"/system/bin/chmod", "/system/bin/chown", "/system/bin/chroot",

"/system/bin/cksum", "/system/bin/clear", "/system/bin/cmp",

"/system/bin/comm", "/system/bin/cp", "/system/bin/cpio",

"/system/bin/cut", "/system/bin/date", "/system/bin/dirname",

"/system/bin/dmesg", "/system/bin/dos2unix", "/system/bin/echo",

"/system/bin/env", "/system/bin/expand", "/system/bin/expr",

"/system/bin/fallocate", "/system/bin/false", "/system/bin/find",

"/system/bin/free", "/system/bin/getenforce", "/system/bin/getprop",

"/system/bin/groups", "/system/bin/head", "/system/bin/hostname",

"/system/bin/hwclock", "/system/bin/id", "/system/bin/ifconfig",

"/system/bin/inotifyd", "/system/bin/insmod", "/system/bin/kill",

"/system/bin/ln", "/system/bin/load_policy", "/system/bin/logname",

"/system/bin/losetup", "/system/bin/lsmod", "/system/bin/lsusb",

"/system/bin/md5sum", "/system/bin/mkdir", "/system/bin/mknod",

"/system/bin/mkswap", "/system/bin/mktemp", "/system/bin/modinfo",

"/system/bin/more", "/system/bin/mountpoint", "/system/bin/mv",

"/system/bin/netstat", "/system/bin/nice", "/system/bin/nl",

"/system/bin/nohup", "/system/bin/od", "/system/bin/paste",

"/system/bin/patch", "/system/bin/pgrep", "/system/bin/pidof",

"/system/bin/pkill", "/system/bin/pmap", "/system/bin/printenv",

"/system/bin/printf", "/system/bin/pwd", "/system/bin/readlink",

"/system/bin/realpath", "/system/bin/restorecon", "/system/bin/rm",

"/system/bin/rmdir", "/system/bin/rmmod", "/system/bin/route",

"/system/bin/runcon", "/system/bin/sed", "/system/bin/seq",

"/system/bin/setenforce", "/system/bin/setprop", "/system/bin/setsid",

"/system/bin/sha1sum", "/system/bin/sleep", "/system/bin/sort",

"/system/bin/split", "/system/bin/stat", "/system/bin/strings",

"/system/bin/swapoff", "/system/bin/swapon", "/system/bin/sync",

"/system/bin/sysctl", "/system/bin/tac", "/system/bin/tail",

"/system/bin/tar", "/system/bin/taskset", "/system/bin/tee",

"/system/bin/time", "/system/bin/timeout", "/system/bin/touch",

"/system/bin/tr", "/system/bin/true", "/system/bin/truncate",

"/system/bin/umount", "/system/bin/uname", "/system/bin/uniq",

"/system/bin/unix2dos", "/system/bin/usleep", "/system/bin/vmstat",

"/system/bin/wc", "/system/bin/which", "/system/bin/whoami",

"/system/bin/xargs",

"/system/bin/yes");

symlink("/system/lib/libQualityWrapper_Wallpaper.so", "/system/priv-app/WallpaperCompression/lib/arm/libQualityWrapper_Wallpaper.so");

symlink("/system/lib/libSRIB_FocusShot.so", "/system/priv-app/SelectiveFocusViewer/lib/arm/libSRIB_FocusShot.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/libsecipx.so", "/system/priv-app/SelectiveFocusViewer/lib/arm/libsecipx.so");

symlink("/system/lib/libsvoicedll.so", "/system/priv-app/SVoicePLM_1.0/lib/arm/libsvoicedll.so",

"/system/priv-app/SVoice_1.0/lib/arm/libsvoicedll.so");

symlink("/system/lib64/libTui.so", "/system/app/TuiService/lib/arm64/libTui.so");

symlink("/system/lib64/libprintspooler_jni6.so", "/system/app/SPrintSpooler6/lib/arm64/libprintspooler_jni6.so");

symlink("Roboto-Medium.ttf", "/system/fonts/SECRobotoLight-Bold.ttf");

symlink("Roboto-Regular.ttf", "/system/fonts/SECRobotoLight-Regular.ttf");

symlink("grep", "/system/bin/egrep",

"/system/bin/fgrep");

symlink("toybox", "/system/bin/acpi", "/system/bin/basename",

"/system/bin/blockdev", "/system/bin/bzcat", "/system/bin/cal",

"/system/bin/cat", "/system/bin/chcon", "/system/bin/chgrp",

"/system/bin/chmod", "/system/bin/chown", "/system/bin/chroot",

"/system/bin/cksum", "/system/bin/clear", "/system/bin/cmp",

"/system/bin/comm", "/system/bin/cp", "/system/bin/cpio",

"/system/bin/cut", "/system/bin/date", "/system/bin/dirname",

"/system/bin/dmesg", "/system/bin/dos2unix", "/system/bin/echo",

"/system/bin/env", "/system/bin/expand", "/system/bin/expr",

"/system/bin/fallocate", "/system/bin/false", "/system/bin/find",

"/system/bin/free", "/system/bin/getenforce", "/system/bin/getprop",

"/system/bin/groups", "/system/bin/head", "/system/bin/hostname",

"/system/bin/hwclock", "/system/bin/id", "/system/bin/ifconfig",

"/system/bin/inotifyd", "/system/bin/insmod", "/system/bin/kill",

"/system/bin/ln", "/system/bin/load_policy", "/system/bin/logname",

"/system/bin/losetup", "/system/bin/lsmod", "/system/bin/lsusb",

"/system/bin/md5sum", "/system/bin/mkdir", "/system/bin/mknod",

"/system/bin/mkswap", "/system/bin/mktemp", "/system/bin/modinfo",

"/system/bin/more", "/system/bin/mountpoint", "/system/bin/mv",

"/system/bin/netstat", "/system/bin/nice", "/system/bin/nl",

"/system/bin/nohup", "/system/bin/od", "/system/bin/paste",

"/system/bin/patch", "/system/bin/pgrep", "/system/bin/pidof",

"/system/bin/pkill", "/system/bin/pmap", "/system/bin/printenv",

"/system/bin/printf", "/system/bin/pwd", "/system/bin/readlink",

"/system/bin/realpath", "/system/bin/restorecon", "/system/bin/rm",

"/system/bin/rmdir", "/system/bin/rmmod", "/system/bin/route",

"/system/bin/runcon", "/system/bin/sed", "/system/bin/seq",

"/system/bin/setenforce", "/system/bin/setprop", "/system/bin/setsid",

"/system/bin/sha1sum", "/system/bin/sleep", "/system/bin/sort",

"/system/bin/split", "/system/bin/stat", "/system/bin/strings",

"/system/bin/swapoff", "/system/bin/swapon", "/system/bin/sync",

"/system/bin/sysctl", "/system/bin/tac", "/system/bin/tail",

"/system/bin/tar", "/system/bin/taskset", "/system/bin/tee",

"/system/bin/time", "/system/bin/timeout", "/system/bin/touch",

"/system/bin/tr", "/system/bin/true", "/system/bin/truncate",

"/system/bin/umount", "/system/bin/uname", "/system/bin/uniq",

"/system/bin/unix2dos", "/system/bin/usleep", "/system/bin/vmstat",

"/system/bin/wc", "/system/bin/which", "/system/bin/whoami",

"/system/bin/xargs",

"/system/bin/yes");

set_metadata_recursive("/system", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644);

set_metadata_recursive("/system/bin", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0755);

set_metadata("/system/bin/install-recovery.sh", "uid", 0, "gid", 0, "mode", 0544);

set_metadata("/system/bin/resetreason", "uid", 1000, "gid", 1000, "mode", 0710);

set_metadata("/system/bin/run-as", "uid", 0, "gid", 2000, "mode", 0750);

set_metadata("/system/bin/uncrypt", "uid", 0, "gid", 0, "mode", 0750);

set_metadata("/system/etc/dhcpcd/dhcpcd-run-hooks", "uid", 1014, "gid", 2000, "mode", 0550);

set_metadata("/system/etc/init.goldfish.sh", "uid", 0, "gid", 2000, "mode", 0550);

set_metadata("/system/etc/init.sec.boot.sh", "uid", 0, "gid", 2000, "mode", 0550);

set_metadata_recursive("/system/etc/ppp", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0555);

set_metadata("/system/vendor", "uid", 0, "gid", 2000, "mode", 0755);

set_metadata("/system/vendor/etc", "uid", 0, "gid", 2000, "mode", 0755);

set_metadata("/system/vendor/etc/nxp", "uid", 0, "gid", 2000, "mode", 0755);

set_metadata("/system/vendor/etc/nxp/BargeIn", "uid", 0, "gid", 2000, "mode", 0755);

set_metadata("/system/vendor/etc/nxp/BargeInDriving", "uid", 0, "gid", 2000, "mode", 0755);

set_metadata("/system/vendor/etc/nxp/VideoTelephony", "uid", 0, "gid", 2000, "mode", 0755);

set_metadata("/system/vendor/etc/nxp/WifiCalling", "uid", 0, "gid", 2000, "mode", 0755);

set_metadata("/system/vendor/etc/nxp/WifiCallingHAC", "uid", 0, "gid", 2000, "mode", 0755);

set_metadata("/system/vendor/etc/nxp/mVoIP", "uid", 0, "gid", 2000, "mode", 0755);

set_metadata("/system/vendor/etc/nxp/mVoIPFMC", "uid", 0, "gid", 2000, "mode", 0755);

set_metadata("/system/vendor/etc/nxp/mVoIPSec", "uid", 0, "gid", 2000, "mode", 0755);

set_metadata("/system/vendor/firmware", "uid", 0, "gid", 2000, "mode", 0755);

set_metadata("/system/vendor/lib", "uid", 0, "gid", 2000, "mode", 0755);

set_metadata_recursive("/system/vendor/lib/egl", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0644);

set_metadata("/system/vendor/lib/egl/libGLES_mali.so", "uid", 0, "gid", 0, "mode", 0644);

set_metadata("/system/vendor/lib/mediadrm", "uid", 0, "gid", 2000, "mode", 0755);

set_metadata_recursive("/system/vendor/lib64", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0644);

set_metadata("/system/vendor/lib64/egl/libGLES_mali.so", "uid", 0, "gid", 0, "mode", 0644);

set_metadata("/system/vendor/lib64/libskia_opt.so", "uid", 0, "gid", 0, "mode", 0644);

set_metadata("/system/vendor/lib64/mediadrm/libdrmclearkeyplugin.so", "uid", 0, "gid", 0, "mode", 0644);

set_metadata("/system/vendor/media", "uid", 0, "gid", 2000, "mode", 0755);

set_metadata_recursive("/system/xbin", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0755);

ui_print("Patching remaining system files...");

apply_patch("/system/build.prop", "-",

d2938f72bebf7d93cc70934f3e4801ba9586b588, 5685,

21a20464ae0500c90317507bbd0762114cb06962, package_extract_file("patch/system/build.prop.p"));

set_metadata("/system/build.prop", "uid", 0, "gid", 0, "mode", 0644);

show_progress(1.000000, 0);

unmount("/preload");

unmount("/system");

write_string_partition("/dev/block/platform/15570000.ufs/by-name/SYSTEM", 2000, "SYSMAGIC002", 11) || abort("fail to write secure_sysmgic in system.");