[Galaxy S II Themes and Apps] Troubadour666:
Final PURPOSE of updater-script for Biftor V11

For my personal use, i have make some choices i expose you to flash NEW Biftor V11 in my 2nd ROM :

In /Biftor/ folder of ZIP ROM :

I replace zImage extracted from http://dorimanx.shine.sk/kernels-jb...nx-V8.35-[18-00]-[16-07]-JB-SGII-PWR-CORE.zip.

I replace symlink_preload file by one with script i detail at top of post

with this updater-script i have only 2 apks in /system/app/ : SuperSU.apk and STweaks.apk

SYSTEM partition is 458 MB large

/DATA/SEC_DATA/ folder is 222MB large with 141 apks system and placeholder file :) , all are symlinked in /system/app/ except placeholder file.

copy it in a text file opened in Notepad++ and compare it to original from Biftor to see the differences i mean.

show_progress(0.500000, 0);
ui_print("");
ui_print("");
ui_print("!..............................................!");
ui_print("!.........Welcome To Biftor Rom V11 JB..........!");
ui_print("!.........Welcome To Biftor Rom V11 JB..........!");
ui_print("!.........Welcome To Biftor Rom V11 JB..........!");
ui_print("!.........Welcome To Biftor Rom V11 JB..........!");
ui_print("!.........Welcome To Biftor Rom V11 JB..........!");
ui_print("!.........Welcome To Biftor Rom V11 JB..........!");
ui_print("!.........Welcome To Biftor Rom V11 JB..........!");
ui_print("!..............................................!");
ui_print("A R M I N");
ui_print("AA RR MM II NN");
ui_print("AAA RRR MMM III NNN");
ui_print("AAAA RRRR MMMM IIII NNNN");
unmount("/system");
unmount("/cache");
ui_print("mounting...");
ui_print("mount System");
run_program("/sbin/mount", "/dev/block/mmcblk0p9", "/system");
ui_print("mount data");
run_program("/sbin/mount", "/dev/block/mmcblk0p10", "/data");
ui_print("mount cache");
run_program("/sbin/mount", "/dev/block/mmcblk0p7", "/cache");
delete_recursive("/system");
delete_recursive("/cache");
delete_recursive("/data/dalvik-cache");
[COLOR="Red"][B]delete_recursive("/data/sec_data");[/B][/COLOR]
delete_recursive("/data/data/com.android.providers.settings");
delete_recursive("/data/data/com.android.settings");
delete_recursive("/data/data/com.android.SystemUI");
[COLOR="Red"][B]delete_recursive("/data/data/com.android.vending");
delete_recursive("/data/data/com.android.providers.downloads");
delete_recursive("/data/data/com.google.android.gsf");
delete_recursive("/data/data/com.Biftor.Biftorteam");
delete_recursive("/data/data/com.Biftor.Biftorteam.NavBar");
delete_recursive("/data/data/com.Biftor.BiftorTeamAppRestart");
delete_recursive("/data/data/com.Biftor.Biftorteamstatusbar");[/B][/COLOR]
delete("/data/system/batterystats.bin");
ui_print("Installing system ...");
show_progress(0.500000, 80);
package_extract_dir("data/app", "/data/sec_data");
package_extract_dir("data/Biftor-Tweaks", "/data/Biftor-Tweaks");
package_extract_dir("system", "/system");
[COLOR="Red"][B]delete_recursive("/system/app");
package_extract_dir("system/media/video/shutdown", "/system/app");
package_extract_file("system/app/Superuser.apk", "/system/app/Superuser.apk");
delete("/system/app/shutdown.qmg");
package_extract_dir("system/app", "/data/sec_data");
delete("/data/sec_data/Superuser.apk");[/B][/COLOR]
package_extract_dir("preload/symlink/system/app", "/data/sec_data");
set_perm(2000, 2000, 0771, "/data/local");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");
set_perm(0, 1000, 0755, "/system/xbin/busybox");
run_program("/system/xbin/busybox", "--install", "-s", "/system/xbin");
symlink("/system/xbin/busybox", "/system/bin/busybox");
ui_print("Simlinking ...");
symlink("Roboto-Regular.ttf", "/system/fonts/DroidSans.ttf");
symlink("Roboto-Bold.ttf", "/system/fonts/DroidSans-Bold.ttf");
symlink("busybox", "/system/xbin/[");
symlink("busybox", "/system/xbin/[[");
symlink("busybox", "/system/xbin/acpid");
symlink("busybox", "/system/xbin/addgroup");
symlink("busybox", "/system/xbin/adduser");
symlink("busybox", "/system/xbin/adjtimex");
symlink("busybox", "/system/xbin/ar");
symlink("busybox", "/system/xbin/arp");
symlink("busybox", "/system/xbin/arping");
symlink("busybox", "/system/xbin/ash");
symlink("busybox", "/system/xbin/awk");
symlink("busybox", "/system/xbin/basename");
symlink("busybox", "/system/xbin/bbconfig");
symlink("busybox", "/system/xbin/beep");
symlink("busybox", "/system/xbin/blkid");
symlink("busybox", "/system/xbin/bootchartd");
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/catv");
symlink("busybox", "/system/xbin/chat");
symlink("busybox", "/system/xbin/chattr");
symlink("busybox", "/system/xbin/chgrp");
symlink("busybox", "/system/xbin/chpasswd");
symlink("busybox", "/system/xbin/chpst");
symlink("busybox", "/system/xbin/chroot");
symlink("busybox", "/system/xbin/chrt");
symlink("busybox", "/system/xbin/chvt");
symlink("busybox", "/system/xbin/cksum");
symlink("busybox", "/system/xbin/clear");
symlink("busybox", "/system/xbin/comm");
symlink("busybox", "/system/xbin/conspy");
symlink("busybox", "/system/xbin/cp");
symlink("busybox", "/system/xbin/cpio");
symlink("busybox", "/system/xbin/crond");
symlink("busybox", "/system/xbin/crontab");
symlink("busybox", "/system/xbin/cryptpw");
symlink("busybox", "/system/xbin/cttyhack");
symlink("busybox", "/system/xbin/cut");
symlink("busybox", "/system/xbin/dc");
symlink("busybox", "/system/xbin/deallocvt");
symlink("busybox", "/system/xbin/delgroup");
symlink("busybox", "/system/xbin/deluser");
symlink("busybox", "/system/xbin/depmod");
symlink("busybox", "/system/xbin/devmem");
symlink("busybox", "/system/xbin/dhcprelay");
symlink("busybox", "/system/xbin/diff");
symlink("busybox", "/system/xbin/dirname");
symlink("busybox", "/system/xbin/dnsd");
symlink("busybox", "/system/xbin/dnsdomainname");
symlink("busybox", "/system/xbin/dos2unix");
symlink("busybox", "/system/xbin/dpkg");
symlink("busybox", "/system/xbin/dpkg-deb");
symlink("busybox", "/system/xbin/du");
symlink("busybox", "/system/xbin/dumpkmap");
symlink("busybox", "/system/xbin/dumpleases");
symlink("busybox", "/system/xbin/echo");
symlink("busybox", "/system/xbin/ed");
symlink("busybox", "/system/xbin/egrep");
symlink("busybox", "/system/xbin/eject");
symlink("busybox", "/system/xbin/env");
symlink("busybox", "/system/xbin/envdir");
symlink("busybox", "/system/xbin/envuidgid");
symlink("busybox", "/system/xbin/ether-wake");
symlink("busybox", "/system/xbin/expand");
symlink("busybox", "/system/xbin/expr");
symlink("busybox", "/system/xbin/fakeidentd");
symlink("busybox", "/system/xbin/false");
symlink("busybox", "/system/xbin/fbset");
symlink("busybox", "/system/xbin/fbsplash");
symlink("busybox", "/system/xbin/fdflush");
symlink("busybox", "/system/xbin/fdformat");
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_eraseall");
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/fsck");
symlink("busybox", "/system/xbin/fsck.minix");
symlink("busybox", "/system/xbin/fsync");
symlink("busybox", "/system/xbin/ftpd");
symlink("busybox", "/system/xbin/ftpget");
symlink("busybox", "/system/xbin/ftpput");
symlink("busybox", "/system/xbin/fuser");
symlink("busybox", "/system/xbin/getopt");
symlink("busybox", "/system/xbin/getty");
symlink("busybox", "/system/xbin/grep");
symlink("busybox", "/system/xbin/gunzip");
symlink("busybox", "/system/xbin/halt");
symlink("busybox", "/system/xbin/hdparm");
symlink("busybox", "/system/xbin/head");
symlink("busybox", "/system/xbin/hexdump");
symlink("busybox", "/system/xbin/hostid");
symlink("busybox", "/system/xbin/hostname");
symlink("busybox", "/system/xbin/httpd");
symlink("busybox", "/system/xbin/hush");
symlink("busybox", "/system/xbin/hwclock");
symlink("busybox", "/system/xbin/ifdown");
symlink("busybox", "/system/xbin/ifenslave");
symlink("busybox", "/system/xbin/ifplugd");
symlink("busybox", "/system/xbin/ifup");
symlink("busybox", "/system/xbin/inetd");
symlink("busybox", "/system/xbin/init");
symlink("busybox", "/system/xbin/inotifyd");
symlink("busybox", "/system/xbin/install");
symlink("busybox", "/system/xbin/ipaddr");
symlink("busybox", "/system/xbin/ipcalc");
symlink("busybox", "/system/xbin/ipcrm");
symlink("busybox", "/system/xbin/ipcs");
symlink("busybox", "/system/xbin/iplink");
symlink("busybox", "/system/xbin/iproute");
symlink("busybox", "/system/xbin/iprule");
symlink("busybox", "/system/xbin/iptunnel");
symlink("busybox", "/system/xbin/kbd_mode");
symlink("busybox", "/system/xbin/killall");
symlink("busybox", "/system/xbin/killall5");
symlink("busybox", "/system/xbin/klogd");
symlink("busybox", "/system/xbin/last");
symlink("busybox", "/system/xbin/length");
symlink("busybox", "/system/xbin/less");
symlink("busybox", "/system/xbin/linux32");
symlink("busybox", "/system/xbin/linux64");
symlink("busybox", "/system/xbin/linuxrc");
symlink("busybox", "/system/xbin/loadfont");
symlink("busybox", "/system/xbin/loadkmap");
symlink("busybox", "/system/xbin/logger");
symlink("busybox", "/system/xbin/login");
symlink("busybox", "/system/xbin/logname");
symlink("busybox", "/system/xbin/logread");
symlink("busybox", "/system/xbin/losetup");
symlink("busybox", "/system/xbin/lpd");
symlink("busybox", "/system/xbin/lpq");
symlink("busybox", "/system/xbin/lpr");
symlink("busybox", "/system/xbin/lsattr");
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/makedevs");
symlink("busybox", "/system/xbin/makemime");
symlink("busybox", "/system/xbin/man");
symlink("busybox", "/system/xbin/md5sum");
symlink("busybox", "/system/xbin/mdev");
symlink("busybox", "/system/xbin/mesg");
symlink("busybox", "/system/xbin/microcom");
symlink("busybox", "/system/xbin/mkdosfs");
symlink("busybox", "/system/xbin/mke2fs");
symlink("busybox", "/system/xbin/mkfifo");
symlink("busybox", "/system/xbin/mkfs.ext2");
symlink("busybox", "/system/xbin/mkfs.minix");
symlink("busybox", "/system/xbin/mkfs.reiser");
symlink("busybox", "/system/xbin/mkfs.vfat");
symlink("busybox", "/system/xbin/mknod");
symlink("busybox", "/system/xbin/mkpasswd");
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/mountpoint");
symlink("busybox", "/system/xbin/mt");
symlink("busybox", "/system/xbin/nameif");
symlink("busybox", "/system/xbin/nc");
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/passwd");
symlink("busybox", "/system/xbin/patch");
symlink("busybox", "/system/xbin/pgrep");
symlink("busybox", "/system/xbin/pidof");
symlink("busybox", "/system/xbin/ping6");
symlink("busybox", "/system/xbin/pipe_progress");
symlink("busybox", "/system/xbin/pivot_root");
symlink("busybox", "/system/xbin/pkill");
symlink("busybox", "/system/xbin/popmaildir");
symlink("busybox", "/system/xbin/poweroff");
symlink("busybox", "/system/xbin/printf");
symlink("busybox", "/system/xbin/pscan");
symlink("busybox", "/system/xbin/pwd");
symlink("busybox", "/system/xbin/raidautorun");
symlink("busybox", "/system/xbin/rdate");
symlink("busybox", "/system/xbin/rdev");
symlink("busybox", "/system/xbin/readlink");
symlink("busybox", "/system/xbin/readprofile");
symlink("busybox", "/system/xbin/realpath");
symlink("busybox", "/system/xbin/reformime");
symlink("busybox", "/system/xbin/reset");
symlink("busybox", "/system/xbin/resize");
symlink("busybox", "/system/xbin/rev");
symlink("busybox", "/system/xbin/rpm");
symlink("busybox", "/system/xbin/rpm2cpio");
symlink("busybox", "/system/xbin/rtcwake");
symlink("busybox", "/system/xbin/run-parts");
symlink("busybox", "/system/xbin/runlevel");
symlink("busybox", "/system/xbin/runsv");
symlink("busybox", "/system/xbin/runsvdir");
symlink("busybox", "/system/xbin/rx");
symlink("busybox", "/system/xbin/script");
symlink("busybox", "/system/xbin/scriptreplay");
symlink("busybox", "/system/xbin/sed");
symlink("busybox", "/system/xbin/sendmail");
symlink("busybox", "/system/xbin/seq");
symlink("busybox", "/system/xbin/setarch");
symlink("busybox", "/system/xbin/setfont");
symlink("busybox", "/system/xbin/setkeycodes");
symlink("busybox", "/system/xbin/setlogcons");
symlink("busybox", "/system/xbin/setsid");
symlink("busybox", "/system/xbin/setuidgid");
symlink("busybox", "/system/xbin/sha1sum");
symlink("busybox", "/system/xbin/sha256sum");
symlink("busybox", "/system/xbin/sha512sum");
symlink("busybox", "/system/xbin/showkey");
symlink("busybox", "/system/xbin/slattach");
symlink("busybox", "/system/xbin/smemcap");
symlink("busybox", "/system/xbin/softlimit");
symlink("busybox", "/system/xbin/sort");
symlink("busybox", "/system/xbin/split");
symlink("busybox", "/system/xbin/start-stop-daemon");
symlink("busybox", "/system/xbin/stat");
symlink("busybox", "/system/xbin/strings");
symlink("busybox", "/system/xbin/stty");
symlink("busybox", "/system/xbin/sulogin");
symlink("busybox", "/system/xbin/sum");
symlink("busybox", "/system/xbin/sv");
symlink("busybox", "/system/xbin/svlogd");
symlink("busybox", "/system/xbin/swapoff");
symlink("busybox", "/system/xbin/swapon");
symlink("busybox", "/system/xbin/switch_root");
symlink("busybox", "/system/xbin/sysctl");
symlink("busybox", "/system/xbin/syslogd");
symlink("busybox", "/system/xbin/tac");
symlink("busybox", "/system/xbin/tail");
symlink("busybox", "/system/xbin/tar");
symlink("busybox", "/system/xbin/taskset");
symlink("busybox", "/system/xbin/tcpsvd");
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/touch");
symlink("busybox", "/system/xbin/tr");
symlink("busybox", "/system/xbin/traceroute");
symlink("busybox", "/system/xbin/traceroute6");
symlink("busybox", "/system/xbin/true");
symlink("busybox", "/system/xbin/tty");
symlink("busybox", "/system/xbin/ttysize");
symlink("busybox", "/system/xbin/tunctl");
symlink("busybox", "/system/xbin/tune2fs");
symlink("busybox", "/system/xbin/ubiattach");
symlink("busybox", "/system/xbin/ubidetach");
symlink("busybox", "/system/xbin/udhcpc");
symlink("busybox", "/system/xbin/udhcpd");
symlink("busybox", "/system/xbin/udpsvd");
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/vconfig");
symlink("busybox", "/system/xbin/vi");
symlink("busybox", "/system/xbin/vlock");
symlink("busybox", "/system/xbin/volname");
symlink("busybox", "/system/xbin/wall");
symlink("busybox", "/system/xbin/watch");
symlink("busybox", "/system/xbin/watchdog");
symlink("busybox", "/system/xbin/wc");
symlink("busybox", "/system/xbin/wget");
symlink("busybox", "/system/xbin/which");
symlink("busybox", "/system/xbin/who");
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("busybox", "/system/xbin/zcip");
symlink("dumpstate", "/system/bin/dumpcrash");
symlink("toolbox", "/system/bin/cat");
symlink("toolbox", "/system/bin/chmod");
symlink("toolbox", "/system/bin/chown");
symlink("toolbox", "/system/bin/cmp");
symlink("debuggerd", "/system/bin/csview");
symlink("toolbox", "/system/bin/date");
symlink("toolbox", "/system/bin/dd");
symlink("toolbox", "/system/bin/df");
symlink("toolbox", "/system/bin/dmesg");
symlink("toolbox", "/system/bin/getevent");
symlink("toolbox", "/system/bin/getprop");
symlink("toolbox", "/system/bin/hd");
symlink("toolbox", "/system/bin/id");
symlink("toolbox", "/system/bin/ifconfig");
symlink("toolbox", "/system/bin/iftop");
symlink("mksh", "/system/bin/sh");
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/log");
symlink("toolbox", "/system/bin/ls");
symlink("toolbox", "/system/bin/lsmod");
symlink("toolbox", "/system/bin/lsof");
symlink("toolbox", "/system/bin/mkdir");
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/reboot");
symlink("toolbox", "/system/bin/renice");
symlink("toolbox", "/system/bin/rm");
symlink("toolbox", "/system/bin/rmdir");
symlink("toolbox", "/system/bin/rmmod");
symlink("toolbox", "/system/bin/route");
symlink("toolbox", "/system/bin/schedtop");
symlink("toolbox", "/system/bin/sendevent");
symlink("toolbox", "/system/bin/setconsole");
symlink("toolbox", "/system/bin/setprop");
symlink("toolbox", "/system/bin/sleep");
symlink("toolbox", "/system/bin/smd");
symlink("toolbox", "/system/bin/start");
symlink("toolbox", "/system/bin/stop");
symlink("toolbox", "/system/bin/sync");
symlink("toolbox", "/system/bin/top");
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("Done!");
ui_print("");
ui_print("Setting Permissions");
set_perm_recursive(0, 0, 0755, 0644, "/system");
set_perm_recursive(0, 0, 0755, 0755, "/system/etc/init.d");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
set_perm(0, 3003, 06755, "/system/bin/ip");
set_perm(0, 3003, 02750, "/system/bin/netcfg");
set_perm(0, 3004, 02755, "/system/bin/ping");
set_perm(0, 2000, 06750, "/system/bin/run-as");
set_perm_recursive(1002, 1002, 0755, 0440, "/system/etc/bluetooth");
set_perm(0, 0, 0755, "/system/etc/bluetooth");
set_perm(1000, 1000, 0640, "/system/etc/bluetooth/auto_pairing.conf");
set_perm(3002, 3002, 0444, "/system/etc/bluetooth/blacklist.conf");
set_perm(1002, 1002, 0440, "/system/etc/dbus.conf");
set_perm(1014, 2000, 0550, "/system/etc/dhcpcd/dhcpcd-run-hooks");
set_perm(0, 2000, 0550, "/system/etc/init.goldfish.sh");
set_perm(0, 0, 06755, "/system/bin/su");
symlink("/system/bin/su", "/system/xbin/su");
set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor");
set_perm_recursive(0, 0, 0755, 0644, "/system/vendor/firmware");
set_perm(0, 2000, 0755, "/system/vendor/firmware");
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
set_perm(0, 1000, 0755, "/system/xbin/busybox");
symlink("/system/xbin/busybox", "/system/bin/busybox");
run_program("/system/xbin/busybox", "--install", "-s", "/system/xbin");
show_progress(0.100000, 0);
package_extract_file("Biftor/symlink_preload", "/tmp/symlink_preload");
set_perm(0, 0, 0777, "/tmp/symlink_preload");
run_program("/tmp/symlink_preload");
ui_print("Backing up EFS");
package_extract_file("Biftor/efs_backup.sh", "/tmp/efs_backup.sh");
set_perm(0, 0, 0755, "/tmp/efs_backup.sh");
run_program("/tmp/efs_backup.sh");
ui_print("Flashing kernel ...");
package_extract_file("Biftor/flash_image", "/tmp/flash_image");
set_perm(0, 0, 0777, "/tmp/flash_image");
assert(package_extract_file("Biftor/zImage", "/tmp/zImage"),
run_program("/tmp/flash_image", "/dev/block/mmcblk0p5", "/tmp/zImage"),
delete("/tmp/zImage"));
ui_print("Flashing modem ...");
assert(package_extract_file("Biftor/modem.bin", "/tmp/modem.bin"),
run_program("/tmp/flash_image", "/dev/block/mmcblk0p8", "/tmp/modem.bin"),
delete("/tmp/modem.bin"));
delete("/tmp/symlink_preload");
delete("/tmp/flash_image");
delete("/tmp/efs_backup.sh");
run_program("/sbin/umount", "/system");
run_program("/sbin/umount", "/data");
run_program("/sbin/umount", "/cache");
ui_print("complete enjoy it");
ui_print("Thanks for using Biftor ROM");
ui_print("");
ui_print("B I F T O R");

Detailed lines here (added and changed lines in red color)

-

I make the choice to clear some more datas folders

delete_recursive("/data/data/com.android.providers.settings");

delete_recursive("/data/data/com.android.settings");

delete_recursive("/data/data/com.android.SystemUI");

delete_recursive("/data/data/com.android.vending");

delete_recursive("/data/data/com.android.providers.downloads");

delete_recursive("/data/data/com.google.android.gsf");

delete_recursive("/data/data/com.Biftor.Biftorteam");

delete_recursive("/data/data/com.Biftor.Biftorteam.NavBar");

delete_recursive("/data/data/com.Biftor.BiftorTeamAppRestart");

delete_recursive("/data/data/com.Biftor.Biftorteamstatusbar");

-

i want all apks system (APKs from preload and data folder in ZIP) to be extracted in DATA partition of ROM, exactly in /data/sec_data/ folder, except Superuser.apk and i want this last one to be in /system/app/

how to do that ?

During test, i realize that I must have /system/app/ folder to rest in place during flash, so i find an isolated shutdown.qmg file i use to recreate /system/app/ folder (the only wait i find but works).

relative lines for this :

package_extract_dir("system/media/video/shutdown", "/system/app");

delete("/system/app/shutdown.qmg");

delete("/data/system/batterystats.bin");
ui_print("Installing system ...");
show_progress(0.500000, 80);
package_extract_dir("data/app", "/data/sec_data"); [COLOR="Red"][B](extract biftor files in /data/sec_data/ instead of /data/app/ i prefer this way for me)[/B][/COLOR]
package_extract_dir("data/Biftor-Tweaks", "/data/Biftor-Tweaks"); (no need to change this line)
package_extract_dir("system", "/system"); [COLOR="Red"][B](extracted all system)[/B][/COLOR]
delete_recursive("/system/app"); [COLOR="Red"][B](delete folder app in system folder)[/B][/COLOR]
package_extract_dir("system/media/video/shutdown", "/system/app"); [COLOR="Red"][B](recreate app folder in system folder with one file : shutdown.qmg[/B][/COLOR]
package_extract_file("system/app/Superuser.apk", "/system/app/Superuser.apk"); [COLOR="Red"][B](extract one file from system folder zip rom : Superuser.apk)[/B][/COLOR]
delete("/system/app/shutdown.qmg"); [COLOR="Red"][B](deleting unedded file : shutdown.qmg)[/B][/COLOR]
package_extract_dir("system/app", "/data/sec_data"); [COLOR="Red"][B](extract all system/app files to /data/sec_data/ instead of /preload/....)[/B][/COLOR]
delete("/data/sec_data/Superuser.apk"); [COLOR="Red"][B](delete Superuser.apk redundant file)[/B][/COLOR]
package_extract_dir("preload/symlink/system/app", "/data/sec_data"); [COLOR="Red"][B](extract all /preload.....system/app files to /data/sec_data/ instead of /preload/..../app too)[/B][/COLOR]
set_perm(2000, 2000, 0771, "/data/local"); (no need to change this line)
set_perm_recursive(1000, 1000, 0771, 0644, "/data/app"); (no need to change this line)

Another use of this method :

When I boot my 1rst ROM, i can see the ENTIRE SYSTEM partiton of my 2nd ROM : all partiton are auto-mounted by Magic DorimanX V8.xx kernel

/preload/ folder corresponding of SYSTEM PARTITION from 2nd ROM

/data_sec_rom/ folder which is DATA PARTITION of 2nd Rom, in fact files are in /.secondrom/ of your Internal SdCard with DorimanX v8.xx, The Magic, DATA.IMG 2Go and CACHE.IMG (more small)

with this method, actualy , if i want to change some APKs in /data/sec_data/ of 2nd rom , especialy SystemUI.apk, SecSettings.apk or anothers APKs, what do i do ?

- i boot 1rst rom.

- with an explorer file, like rootexplorer, i can go into /data_sec_rom/ folder, which countain mounted DATA partition of 2nd ROM and i can replace all apks here without symlinking them because symlink still exist in /system/app/ . (here we only replace files :)

- i can create a subfolder in /data/sec_data/ and move bloatware or other system apks from /data/sec_data/ in,

by this way i keep safe the symlink in /system/app/ if i decide to reactivate them later by re-imputing them in /data/sec_data/ folder.

- i go to /data_sec_rom/dalvik-cache and i delete the corresponding DEX file from apks i change , like system@app@SystemUI.apk@classes.dex , system@app@SecSettings.apk@classes.dex or anyother .dex file.

- if i want to remove some downloaded APKs from Store , i can go to /data/app/ and rename them instead of delete them.

- i can go to /.siyah/ folder if i want to make some change in profil of Stweaks.

- i can go /preload/framework/ and replace or add what i want too because at this step, preload represent system folder of your 2nd rom.

- if i want to add some system apks which not exist before, i copy them in /preload/app/ so no need to symlink them.

- if mod i want add has some libs, etc data ... i can put it where they have to be in any folder of /preload/

there is another method to add inexistant APKs in /data/sec_data/ folder and use a flasher to symlink them. see my sign for thread relative with that.

Dont make change in real /system/ folder at this step of modding rom in live, ifelse i prevent you that your are going in FCs or BOOTLOOP very soon.

The advantage of this method : applying mods, tweaks, and themes quickly without flash except for MOD like VRTHEME ZIP and you can find some facilities and easy ways to debug yourself too.

You have to know that when you boot your 2nd ROM, kernel doesnt automaticaly shows you SYSTEM PARTITION of 1rst ROM, you have to mount it by yourself

here is the script to put in file (fix right are 0755) and run in a terminal emulator on your rom :

personaly i called it tempsystem and put it in my /system/bin/ 2rst rom , so i can launch easily each tile i need it

how to for that here http://xdaforums.com/showthread.php?t=2399615

[COLOR="Black"][B]#!/sbin/busybox sh

mkdir /temp_system
chmod -R 777 /temp_system
mount -t ext4 /dev/block/mmcblk0p9 /temp_system
[/B][/COLOR]

thanks.