[Galaxy Ace S5830 General] adil_:
Here you go...

assert(getprop("ro.product.device") == "cooper" || getprop("ro.build.product") == "cooper");
show_progress(0.500000, 0);
format("ext4", "EMMC", "/dev/block/stl12", "0");
mount("ext4", "EMMC", "/dev/block/stl12", "/system");
package_extract_dir("system", "/system");
symlink("toolbox", "/system/bin/cat", "/system/bin/chmod",
"/system/bin/chown", "/system/bin/cmp", "/system/bin/date",
"/system/bin/dd", "/system/bin/df", "/system/bin/dmesg",
"/system/bin/getevent", "/system/bin/getprop", "/system/bin/hd",
"/system/bin/id", "/system/bin/ifconfig", "/system/bin/iftop",
"/system/bin/insmod", "/system/bin/ioctl", "/system/bin/ionice",
"/system/bin/kill", "/system/bin/ln", "/system/bin/log",
"/system/bin/ls", "/system/bin/lsmod", "/system/bin/lsof",
"/system/bin/mkdir", "/system/bin/mount", "/system/bin/mv",
"/system/bin/nandread", "/system/bin/netstat",
"/system/bin/newfs_msdos", "/system/bin/notify", "/system/bin/printenv",
"/system/bin/ps", "/system/bin/reboot", "/system/bin/renice",
"/system/bin/rm", "/system/bin/rmdir", "/system/bin/rmmod",
"/system/bin/route", "/system/bin/schedtop", "/system/bin/sendevent",
"/system/bin/setconsole", "/system/bin/setprop", "/system/bin/sleep",
"/system/bin/smd", "/system/bin/start", "/system/bin/stop",
"/system/bin/sync", "/system/bin/top", "/system/bin/umount",
"/system/bin/uptime", "/system/bin/vmstat", "/system/bin/watchprops",
"/system/bin/wipe");
#retouch_binaries("/system/lib/libmedia.so", "c945c35d5b0e6c59be66ae3b839b00aca3bd1621", "/system/lib/libsystem_server.so", "745c717d612bdca022e88464ce8e808f1ec0a589", "/system/lib/libOmxAmrEnc.so", "cf978624e5c6dd7794424818cde646023d507464", "/system/lib/libstagefright_amrnb_common.so", "bd1e30092d7ad6021b0365182aa4d394ac8462a3", "/system/lib/libsurfaceflinger_client.so", "7323b29af59aa37d269efb48b3b3da2488096f7e", "/system/lib/libomx_m4vdec_sharedlibrary.so", "3b47cb3c1f92e73d20a1c5f4080ced207f8c3904", "/system/lib/libaudiopolicy.so", "edca4e2f66ac317639763edefa410960877c2b06", "/system/lib/libstagefright_foundation.so", "cfb78d1f246bd8317feabddae4a50189dd08fcae", "/system/lib/libmmipl.so", "29e7e0acd749a46ec8462d2fedaa0b91719f93b2", "/system/lib/libsec-ril.so", "c5d1bdafe5d7166811b24adee5e53c0d4bdafba2", "/system/lib/libandroid_servers.so", "f4c4c7f718a6674a5e5b19f06df5193cc73be52a", "/system/lib/libOmxH264Dec.so", "a07b200bb1038dca44fa7e62144dfbd5f08560e0", "/system/lib/libGLESv1_CM.so", "1f1dbb962bb346ed0bbffef76dae08d1d229de76", "/system/lib/libomx_mp3dec_sharedlibrary.so", "24d6eb86da1852ee15050ac81d9835d9916cf352", "/system/lib/libttssynthproxy.so", "3ff39c1a95ba6e52b7fb46fdc3cdd2dd2719a5cf", "/system/lib/egl/libq3dtools_adreno200.so", "40c403055b54588587a508015294c2190f8cdb83", "/system/lib/egl/libEGL_adreno200.so", "76f2be6a0d43061c0573434deb588e2e59317945", "/system/lib/egl/libGLESv2_adreno200.so", "2cf6c1bb5eb5413e6d752c575628ac06783f96cf", "/system/lib/egl/egl.cfg", "812655c141446e225230be00e36f7e9d6eb89106", "/system/lib/egl/libGLES_android.so", "27329e3324e32bfa12163af753c182029ecc52c3", "/system/lib/egl/libGLESv1_CM_adreno200.so", "f994ad10ddcbd35c6f19341cb31fb721937b290e", "/system/lib/libFFTEm.so", "5e05a630b1458bd8ea2cee758a644987ad25fde4", "/system/lib/libm.so", "a3151f991b0aa83767a5fe34cb6d0ec03e3ffc2d", "/system/lib/libOmxMpeg4Dec.so", "a9db014defdc86c3d911478da7803d12e17fc5ab", "/system/lib/libstagefright_enc_common.so", "bb8a57ff0b8350da4ff985227882ee81c8ac7814", "/system/lib/libsysutils.so", "e06fb9e24be0e33ed22867c5b72ee795815cd339", "/system/lib/liblog.so", "2cf4502a2a19465762b84782be88d1bc6a60fbf9", "/system/lib/libcamera_client.so", "141bcf31a420fe2f03ed1ed41d643e35e89d7122", "/system/lib/libsrec_jni.so", "b39b3e2a863186940ad281cf7ae64865a4f2576e", "/system/lib/libext4_utils.so", "07b4de4cf736bca4891ae0afbba0a3265ce0682a", "/system/lib/libril.so", "8f70272df3e80d2b9748509f57ddeed793f0726c", "/system/lib/libbluetooth.so", "7497d9beb62c5d71fc91380136c4d94780b4567c", "/system/lib/libbluedroid.so", "d96b12a9cbaf113bd75bf1fff02576372c3e4886", "/system/lib/libwnndict.so", "74b3f57072458438f3d463e5461b69606c4dee9d", "/system/lib/invoke_mock_media_player.so", "8ce591a6eed11755d04fb636092e42b8d0033e56", "/system/lib/libstdc++.so", "5f51f1840719e205bc332fe22a9633f3c6ea41d9", "/system/lib/libcameraservice.so", "d8ccae81ba01c6965b372f45c7251ed9a3456607", "/system/lib/libOmxEvrcEnc.so", "a25407dcbd990ddc19c7627cd312111ac4f1c4bc", "/system/lib/libjni_pinyinime.so", "7a55acbefad91e8c05821d061d22947fb50fbc47", "/system/lib/libstagefright_color_conversion.so", "e72be20418dce2f793c44768712c6395a4e10cfe", "/system/lib/libsqlite.so", "0a7de937f1582e968d64a3606f6182884adb074c", "/system/lib/libgui.so", "3188a27a93590722426cb529c8c4cf0db53fb213", "/system/lib/libdbus.so", "5462baf4b73aff741ca6ea10f8db79c541597fd7", "/system/lib/libmediaplayerservice.so", "409c684f851b43e2b5e0b87297824980731a79c5", "/system/lib/libssl.so", "89b8ee345024eae82ed12e227a95e049dbf0390a", "/system/lib/libOmxAdpcmDec.so", "48bfe42b544e4e312e443d005b7f28bdbc9fce88", "/system/lib/modules/2.6.32.9-perf/zram.ko", "8a3cc1126e5b1f70f6ac4e2504760f3978fc56de", "/system/lib/modules/2.6.32.9-perf/cifs.ko", "6e5bcba69526549e31ae724b75f0cac2b12d0cd0", "/system/lib/libaudioflinger.so", "832b6e5c16ca0ca28dc98cc00e954a7c6d17e132", "/system/lib/liba2dp.so", "872818e4402e46c331dee8e1b46f6b7b80ff9964", "/system/lib/libWnnEngDic.so", "1fd1e1185ed40bc1742426fa7de00a11f2f20e9d", "/system/lib/libandroid_runtime.so", "e9212e77e31887557639efe9ab4d3ddb7d4cda74", "/system/lib/libbluetoothd.so", "d6a157e092953b4bc724564ee8d10ff898ef2060", "/system/lib/libmedia_jni.so", "3695d756dcebb0f8286e81ca414b544b7a79b7be", "/system/lib/libz.so", "c9bbf1e19150fabc83ef7061e6b9c365b4f30d52", "/system/lib/libicui18n.so", "41570fe63751f9ceddd55a05fe2f45393ca782d2", "/system/lib/bluez-plugin/audio.so", "46a6864a24debed56977daecee3a8e29be7e4648", "/system/lib/bluez-plugin/input.so", "d395000be780e1edf3d67ed971545220c28fb9e2", "/system/lib/libsoundpool.so", "283c86123e153472d4677a50e57d5ebaefba7349", "/system/lib/libOmxVidEnc.so", "0581f0d029d1c7fbbc64c754ce4234f21296b246", "/system/lib/libsecril-client.so", "5e7c8540f55f7b497184be30a5b308c8e32de903", "/system/lib/libterm.so", "4e923a3bf60c7592f35591aebd68c562c35ab5a8", "/system/lib/libjnigraphics.so", "a6b1d6a40f114f49efc184383090310960c1e412", "/system/lib/libstlport.so", "7e9bce8cd9bb2fbaed00548e66d27a9e60456dc0", "/system/lib/librpc.so", "d9bed41abd678194472b43c2a215abd41d63cdc2", "/system/lib/libnetlink.so", "83f62ba80f430190623f7d5606c946de541866fd", "/system/lib/libc_malloc_debug_qemu.so", "35cc7e8862d79b05166f0df8545aae37dbdd583b", "/system/lib/libnetutils.so", "e4e2159b0d77b848cf1aacdf70c794b951a2aa25", "/system/lib/libomx_amrdec_sharedlibrary.so", "c6540d21bb0f0227e38cdd6c04a8180b602bfac8", "/system/lib/librtp_jni.so", "1cf1bb9fc2e7f6b596118846c796a59732eee6ce", "/system/lib/libnativehelper.so", "bb3ed823d9894add7d5b620c8dd39b4176ec8526", "/system/lib/libOmxWmvDec.so", "c5c6ee950057144134dc95eb089b0f154fd50e12", "/system/lib/libOmxAacEnc.so", "62de2a7ddbddb73a95ff33d289829cb7f8aa9751", "/system/lib/libmmjpeg.so", "001e5aded1914a7f190cf29c8d8761db156225c8", "/system/lib/libpagemap.so", "496a1ac85a7795ddb5ac4739208c14f655b7bcd5", "/system/lib/libOpenSLES.so", "969619ebbfc11ee4fddc9a80aca34a316065c1c7", "/system/lib/libstagefright_omx.so", "81552d050e912a23a82c742ff99996603c33651d", "/system/lib/libaudioeffect_jni.so", "46922fc073826d48f953801864a6d1196cebb921", "/system/lib/libdvm.so", "88750d1764be1b0d47104922d618f92c80c3cdbc", "/system/lib/libc_malloc_debug_leak.so", "73a6c7905f6be24b72dee9d50ab372792d16a997", "/system/lib/libiprouteutil.so", "d4e341352cfff188cdde437edb17e3bcc57bc62a", "/system/lib/libexpat.so", "29bd01740478b510f7d2bbc12ab2c311159085ba", "/system/lib/libOmxWmaDec.so", "026a60c0f284f91b07a775fda41c85231c40c7af", "/system/lib/soundfx/libvisualizer.so", "fb9ad4a56b88c963ab33c621dc199596485e4b20", "/system/lib/soundfx/libreverbwrapper.so", "2c09e73369771a8bd153fd44644ace6756e448f7", "/system/lib/soundfx/libbundlewrapper.so", "4a033e76289a676480d766c9f4bd9a20c62ee2ea", "/system/lib/libeffects.so", "d1a09250a1069a7f5b44bd45c314abd41ac8a2db", "/system/lib/libSR_AudioIn.so", "7945ab4fc4894561608c44813b715bcc4e41e94e", "/system/lib/libhardware.so", "789e061e1d54f9e98396b8d3138709a34ceb93d4", "/system/lib/liboemcamera.so", "9d328f01012404cd58cffe5e0e9f7301f1655b12", "/system/lib/libvorbisidec.so", "cbde50b28947fbcd095ceb620e991742fbf90792", "/system/lib/libOmxAmrwbDec.so", "eca38d4896f3a6744a4a1dd0d2817b711d9e79b9", "/system/lib/libutils.so", "672a11893d8c84656005d54933286d3c47574f1f", "/system/lib/libcrypto.so", "cfd6d6370bae3bca48d4c76548b6db159cc780c5", "/system/lib/libOmxQcelp13Enc.so", "b7c19a74ccfd1c81657f19db346a5f5a453dca67", "/system/lib/libOmxAmrDec.so", "c6e5cd06567849efd47c2bb0dc9c76865fa47818", "/system/lib/librs_jni.so", "8595ebf4177fefba7d4dd28108b620358a068dec", "/system/lib/libomx_avcdec_sharedlibrary.so", "bf748e8529e27544f1d9a49f0a98b14bfc5bdfbd", "/system/lib/libEGL.so", "de7e491e97e4413e4308cacdfcf71773a01747d9", "/system/lib/libnfc_ndef.so", "1d0d9af8806cc14df6a68d84129467e0ca34cf8a", "/system/lib/libOmxMp3Dec.so", "5dbbd021b55ad6fc28cbc0f19d9037c0bb7dc272", "/system/lib/libmock_ril.so", "672136aec442a23a94c07359eab68d36f6da58da", "/system/lib/libsurfaceflinger.so", "cb56871ac63800ad849879a0389e921d5230eecb", "/system/lib/libGLESv2.so", "de48e3093373ac9f11ef1bcff1f32343c54dde9f", "/system/lib/libbinder.so", "d294bb59109e9e0b31ff679594f2e56167ab62a5", "/system/lib/libstagefright_avc_common.so", "a3637e1d48fac0fa6308d8580c9ebc94f38b6cd9", "/system/lib/libETC1.so", "80b8bfe75cf158390532ed94862a6441839581c3", "/system/lib/libomx_amrenc_sharedlibrary.so", "9081d2cbcd1cead72176e32bf4ff8f63922ce12d", "/system/lib/libpixelflinger.so", "d9e1731783604d0e350ecf5bfee1f3b5c24a9098", "/system/lib/libstagefrighthw.so", "480cf1a15c87bf61bd27af43d1b38e3babc613b8", "/system/lib/libRS.so", "3fea52bb1c26fde82ca35f35c28d1490157a2bf8", "/system/lib/libandroid.so", "51656e45ad2a7be395d97f6a7ae107e7a07c458b", "/system/lib/libttspico.so", "faeb0ecf37060fe2795115ac49ad3085f70d1c4b", "/system/lib/libreference-ril.so", "5d1574adea9e970b1a782173215897966950b30c", "/system/lib/libthread_db.so", "7711e9887e0e97d26432ff2dce17acbb5ac5726a", "/system/lib/libaudio.so", "4d1c5d59409618ec0a283c9d231a79950e9ab659", "/system/lib/libgsl.so", "9a4e8ddea21624614df866194065f6a371efa84b", "/system/lib/libsqlite_jni.so", "88890b6bcb4c1e988c61015737e8654c306405bb", "/system/lib/libjpeg.so", "0a55af1cbf7153e3a77894a16daafb69ff7dec7b", "/system/lib/libwpa_client.so", "e293e5d68d5452788bd242ee53075e25af5df15e", "/system/lib/libsensorservice.so", "a54fb490da411d35f2af6d7366bb8c37e21f830b", "/system/lib/libctest.so", "71f1845e523d7f11a0becafaf9e8354d9ef811a2", "/system/lib/hw/lights.cooper.so", "bbdf88c8738c7977d19d499cc0f08e54fbba5622", "/system/lib/hw/sensors.goldfish.so", "54c050dbc61e8eabb736f793b9e201ba3a4ba8cb", "/system/lib/hw/copybit.msm7k.so", "fb484fb2f58e0fdfddc71d013879b8f044cebbef", "/system/lib/hw/gralloc.default.so", "1ea97aea529b1560a48e916b1178ef8856102c72", "/system/lib/hw/gralloc.msm7k.so", "10ab55432e433cbd7201607cd5de817fba6837d6", "/system/lib/hw/gps.goldfish.so", "471e38d559ecca6e5b92e39eab850825ce95d844", "/system/lib/libemoji.so", "bd7408e24a46284caa3850e7f1635fda36b2d993", "/system/lib/libdiskconfig.so", "a1792050e209f6e23c6ef012fffdcd4500865ab5", "/system/lib/libskia.so", "2c190d5be82eda58f2f24305a1abde823f331cf8", "/system/lib/libomx_aacdec_sharedlibrary.so", "55442793efc041fcc41a98df4130160fbb511af0", "/system/lib/libdrm1.so", "62790fd985f37d706344e3cb3b43a78b6bbac69f", "/system/lib/libui.so", "02dbfbf72756e7b1cc39bc96226efff0816898a1", "/system/lib/libdrm1_jni.so", "64671fd0e922f56420da3cd4e74542248de04c7c", "/system/lib/libicuuc.so", "4f419e2cb9a25bad033f66366934c6bbba507c37", "/system/lib/libreference-cdma-sms.so", "43fa760d84e9db69664c8610cf137ce93a2f51cd", "/system/lib/libomx_sharedlibrary.so", "dd179dc01e42af4e3b4b4677c66ccb049a53be6e", "/system/lib/libmm-adspsvc.so", "fef546a1af03e0d3dc610553d73725df0692f680", "/system/lib/libc.so", "514d473356d44c1372719b12e80f29ca722b1a8b", "/system/lib/libhardware_legacy.so", "c80ee55e2cff77131d8ecaa6b13c3b52c0c20d49", "/system/lib/libcutils.so", "a9c7813348229da863948c17da641911aaf11e4b", "/system/lib/libWnnJpnDic.so", "7e9b2eebedc5dfe0bb347f2a98c684990f6e918a", "/system/lib/libacc.so", "c1dd6dc9f10575ac4ccd60721fe950e1a352d028", "/system/lib/libOmxAmrRtpDec.so", "de234a6aa1c802b1f88d07148150e8f0a5e33f03", "/system/lib/libOmxAacDec.so", "585dba28dfa3aa56072c1c9061a69eef559a1bec", "/system/lib/libdl.so", "fef89714b1e498f96d02eb894e2da4a5f09dadf2", "/system/lib/libskiagl.so", "a02242451a3ab9d1de313117935f60e3505b72d6", "/system/lib/libstagefright.so", "75fcd2e9a93aa92385c680013ad4ea86539733e4", "/system/lib/libsonivox.so", "d97ab3805ee5c0c736b7ea6223344dabaf2abee6", "/system/lib/libexif.so", "f0e8c701700482e5f5e17522027a56da7ba37de8", "/system/lib/libjni_latinime.so", "05735255cb6640c945962e6657d1c4bfceb0ebe5", "/system/lib/libwebcore.so", "7eac450b1763bd1117b5a6bfbc71cd1236b5c396");
set_perm_recursive(0, 0, 0755, 0644, "/system");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
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_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
set_perm(0, 0, 06755, "/system/xbin/librank");
set_perm(0, 0, 06755, "/system/xbin/procmem");
set_perm(0, 0, 06755, "/system/xbin/procrank");
set_perm(0, 0, 06755, "/system/xbin/su");
set_perm(0, 0, 06755, "/system/xbin/tcpdump");
show_progress(0.200000, 0);
package_extract_file("system/bin/modelid_cfg.sh", "/tmp/modelid_cfg.sh");
set_perm(0, 0, 0777, "/tmp/modelid_cfg.sh");
run_program("/tmp/modelid_cfg.sh", "");
show_progress(0.200000, 10);
assert(package_extract_file("boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
show_progress(0.100000, 0);
unmount("/system");

I was having problem with that line 25, so i commented it out.