[Android Q&A, Help & Troubleshooting] BlackH1ppy:
Hello, I'm trying to make a simple personal rom that I can update myself, but when I try to install it with twrp I get an error 6 error.

Here is what I have inside the rom zip:

Here is the updater-script(I copied the symlink and permissions from another similar rom):

assert(getprop("ro.product.device") == "angler" || getprop("ro.build.product") == "angler" || getprop("ro.product.name") == "angler" ||
abort("This package is for \"angler\" devices; this is a \"" + getprop("ro.product.device") + "\"."););
unmount("/system");
ui_print("Android 7.1.1 Nougat");
ui_print("HippyRom stock+ by BlackHippy");
format("ext4", "EMMC", "/dev/block/platform/soc.0/f9824900.sdhci/by-name/system", "0", "/system");
set_progress(0.100000);
mount("ext4", "EMMC", "/dev/block/platform/soc.0/f9824900.sdhci/by-name/system", "/system");
set_progress(0.200000);
ui_print("Extracting system...");
package_extract_dir("system", "/system");
set_progress(0.500000);
ui_print("Symlinks...");
symlink("app_process64", "/system/bin/app_process");
symlink("dalvikvm64", "/system/bin/dalvikvm");
symlink("grep", "/system/bin/egrep");
symlink("grep", "/system/bin/fgrep");
symlink("ip6tables", "/system/bin/ip6tables-restore");
symlink("ip6tables", "/system/bin/ip6tables-save");
symlink("iptables", "/system/bin/iptables-restore");
symlink("iptables", "/system/bin/iptables-save");
symlink("Roboto-Bold.ttf", "/system/fonts/DroidSans-Bold.ttf");
symlink("Roboto-Regular.ttf", "/system/fonts/DroidSans.ttf");
symlink("/system/lib64/libappfuse_jni.so", "/system/priv-app/MtpDocumentsProvider/lib/arm64/libappfuse_jni.so");
symlink("/system/lib64/libdefcontainer_jni.so", "/system/priv-app/DefaultContainerService/lib/arm64/libdefcontainer_jni.so");
symlink("/system/lib64/libfacenet.so", "/system/app/FaceLock/lib/arm64/libfacenet.so");
symlink("/system/lib64/libjni_pacprocessor.so", "/system/app/PacProcessor/lib/arm64/libjni_pacprocessor.so");
symlink("/system/lib64/libManufacture.so", "/system/app/HwMMITest/lib/arm64/libManufacture.so");
symlink("/system/lib64/libnfc_nci_jni.so", "/system/app/NfcNci/lib/arm64/libnfc_nci_jni.so");
symlink("/system/lib64/libprintspooler_jni.so", "/system/app/PrintSpooler/lib/arm64/libprintspooler_jni.so");
symlink("/system/lib/libbluetooth_jni.so", "/system/app/Bluetooth/lib/arm/libbluetooth_jni.so");
symlink("/system/lib/libdmengine.so", "/system/priv-app/DMService/lib/arm/libdmengine.so");
symlink("/system/lib/libdmjavaplugin.so", "/system/priv-app/DMService/lib/arm/libdmjavaplugin.so");
symlink("toolbox", "/system/bin/dd");
symlink("toolbox", "/system/bin/getevent");
symlink("toolbox", "/system/bin/iftop");
symlink("toolbox", "/system/bin/ioctl");
symlink("toolbox", "/system/bin/log");
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/sendevent");
symlink("toolbox", "/system/bin/start");
symlink("toolbox", "/system/bin/stop");
symlink("toolbox", "/system/bin/top");
symlink("toybox", "/system/bin/acpi");
symlink("toybox", "/system/bin/base64");
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/df");
symlink("toybox", "/system/bin/dirname");
symlink("toybox", "/system/bin/dmesg");
symlink("toybox", "/system/bin/dos2unix");
symlink("toybox", "/system/bin/du");
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/flock");
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/ionice");
symlink("toybox", "/system/bin/iorenice");
symlink("toybox", "/system/bin/kill");
symlink("toybox", "/system/bin/killall");
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/ls");
symlink("toybox", "/system/bin/lsmod");
symlink("toybox", "/system/bin/lsof");
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/mount");
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/renice");
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/tty");
symlink("toybox", "/system/bin/ulimit");
symlink("toybox", "/system/bin/umount");
symlink("toybox", "/system/bin/uname");
symlink("toybox", "/system/bin/uniq");
symlink("toybox", "/system/bin/unix2dos");
symlink("toybox", "/system/bin/uptime");
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/xxd");
symlink("toybox", "/system/bin/yes");
symlink("/vendor/bin/imscmservice", "/system/bin/imscmservice");
symlink("/vendor/bin/imsdatadaemon", "/system/bin/imsdatadaemon");
symlink("/vendor/bin/imsqmidaemon", "/system/bin/imsqmidaemon");
symlink("/vendor/bin/ims_rtp_daemon", "/system/bin/ims_rtp_daemon");
symlink("/vendor/etc/cne/profile.txt", "/system/etc/cne/profile.txt");
symlink("/vendor/etc/data/dsi_config.xml", "/system/etc/data/dsi_config.xml");
symlink("/vendor/etc/data/netmgr_config.xml", "/system/etc/data/netmgr_config.xml");
symlink("/vendor/etc/flp.conf", "/system/etc/flp.conf");
symlink("/vendor/etc/izat.conf", "/system/etc/izat.conf");
symlink("/vendor/etc/lowi.conf", "/system/etc/lowi.conf");
symlink("/vendor/etc/pp_calib_data_SAMSUNG_S6E3HA3X01_5P7_1440P_CMD_DUAL0.xml", "/system/etc/pp_calib_data_SAMSUNG_S6E3HA3X01_5P7_1440P_CMD_DUAL0.xml");
symlink("/vendor/etc/sap.conf", "/system/etc/sap.conf");
symlink("/vendor", "/system/vendor");
set_progress(0.600000);
ui_print("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/app_process32", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:zygote_exec:s0");
set_metadata("/system/bin/app_process64", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:zygote_exec:s0");
set_metadata("/system/bin/blkid", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:blkid_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/bugreport", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file: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/debuggerd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:debuggerd_exec:s0");
set_metadata("/system/bin/debuggerd64", "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("/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:system_file:s0");
set_metadata("/system/bin/e2fsck", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:fsck_exec:s0");
set_metadata("/system/bin/fingerprintd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:fingerprintd_exec:s0");
set_metadata("/system/bin/fsck.f2fs", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:fsck_exec:s0");
set_metadata("/system/bin/fsck_msdos", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:fsck_exec:s0");
set_metadata("/system/bin/gatekeeperd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:gatekeeperd_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/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/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/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/logcat", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:logcat_exec: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/make_ext4fs", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file: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/ndc", "uid", 0, "gid", 2000, "mode", 0755, "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/patchoat", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dex2oat_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/pppd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:ppp_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/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/sdcard", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:sdcardd_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/sgdisk", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:sgdisk_exec:s0");
set_metadata("/system/bin/sh", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:shell_exec:s0");
set_metadata("/system/bin/ssr_setup", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:ssr_setup_exec:s0");
set_metadata("/system/bin/subsystem_ramdump", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:ssr_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/toolbox", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:toolbox_exec:s0");
set_metadata("/system/bin/toybox", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:toolbox_exec:s0");
set_metadata("/system/bin/tzdatacheck", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:tzdatacheck_exec:s0");
set_metadata("/system/bin/uncrypt", "uid", 0, "gid", 0, "mode", 0750, "capabilities", 0x0, "selabel", "u:object_r:uncrypt_exec:s0");
set_metadata("/system/bin/vdc", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:vdc_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("/system/etc", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/etc/bluetooth", "uid", 0, "gid", 2000, "mode", 0755, "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("/system/recovery-from-boot.p", "uid", 0, "gid", 0, "mode", 0644, "capabilities", 0x0);
set_metadata("/system/etc/event-log-tags", "uid", 0, "gid", 0, "mode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/etc/permissions", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/etc/ppp", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0555, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/etc/security", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/etc/security/cacerts", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/lib", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644, "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");
set_metadata("/system/bin/atrace", "selabel", "u:object_r:atrace_exec:s0");
set_metadata("/system/bin/audioserver", "selabel", "u:object_r:audioserver_exec:s0");
set_metadata("/system/bin/bootstat", "selabel", "u:object_r:bootstat_exec:s0");
set_metadata("/system/bin/cameraserver", "selabel", "u:object_r:cameraserver_exec:s0");
set_metadata("/system/bin/idmap", "selabel", "u:object_r:idmap_exec:s0");
set_metadata("/system/bin/init.angler.power.sh", "selabel", "u:object_r:init-power-sh_exec:s0");
set_metadata("/system/bin/init.angler.qseecomd.sh", "selabel", "u:object_r:init-angler-qseecomd-sh_exec:s0");
set_metadata("/system/bin/init.mcfg.sh", "selabel", "u:object_r:init-mcfg-sh_exec:s0");
set_metadata("/system/bin/mediacodec", "selabel", "u:object_r:mediacodec_exec:s0");
set_metadata("/system/bin/mediadrmserver", "selabel", "u:object_r:mediadrmserver_exec:s0");
set_metadata("/system/bin/mediaextractor", "selabel", "u:object_r:mediaextractor_exec:s0");
set_metadata("/system/bin/nanoapp_cmd", "selabel", "u:object_r:nanoapp_cmd_exec:s0");
set_metadata("/system/bin/profman", "selabel", "u:object_r:profman_exec:s0");
set_progress(0.700000);
ui_print("Extracting kernel...");
package_extract_dir("kernel", "/tmp/kernel");
run_program("/sbin/busybox", "unzip", "/tmp/kernel/FLASH-N6P-20170207-0159.zip", "META-INF/com/google/android/*", "-d", "/tmp/kernel");
run_program("/sbin/busybox", "sh", "/tmp/kernel/META-INF/com/google/android/update-binary", "dummy", "1", "/tmp/kernel/FLASH-N6P-20170207-0159.zip");
set_progress(0.800000);
ui_print("Adding su.d support...");
set_metadata_recursive("/system/su.d", "uid", 0, "gid", 0, "dmode", 0700, "fmode", 0700, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
ui_print("Rooting...");
package_extract_dir("root", "/tmp/root");
run_program("/sbin/busybox", "unzip", "/tmp/root/SuperSU-v2.79-201612051815.zip", "META-INF/com/google/android/*", "-d", "/tmp/root");
run_program("/sbin/busybox", "sh", "/tmp/root/META-INF/com/google/android/update-binary", "dummy", "1", "/tmp/root/SuperSU-v2.79-201612051815.zip");
ui_print("Installing busybox...");
package_extract_dir("busybox", "/tmp/busybox");
run_program("/sbin/busybox", "unzip", "/tmp/busybox/Busybox-1.26.2.zip", "META-INF/com/google/android/*", "-d", "/tmp/busybox");
run_program("/sbin/busybox", "sh", "/tmp/busybox/META-INF/com/google/android/update-binary", "dummy", "1", "/tmp/busybox/Busybox-1.26.2.zip");
set_progress(1.000000);
ui_print("HippyRom N4F26O Installed");