[Samsung Galaxy S Duos] mois2511:
[MENTION=7150701]Niko Belic 605[/MENTION] Hi it seems that had 481 erros in the rom updater-script, I made a new updater script, replace it in the rom zip and test if it works.

ui_print("###########################");
ui_print("# CM11-12 Rom #");
ui_print("###########################");
ui_print("# v2.0 #");
ui_print("###########################");
ui_print("# By #");
ui_print("###########################");
ui_print("# Niko Belic 605 #");
ui_print("###########################");
ui_print("# Format 5% #");
ui_print("###########################");
format("ext4", "EMMC", "/dev/block/mmcblk0p16", "0", "/system");
ui_print("###########################");
ui_print("# Mounting 10% #");
ui_print("###########################");
mount("ext4", "EMMC", "/dev/block/mmcblk0p16", "/system");
mount("ext4", "EMMC", "/dev/block/mmcblk0p7", "/data");
run_program("/sbin/mount", "/dev/block/mmcblk0p6", "/cache");
ui_print("###########################");
ui_print("# Extracting System 20% #");
ui_print("###########################");
package_extract_dir("system", "/system");
ui_print("###########################");
ui_print("# Symlinks 30% #");
ui_print("###########################");
symlink("../bin/fsck.f2fs", "/system/bin/dump.f2fs");
symlink("../xbin/su", "/system/bin/su");
symlink("Roboto-Bold.ttf", "/system/fonts/DroidSans-Bold.ttf");
symlink("Roboto-Regular.ttf", "/system/fonts/DroidSans.ttf");
symlink("busybox", "/system/xbin/[");
symlink("busybox", "/system/xbin/[[");
symlink("busybox", "/system/xbin/adjtimex");
symlink("busybox", "/system/xbin/arp");
symlink("busybox", "/system/xbin/ash");
symlink("busybox", "/system/xbin/awk");
symlink("busybox", "/system/xbin/base64");
symlink("busybox", "/system/xbin/basename");
symlink("busybox", "/system/xbin/bbconfig");
symlink("busybox", "/system/xbin/blkid");
symlink("busybox", "/system/xbin/blockdev");
symlink("busybox", "/system/xbin/brctl");
symlink("busybox", "/system/xbin/bunzip2");
symlink("busybox", "/system/xbin/bzcat");
symlink("busybox", "/system/xbin/bzip2");
symlink("busybox", "/system/xbin/cal");
symlink("busybox", "/system/xbin/cat");
symlink("busybox", "/system/xbin/catv");
symlink("busybox", "/system/xbin/chattr");
symlink("busybox", "/system/xbin/chcon");
symlink("busybox", "/system/xbin/chgrp");
symlink("busybox", "/system/xbin/chmod");
symlink("busybox", "/system/xbin/chown");
symlink("busybox", "/system/xbin/chroot");
symlink("busybox", "/system/xbin/chvt");
symlink("busybox", "/system/xbin/clear");
symlink("busybox", "/system/xbin/cmp");
symlink("busybox", "/system/xbin/comm");
symlink("busybox", "/system/xbin/cp");
symlink("busybox", "/system/xbin/cpio");
symlink("busybox", "/system/xbin/crond");
symlink("busybox", "/system/xbin/crontab");
symlink("busybox", "/system/xbin/cut");
symlink("busybox", "/system/xbin/date");
symlink("busybox", "/system/xbin/dc");
symlink("busybox", "/system/xbin/dd");
symlink("busybox", "/system/xbin/deallocvt");
symlink("busybox", "/system/xbin/depmod");
symlink("busybox", "/system/xbin/devmem");
symlink("busybox", "/system/xbin/df");
symlink("busybox", "/system/xbin/diff");
symlink("busybox", "/system/xbin/dirname");
symlink("busybox", "/system/xbin/dmesg");
symlink("busybox", "/system/xbin/dnsd");
symlink("busybox", "/system/xbin/dos2unix");
symlink("busybox", "/system/xbin/du");
symlink("busybox", "/system/xbin/echo");
symlink("busybox", "/system/xbin/ed");
symlink("busybox", "/system/xbin/egrep");
symlink("busybox", "/system/xbin/env");
symlink("busybox", "/system/xbin/expand");
symlink("busybox", "/system/xbin/expr");
symlink("busybox", "/system/xbin/false");
symlink("busybox", "/system/xbin/fbsplash");
symlink("busybox", "/system/xbin/fdisk");
symlink("busybox", "/system/xbin/fgconsole");
symlink("busybox", "/system/xbin/fgrep");
symlink("busybox", "/system/xbin/find");
symlink("busybox", "/system/xbin/findfs");
symlink("busybox", "/system/xbin/flash_lock");
symlink("busybox", "/system/xbin/flash_unlock");
symlink("busybox", "/system/xbin/flashcp");
symlink("busybox", "/system/xbin/flock");
symlink("busybox", "/system/xbin/fold");
symlink("busybox", "/system/xbin/free");
symlink("busybox", "/system/xbin/freeramdisk");
symlink("busybox", "/system/xbin/fstrim");
symlink("busybox", "/system/xbin/fsync");
symlink("busybox", "/system/xbin/ftpget");
symlink("busybox", "/system/xbin/ftpput");
symlink("busybox", "/system/xbin/fuser");
symlink("busybox", "/system/xbin/getenforce");
symlink("busybox", "/system/xbin/getopt");
symlink("busybox", "/system/xbin/getsebool");
symlink("busybox", "/system/xbin/grep");
symlink("busybox", "/system/xbin/groups");
symlink("busybox", "/system/xbin/gunzip");
symlink("busybox", "/system/xbin/gzip");
symlink("busybox", "/system/xbin/halt");
symlink("busybox", "/system/xbin/head");
symlink("busybox", "/system/xbin/hexdump");
symlink("busybox", "/system/xbin/hwclock");
symlink("busybox", "/system/xbin/id");
symlink("busybox", "/system/xbin/ifconfig");
symlink("busybox", "/system/xbin/inetd");
symlink("busybox", "/system/xbin/insmod");
symlink("busybox", "/system/xbin/install");
symlink("busybox", "/system/xbin/ionice");
symlink("busybox", "/system/xbin/iostat");
symlink("busybox", "/system/xbin/ip");
symlink("busybox", "/system/xbin/kill");
symlink("busybox", "/system/xbin/killall");
symlink("busybox", "/system/xbin/killall5");
symlink("busybox", "/system/xbin/less");
symlink("busybox", "/system/xbin/ln");
symlink("busybox", "/system/xbin/losetup");
symlink("busybox", "/system/xbin/ls");
symlink("busybox", "/system/xbin/lsattr");
symlink("busybox", "/system/xbin/lsmod");
symlink("busybox", "/system/xbin/lspci");
symlink("busybox", "/system/xbin/lsusb");
symlink("busybox", "/system/xbin/lzcat");
symlink("busybox", "/system/xbin/lzma");
symlink("busybox", "/system/xbin/lzop");
symlink("busybox", "/system/xbin/lzopcat");
symlink("busybox", "/system/xbin/man");
symlink("busybox", "/system/xbin/matchpathcon");
symlink("busybox", "/system/xbin/md5sum");
symlink("busybox", "/system/xbin/mesg");
symlink("busybox", "/system/xbin/mkdir");
symlink("busybox", "/system/xbin/mke2fs");
symlink("busybox", "/system/xbin/mkfifo");
symlink("busybox", "/system/xbin/mkfs.ext2");
symlink("busybox", "/system/xbin/mkfs.vfat");
symlink("busybox", "/system/xbin/mknod");
symlink("busybox", "/system/xbin/mkswap");
symlink("busybox", "/system/xbin/mktemp");
symlink("busybox", "/system/xbin/modinfo");
symlink("busybox", "/system/xbin/modprobe");
symlink("busybox", "/system/xbin/more");
symlink("busybox", "/system/xbin/mount");
symlink("busybox", "/system/xbin/mountpoint");
symlink("busybox", "/system/xbin/mpstat");
symlink("busybox", "/system/xbin/mv");
symlink("busybox", "/system/xbin/nanddump");
symlink("busybox", "/system/xbin/nandwrite");
symlink("busybox", "/system/xbin/nbd-client");
symlink("busybox", "/system/xbin/netstat");
symlink("busybox", "/system/xbin/nice");
symlink("busybox", "/system/xbin/nmeter");
symlink("busybox", "/system/xbin/nohup");
symlink("busybox", "/system/xbin/nslookup");
symlink("busybox", "/system/xbin/ntpd");
symlink("busybox", "/system/xbin/od");
symlink("busybox", "/system/xbin/openvt");
symlink("busybox", "/system/xbin/patch");
symlink("busybox", "/system/xbin/pgrep");
symlink("busybox", "/system/xbin/pidof");
symlink("busybox", "/system/xbin/ping");
symlink("busybox", "/system/xbin/pipe_progress");
symlink("busybox", "/system/xbin/pkill");
symlink("busybox", "/system/xbin/pmap");
symlink("busybox", "/system/xbin/poweroff");
symlink("busybox", "/system/xbin/printenv");
symlink("busybox", "/system/xbin/printf");
symlink("busybox", "/system/xbin/ps");
symlink("busybox", "/system/xbin/pstree");
symlink("busybox", "/system/xbin/pwd");
symlink("busybox", "/system/xbin/pwdx");
symlink("busybox", "/system/xbin/rdate");
symlink("busybox", "/system/xbin/rdev");
symlink("busybox", "/system/xbin/readlink");
symlink("busybox", "/system/xbin/realpath");
symlink("busybox", "/system/xbin/renice");
symlink("busybox", "/system/xbin/reset");
symlink("busybox", "/system/xbin/resize");
symlink("busybox", "/system/xbin/restorecon");
symlink("busybox", "/system/xbin/rev");
symlink("busybox", "/system/xbin/rm");
symlink("busybox", "/system/xbin/rmdir");
symlink("busybox", "/system/xbin/rmmod");
symlink("busybox", "/system/xbin/route");
symlink("busybox", "/system/xbin/run-parts");
symlink("busybox", "/system/xbin/runcon");
symlink("busybox", "/system/xbin/rx");
symlink("busybox", "/system/xbin/sed");
symlink("busybox", "/system/xbin/selinuxenabled");
symlink("busybox", "/system/xbin/seq");
symlink("busybox", "/system/xbin/sestatus");
symlink("busybox", "/system/xbin/setconsole");
symlink("busybox", "/system/xbin/setenforce");
symlink("busybox", "/system/xbin/setfiles");
symlink("busybox", "/system/xbin/setkeycodes");
symlink("busybox", "/system/xbin/setsebool");
symlink("busybox", "/system/xbin/setserial");
symlink("busybox", "/system/xbin/setsid");
symlink("busybox", "/system/xbin/sh");
symlink("busybox", "/system/xbin/sha1sum");
symlink("busybox", "/system/xbin/sha256sum");
symlink("busybox", "/system/xbin/sha3sum");
symlink("busybox", "/system/xbin/sha512sum");
symlink("busybox", "/system/xbin/sleep");
symlink("busybox", "/system/xbin/smemcap");
symlink("busybox", "/system/xbin/sort");
symlink("busybox", "/system/xbin/split");
symlink("busybox", "/system/xbin/stat");
symlink("busybox", "/system/xbin/strings");
symlink("busybox", "/system/xbin/stty");
symlink("busybox", "/system/xbin/sum");
symlink("busybox", "/system/xbin/swapoff");
symlink("busybox", "/system/xbin/swapon");
symlink("busybox", "/system/xbin/sync");
symlink("busybox", "/system/xbin/sysctl");
symlink("busybox", "/system/xbin/tac");
symlink("busybox", "/system/xbin/tail");
symlink("busybox", "/system/xbin/tar");
symlink("busybox", "/system/xbin/taskset");
symlink("busybox", "/system/xbin/tee");
symlink("busybox", "/system/xbin/telnet");
symlink("busybox", "/system/xbin/telnetd");
symlink("busybox", "/system/xbin/test");
symlink("busybox", "/system/xbin/tftp");
symlink("busybox", "/system/xbin/tftpd");
symlink("busybox", "/system/xbin/time");
symlink("busybox", "/system/xbin/timeout");
symlink("busybox", "/system/xbin/top");
symlink("busybox", "/system/xbin/touch");
symlink("busybox", "/system/xbin/tr");
symlink("busybox", "/system/xbin/traceroute");
symlink("busybox", "/system/xbin/true");
symlink("busybox", "/system/xbin/ttysize");
symlink("busybox", "/system/xbin/tune2fs");
symlink("busybox", "/system/xbin/umount");
symlink("busybox", "/system/xbin/uname");
symlink("busybox", "/system/xbin/uncompress");
symlink("busybox", "/system/xbin/unexpand");
symlink("busybox", "/system/xbin/uniq");
symlink("busybox", "/system/xbin/unix2dos");
symlink("busybox", "/system/xbin/unlzma");
symlink("busybox", "/system/xbin/unlzop");
symlink("busybox", "/system/xbin/unxz");
symlink("busybox", "/system/xbin/unzip");
symlink("busybox", "/system/xbin/uptime");
symlink("busybox", "/system/xbin/usleep");
symlink("busybox", "/system/xbin/uudecode");
symlink("busybox", "/system/xbin/uuencode");
symlink("busybox", "/system/xbin/vi");
symlink("busybox", "/system/xbin/watch");
symlink("busybox", "/system/xbin/wc");
symlink("busybox", "/system/xbin/wget");
symlink("busybox", "/system/xbin/which");
symlink("busybox", "/system/xbin/whoami");
symlink("busybox", "/system/xbin/xargs");
symlink("busybox", "/system/xbin/xz");
symlink("busybox", "/system/xbin/xzcat");
symlink("busybox", "/system/xbin/yes");
symlink("busybox", "/system/xbin/zcat");
symlink("libGLESv2.so", "/system/lib/libGLESv3.so");
symlink("logcat", "/system/bin/lolcat");
symlink("mksh", "/system/bin/sh");
symlink("mount.exfat", "/system/bin/fsck.exfat");
symlink("mount.exfat", "/system/bin/mkfs.exfat");
symlink("pigz", "/system/xbin/unpigz");
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/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/notify");
symlink("toolbox", "/system/bin/printenv");
symlink("toolbox", "/system/bin/ps");
symlink("toolbox", "/system/bin/r");
symlink("toolbox", "/system/bin/readlink");
symlink("toolbox", "/system/bin/renice");
symlink("toolbox", "/system/bin/restart");
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/setconsole");
symlink("toolbox", "/system/bin/setenforce");
symlink("toolbox", "/system/bin/setfattr");
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/umount");
symlink("toolbox", "/system/bin/uptime");
symlink("toolbox", "/system/bin/vmstat");
symlink("toolbox", "/system/bin/watchprops");
symlink("toolbox", "/system/bin/wipe");
ui_print("###########################");
ui_print("# Set Perms 40% #");
ui_print("###########################");
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/addon.d uid 0 gid 0 dmode 0755 fmode 0755 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_process uid 0 gid 2000 mode 0755 capabilities 0x0 selabel u:object_r:zygote_exec:s0
set_metadata /system/bin/bluetoothd uid 0 gid 2000 mode 0755 capabilities 0x0 selabel u:object_r:bluetoothd_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/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/hostapd uid 0 gid 2000 mode 0755 capabilities 0x0 selabel u:object_r:hostapd_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/keystore uid 0 gid 2000 mode 0755 capabilities 0x0 selabel u:object_r:keystore_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/mksh uid 0 gid 2000 mode 0755 capabilities 0x0 selabel u:object_r:shell_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/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/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/qemud uid 0 gid 2000 mode 0755 capabilities 0x0 selabel u:object_r:qemud_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 0xc0 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/surfaceflinger uid 0 gid 2000 mode 0755 capabilities 0x0 selabel u:object_r:surfaceflinger_exec:s0
set_metadata /system/bin/uncrypt uid 0 gid 0 mode 0750 capabilities 0x0 selabel u:object_r:system_file: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/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/init.d uid 0 gid 2000 dmode 0755 fmode 0755 capabilities 0x0 selabel u:object_r:system_file:s0
set_metadata /system/etc/init.d uid 0 gid 0 mode 0755 capabilities 0x0 selabel u:object_r:system_file:s0
set_metadata /system/etc/init.goldfish.sh uid 0 gid 2000 mode 0550 capabilities 0x0 selabel u:object_r:system_file:s0
set_metadata /system/etc/install-cm-recovery.sh uid 0 gid 0 mode 0544 capabilities 0x0
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/valgrind uid 0 gid 0 dmode 0755 fmode 0755 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_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/audio_effects.conf uid 0 gid 0 mode 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/xbin/librank uid 0 gid 0 mode 06755 capabilities 0x0 selabel u:object_r:system_file:s0
set_metadata /system/xbin/procmem uid 0 gid 0 mode 06755 capabilities 0x0 selabel u:object_r:system_file:s0
set_metadata /system/xbin/procrank uid 0 gid 0 mode 06755 capabilities 0x0 selabel u:object_r:system_file:s0
set_metadata /system/xbin/su uid 0 gid 0 mode 06755 capabilities 0x0 selabel u:object_r:su_exec:s0
ui_print("###########################");
ui_print("# Installing Kernel 50% #");
ui_print("###########################");
package_extract_file("boot.img", "/dev/block/mmcblk0p8");
ui_print("###########################");
ui_print("# Installing Apps 60% #");
ui_print("###########################");
package_extract_dir("data", "/data");
ui_print("###########################");
ui_print("# Set Perms(for apps) 70% #");
ui_print("###########################");
set_perm(1000, 1000, 0771, "/data");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");
set_perm_recursive(0, 0, 0755, 0644, "/system/lib/libqpicjni152.so");
set_perm_recursive(0, 0, 0666, 0666, "/data/data/com.estrongs.android.pop/shared_prefs/cached_windows.xml");
set_perm_recursive(0, 0, 0666, 0666, "/data/data/com.estrongs.android.pop/shared_prefs/com.estrongs.android.pop_preferences.xml");
set_perm_recursive(0, 0, 0666, 0666, "/data/data/com.estrongs.android.pop/shared_prefs/documentExtlistdb.xml");
set_perm_recursive(0, 0, 0666, 0666, "/data/data/com.estrongs.android.pop/shared_prefs/new_navi.xml");
set_perm_recursive(0, 0, 0666, 0666, "/data/data/com.estrongs.android.pop/shared_prefs/preference.xml");
set_perm_recursive(0, 0, 0666, 0666, "/data/data/com.estrongs.android.pop/shared_prefs/serverlistdb7.xml");
set_perm_recursive(0, 0, 0666, 0666, "/data/data/com.teslacoilsw.launcher/shared_prefs/com.crashlytics.prefs.xml");
set_perm_recursive(0, 0, 0666, 0666, "/data/data/com.teslacoilsw.launcher/shared_prefs/com.teslacoilsw.launcher_preferences.xml");
set_perm_recursive(0, 0, 0666, 0666, "/data/data/com.teslacoilsw.launcher/shared_prefs/theme.WallpaperPickerActivity.xml");
set_perm_recursive(0, 0, 0666, 0666, "/data/data/com.google.android.inputmethod.latin/shared_prefs/com.google.android.inputmethod.latin_preferences.xml");
set_perm_recursive(0, 0, 0666, 0666, "/data/data/com.google.android.inputmethod.latin/shared_prefs/important_notice_pref.xml");
set_perm_recursive(0, 0, 0666, 0666, "/data/data/de.robv.android.xposed.installer/conf/modules.list");
delete_recursive("/cache");
ui_print("###########################");
ui_print("# Tweaking 80% #");
ui_print("###########################");
package_extract_dir("tools", "/tmp");
set_perm_recursive(0, 0, 0755, 0755, "/tmp");
run_program("/sbin/busybox", "chmod", "-R", "0755", "/tmp");
run_program("/sbin/busybox", "chown", "-R", "0.0", "/tmp");
set_perm(0, 0, 0777, "/tmp/enableinit.sh");
set_perm(0, 0, 0777, "/tmp/TweakDrypt");
run_program("/sbin/busybox", "mv", "-f", "/tmp/TweakDrypt", "/system/etc");
run_program("/sbin/busybox", "mv", "-f", "/tmp/TDTemergency_unistaller.zip", "/sdcard");
run_program("/tmp/enableinit.sh");
run_program("/sbin/busybox", "cp", "-f", "/system/etc/init.d/50selinuxrelabel", "/tmp");
run_program("/sbin/busybox", "cp", "-f", "/system/etc/init.d/90userinit", "/tmp");
run_program("/sbin/busybox", "cp", "-f", "/system/etc/init.d/40int2ext", "/tmp");
run_program("/sbin/busybox", "cp", "-f", "/system/etc/init.d/45swap2int", "/tmp");
run_program("/sbin/busybox", "cp", "-f", "/system/etc/init.d/swap2int", "/tmp");
run_program("/sbin/busybox", "cp", "-f", "/system/etc/init.d/00post-init.sh", "/tmp");
run_program("/sbin/busybox", "cp", "-f", "/system/etc/init.d/enable-oc.sh", "/tmp");
run_program("/sbin/busybox", "cp", "-f", "/system/etc/init.d/04apps2sd", "/tmp");
run_program("/sbin/busybox", "cp", "-f", "/system/etc/init.d/11customsettings", "/tmp");
run_program("/sbin/busybox", "cp", "-f", "/system/etc/init.d/00banner", "/tmp");
package_extract_file("prop.sh", "/tmp/prop.sh");
set_perm(0, 0, 0777, "/tmp/prop.sh");
run_program("/tmp/prop.sh");
delete_recursive("/data/tombstones");
delete_recursive("/data/dalvik-cache");
delete_recursive("/data/boot-cache");
delete_recursive("/data/resource-cache");
delete_recursive("/system/etc/tweakdrypt/init.d.bak");
delete("/data//system/batterystats.bin");
delete("/system/bin/entro_off");
delete("/system/bin/entro_on");
delete("/system/bin/TDT");
delete("/system/bin/uninstall");
delete("/system/bin/scan");
delete("/system/bin/tweakd");
delete("/system/xbin/sqlite3");
delete("/system/bin/sqlite3");
delete("/system/etc/init.d/00syscleaner");
delete("/system/etc/init.d/01syscleaner");
delete("/system/etc/init.d/02cpu_kernel_gov");
delete("/system/etc/init.d/01batterytweaker");
delete("/system/etc/init.d/02netweakz");
delete("/system/etc/init.d/03sqlite3");
delete("/system/etc/init.d/04zipalign");
delete("/system/etc/init.d/06cron");
delete("/system/etc/init.d/08batterytweak");
delete("/system/etc/init.d/07storage");
delete("/system/etc/init.d/09VM");
delete("/system/etc/init.d/10Ksm");
delete("/system/etc/init.d/11Touch_Sens");
delete("/system/etc/init.d/03ram_optimize");
delete("/system/etc/init.d/11sdspeedfix");
delete("/system/etc/init.d/05zipalign");
delete("/system/etc/init.d/06gpurender");
delete("/system/etc/init.d/07zipaligndata");
delete("/system/etc/init.d/08kernelTweak");
delete("/system/etc/init.d/09cron");
delete("/system/etc/init.d/10TouchscreenSensitivity");
delete("/system/etc/init.d/04sqlite3");
delete("/system/etc/init.d/11System");
delete_recursive("/data/tweakdrypt");
delete_recursive("/system/etc/init.d");
delete_recursive("/system/etc/cron");
delete("/system/xbin/rngd");
delete("/system/xbin/entro");
delete("/system/bin/entropy");
ui_print("###########################");
ui_print("# Finishing 90% #");
ui_print("###########################");
package_extract_dir("mb", "/system");
package_extract_dir("data", "/data");
run_program("/sbin/busybox", "mv", "-f", "/tmp/50selinuxrelabel", "/system/etc/init.d");
run_program("/sbin/busybox", "mv", "-f", "/tmp/90userinit", "/system/etc/init.d");
run_program("/sbin/busybox", "mv", "-f", "/tmp/40int2ext", "/system/etc/init.d");
run_program("/sbin/busybox", "mv", "-f", "/tmp/45swap2int", "/system/etc/init.d");
run_program("/sbin/busybox", "mv", "-f", "/tmp/swap2int", "/system/etc/init.d");
run_program("/sbin/busybox", "mv", "-f", "/tmp/00post-init.sh", "/system/etc/init.d");
run_program("/sbin/busybox", "mv", "-f", "/tmp/enable-oc.sh", "/system/etc/init.d");
run_program("/sbin/busybox", "mv", "-f", "/tmp/04apps2sd", "/system/etc/init.d");
run_program("/sbin/busybox", "mv", "-f", "/tmp/11customsettings", "/system/etc/init.d");
run_program("/sbin/busybox", "mv", "-f", "/tmp/00banner", "/system/etc/init.d");
run_program("/sbin/busybox", "cp", "-f", "/system/build.prop", "/system/etc/TweakDrypt/backup/build.prop");
set_perm_recursive(0, 0, 0777, 0777, "/system/etc/init.d");
set_perm_recursive(0, 0, 0777, 0777, "/system/etc/TweakDrypt/TDTLS");
set_perm(0, 0, 0777, "/system/etc/TweakDrypt/TDTLS/sqlite/install.sh");
set_perm(0, 0, 0777, "/system/etc/init.d/Z01TDTSyscleaner");
set_perm(0, 0, 0777, "/system/etc/init.d/Z02TDTBooster");
set_perm(0, 0, 0777, "/system/etc/init.d/Z03TDTKernel");
set_perm(0, 0, 0777, "/system/etc/init.d/Z04TDTRam");
set_perm(0, 0, 0777, "/system/etc/init.d/Z05TDTCron");
set_perm(0, 0, 0777, "/system/etc/init.d/Z06TDTNet");
set_perm(0, 0, 0777, "/system/etc/init.d/Z08TDTKsm");
set_perm(0, 0, 0777, "/system/etc/init.d/Z09TDTZipAlign");
set_perm(0, 0, 0777, "/system/etc/init.d/Z10TDTVacuum");
set_perm(0, 0, 0755, "/system/bin/uninstall");
set_perm(0, 0, 0777, "/system/bin/isqlite");
set_perm(0, 0, 0755, "/system/bin/scan");
set_perm(0, 0, 0755, "/system/bin/onetimescan");
set_perm(0, 0, 0755, "/system/bin/entro_off");
set_perm(0, 0, 0755, "/system/bin/entro_on");
set_perm(0, 0, 0755, "/system/bin/boost");
set_perm(0, 0, 0755, "/system/bin/TDTconsole");
set_perm(0, 0, 0755, "/system/bin/changelogs");
set_perm(0, 0, 0755, "/system/bin/tweak_on");
set_perm(0, 0, 0755, "/system/bin/tweak_off");
set_perm(0, 0, 0755, "/system/bin/TDT");
set_perm(0, 0, 0755, "/system/bin/changelogs");
set_perm(0, 0, 0755, "/system/xbin/openvpn");
set_perm(0, 0, 0777, "/system/xbin/zipalign");
set_perm(0, 0, 0755, "/system/xbin/busybox");
set_perm(0, 0, 0777, "/system/etc/gps.conf");
set_perm_recursive(0, 0, 0777, 0777, "/system/etc/cron");
assert(package_extract_file("boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
ui_print("###########################");
ui_print("# All Done 100% #");
ui_print("###########################");
ui_print("###########################");
ui_print("# Hit Thanks! #");
ui_print("###########################");
ui_print("##############################################");
ui_print("# Updater-Script Test By Mois2511 #");
ui_print("##############################################");
ui_print("###################################");
ui_print("# Tap Reboot and Enjoy! #");
ui_print("###################################");
unmount("/data");
unmount("/cache");
unmount("/system");