[Galaxy S I9000 Q&A, Help & Troubleshooting] WILMANS2M:
hi,

well i have a problem with my custom script. CMW says "bad" and "aborted" and does not apply my script. Here it is.

Someone can help ? thanks.

ui_print("--------------------------------");

ui_print("By: WILMANS2M	");

ui_print("--------------------------------");

ui_print("SimplyGSRom - Version 2.0 ");

ui_print("XXJVQ Based ROM Android 2.3.4");

ui_print("--------------------------------");

ui_print("Installation ... ");

show_progress(0.200000, 10);

run_program("/sbin/mount", "/dev/block/mmcblk0p2", "/data");

run_program("/sbin/mount", "/dev/block/stl9", "/system");

run_program("/sbin/mount", "/dev/block/stl10", "/dbdata");

run_program("/sbin/mount", "/dev/block/stl11", "/cache");

ui_print(" ");

ui_print("Saving EFS");

ui_print(" ");

package_extract_dir("updates", "/tmp");

set_perm(0, 0, 0755, "/tmp/efs_backup.sh");

run_program("/tmp/efs_backup.sh");

ui_print(" ");

ui_print("Detection used rom...");

set_perm(0, 0, 0755, "/tmp/sgsr.sh");

run_program("/tmp/sgsr.sh");

show_progress(0.200000, 12);

ui_print("Optimization scripts ... ");

package_extract_dir("system", "/system");

set_perm_recursive(0, 2000, 0755, 0750, "/system/etc/init.d");

set_perm(0, 0, 0755, "/system/etc/init.d");

set_perm(0, 0, 0777, "/system/etc/init.d/S01sysctl");

set_perm(0, 0, 0777, "/system/etc/init.d/S70zipalign");

set_perm(0, 0, 0777, "/system/etc/init.d/S97ramscript");

set_perm(0, 0, 0777, "/system/etc/init.d/S99complete");

set_perm(0, 0, 0777, "/system/etc/init.d/enable_tun");

set_perm(0, 0, 0777, "/system/etc/init.d/enable_sm_warm");

set_perm(0, 0, 0777, "/system/etc/init.d/enable_netfilter");

set_perm(0, 0, 0777, "/system/etc/init.d/enable_conservative");

set_perm(0, 0, 0777, "/system/etc/init.d/enable_cifs");

ui_print(" ");

ui_print("Copying files");

ui_print(" ");

package_extract_dir("system", "/system");

package_extract_dir("sdcard", "/sdcard");

show_progress(0.200000, 60);

ui_print(" ");

ui_print("Virtual symlinks");

ui_print(" ");

symlink("dumpstate", "/system/bin/dumpcrash");

symlink("dumpstate", "/system/bin/dumpmesg");

symlink("toolbox", "/system/bin/cat");

symlink("toolbox", "/system/bin/chmod");

symlink("toolbox", "/system/bin/chown");

symlink("toolbox", "/system/bin/cmp");

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("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/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/vmstat");

symlink("toolbox", "/system/bin/watchprops");

symlink("toolbox", "/system/bin/wipe");

symlink("/system/xbin/su", "/system/bin/su");

symlink("/system/bin/debuggerd", "/system/bin/csview");

show_progress(0.200000, 70);

ui_print(" ");

ui_print("Fixing Permissions");

ui_print(" ");

set_perm_recursive(1002, 1002, 0755, 0440, "/system/etc/bluetooth");

set_perm_recursive(0, 2000, 0755, 0755, "/system/vendor/bin");

set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor/etc");

set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor/firmware");

set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");

set_perm(0, 2000, 0755, "/system/vendor");

set_perm(0, 2000, 0755, "/system/vendor/firmware");

set_perm(0, 2000, 0755, "/system/vendor/bin/launch_gps.sh");

set_perm(0, 2000, 0755, "/system/vendor/bin/gpsd");

set_perm(0, 2000, 0755, "/system/etc/bluetooth");

set_perm(1002, 1002, 0440, "/system/etc/dbus.conf");

set_perm(1014, 2000, 0550, "/system/etc/dhcpcd/dhcpcd-run-hooks");

set_perm(0, 0, 06755, "/system/xbin/su");

set_perm(0, 0, 06755, "/system/bin/su");

set_perm(0, 0, 06755, "/system/xbin/busybox");

set_perm(0, 0, 755, "/tmp/redbend_ua");

set_perm_recursive(0, 0, 0755, 0644, "/system");

set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");

set_perm_recursive(0, 0, 0755, 0755, "/system/etc");

set_perm(0, 3003, 02755, "/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_recursive(0, 0, 0777, 0777, "/system/etc/init.d");

set_perm_recursive(0, 2000, 0755, 0755, "/system/etc/init.d");

set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp");

set_perm_recursive(0, 2000, 0755, 0755, "/system/vendor/bin");

set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");

set_perm(0, 0, 04755, "/system/xbin/su");

set_perm(0, 0, 04755, "/system/xbin/busybox");

set_perm_recursive(0, 0, 0755, 0644, "/system/framework");

set_perm_recursive(0, 0, 0755, 0644, "/system/app");

set_perm_recursive(0, 0, 0755, 0644, "/system/lib");

set_perm_recursive(0, 0, 0755, 0644, "/system/fonts");

set_perm(0, 0, 06755, "/system/bin/sqlite3");

set_perm(0, 0, 06755, "/system/etc/hosts");

show_progress(0.200000, 80);

ui_print(" ");

ui_print("Installing Busybox");

ui_print(" ");

run_program("/system/xbin/busybox", "--install", "-s", "/system/xbin");

show_progress(0.200000, 90);

ui_print(" ");

ui_print("Flashing Modem");

ui_print(" ");

set_perm(0, 0, 0755, "/tmp/bmlwrite");

run_program("/tmp/bmlwrite", "/tmp/modem.bin", "/dev/block/bml12");

ui_print(" ");

ui_print("Flashing Kernel");

ui_print(" ");

run_program("/tmp/bmlwrite", "/tmp/zImage", "/dev/block/bml7");

show_progress(1.000000, 0);

ui_print("SimplyGSROM installed");

ui_print("Flash ended! Your phone will reboot...");

run_program("/sbin/cp", "/tmp/recovery.log", "/data/update.log");

run_program("/sbin/unmount", "/dev/block/stl9", "/system");

run_program("/sbin/unmount", "/dev/block/stl10", "/dbdata");

run_program("/sbin/unmount", "/dev/block/stl11", "/cache");

run_program("/sbin/unmount", "/dev/block/mmcblk0p2", "/data");

ui_print(" ");

ui_print("--now");

run_program("/xbin/reboot");