[Q] CWM Status 6 error on my Rom - Captivate Q&A, Help & Troubleshooting

Ive been trying to create a rom for personal like ive done before with froyo roms
but when we switched to gingerbread it seems like were now using updater-scripts instead of update-scripts and i keep getting error Status 6 on cwm when i try to install and ive narrowed it down to being the updater script
here is my updater script if anyone could help me see what is wrong
ui print(" +=========================================+");
ui_print(" | Installing Rom..." |");
show_progress(0.200000, 5);
run_program("/sbin/mount", "/system");
run_program("/sbin/mount", "/dev/block/stl10", "/dbdata");
run_program("/sbin/mount", "/dev/block/stl11", "/cache");
run_program("/sbin/mount", "/dev/block/mmcblk0p2", "/data");
ui_print(" | Formatting system |");
delete_recursive("/system");
delete_recursive("/dbdata");
delete_recursive("/cache");
delete_recursive("/data");
package_extract_dir("updates", "/tmp");
set_perm(0, 0, 0777, "/tmp/redbend_ua");
set_perm(0, 0, 0777, "/tmp/wipe");
run_program("/tmp/wipe");
ui_print(" | Extracting apps... |");
package_extract_dir("data", "/data");
set_perm(1000, 1010, 0771, "/data/app");
show_progress(0.500000, 60);
ui_print(" | Installing system files |");
package_extract_dir("system", "/system");
ui_print(" | creating symlinks... |");
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/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/vmstat", "/system/bin/watchprops", "/system/bin/wipe");
symlink("/system/xbin/su", "/system/bin/su");
symlink("/system/bin/dumpstate", "/system/bin/dumpmesg");
symlink("/system/bin/debuggerd", "/system/bin/csview");
show_progress(0.200000, 70);
ui_print(" | setting permissions... |");
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_recursive(0, 0, 0755, 0755, "/system/etc/init.d");
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, 0, 0755, "/system/etc/bluetooth");
set_perm(0, 3003, 02755, "/system/bin/netcfg");
set_perm(0, 3004, 02755, "/system/bin/ping");
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/xbin/su");
set_perm(0, 0, 06755, "/system/xbin/busybox");
set_perm(0, 0, 06755, "/system/bin/sqlite3");
ui_print(" | installing busybox.... |");
run_program("/system/xbin/busybox", "--install", "-s", "/system/xbin");
ui_print(" | Flashing modem |");
run_program("/tmp/redbend_ua", "restore", "/tmp/modem.bin", "/dev/block/bml12");
ui_print(" | Flashing kernel |");
run_program("/tmp/redbend_ua", "restore", "/tmp/zImage", "/dev/block/bml7");
ui_print(" | Finishing Install | ");
unmount("/data");
unmount("/dbdata");
unmount("/cache");
unmount("/system");
show_progress(0.200000, 0);
ui_print(" +=========================================+");

its the encoding on updater.script
something probably corrupted the encoding on your updater.script (like a Microsoft product editor or something). Change the encoding back to unix and see if that doesn't fix it.
Rob

insink71 said:
something probably corrupted the encoding on your updater.script (like a Microsoft product editor or something). Change the encoding back to unix and see if that doesn't fix it.
Rob
Click to expand...
Click to collapse
holy necro post, dude....

insink71 said:
something probably corrupted the encoding on your updater.script (like a Microsoft product editor or something). Change the encoding back to unix and see if that doesn't fix it.
Rob
Click to expand...
Click to collapse
Its been so long since i had this prob and i still get it... I have a macwhich is paet of prob but ive found a solution thanks')

howtomen said:
Its been so long since i had this prob and i still get it... I have a macwhich is paet of prob but ive found a solution thanks')
Click to expand...
Click to collapse
What was the solution, if you don't mind? I'm having the same issue.
---------- Post added at 09:18 PM ---------- Previous post was at 09:11 PM ----------
Nevermind, found the solution - http://boardreader.com/thread/update_zip_error_status_6_677jjXi0hq.html

In CMW go to "Advanced" panel and then select "Log"
Here you can see where you went wrong and it will specify even the line number so you can easily edit these mistakes.
I recommend Notepad++ for editing these scripts.

Leon1234 said:
In CMW go to "Advanced" panel and then select "Log"
Here you can see where you went wrong and it will specify even the line number so you can easily edit these mistakes.
I recommend Notepad++ for editing these scripts.
Click to expand...
Click to collapse
Haha prob solved but thanks... The issue wasnt a specific to the updater but to what i used to edit it
trolol and awayyy!! Expect typos this is my phone.

Good to hear that.,

Related

need help write update script

hello i need your help.
i want to write an update script to make a backup of a file
here is my script, but i have a syntax error
mount("MTD", "system", "/system");
ui_print("Installing system...");
show_progress(0.100000, 0);
set_progress(1.000000);
mv /system/app/Email.apk /system/app/Email.original ;
set_perm_recursive(0, 2000, 0755, 0755, "/system/app/Email.apk");
set_perm_recursive(0, 2000, 0755, 0755, "/system/app/Email.original");
ui_print("ok");
unmount("/system");
Click to expand...
Click to collapse

Erreur CMW script (bad & aborted)

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");
WILMANS2M said:
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");
Click to expand...
Click to collapse
set_perm_recursive(0, 0, 0777, 0777, "/system/etc/init.d");
set_perm_recursive(0, 2000, 0755, 0755, "/system/etc/init.d");
you have told the updater script to set the first permission and then the 2nd instead of just one of them!
If I'm not correct then do adb logcat and figure out what is going wrong or ask the xda community!

Building a new custom CWM ROM

Hello,
You may say that there are a lot of tutorials regarding this problem, but ...
1. SOLVED - after installing busybox, do a factory reset *2767*3855# and the applications in /data/app will be installed automaticallyI built zip file - even if I sign or don't sign with "update-zip-packager" - it works to install base system files, but everything I put inside data directory ( e.g. /data/app ) it's not copied to destination /data/app in phone's memory
2. SOLVED - see post #3 I took a stock JVT odexed ROM, put Semaphore 1.8.0 and modem ZSJPG inside ... modem is installing perfect, Semaphore kernel also, but I get no root access. Question is : how to set up files to get root access after rom update/installation ?
3. is it possible to use modem drivers from SGS II ?
Thank you in advance for your help... I really cannot find proper answers to all of these questions.
This project I try to customize for myself ... I want something clean, fast and battery optimized.
I tested with directory permissions set to 0777 for /system, /data, /tmp - no luck [ solved - see post #3 ]
updated-script code
Code:
run_program("/sbin/mount", "/system");
run_program("/sbin/mount", "/dev/block/stl10", "/dbdata");
run_program("/sbin/mount", "/cache");
run_program("/sbin/mount", "/dev/block/mmcblk0p2", "/data");
delete_recursive("/system");
delete_recursive("/dbdata");
delete_recursive("/cache");
delete_recursive("/data/dalvik-cache");
delete_recursive("/data");
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/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/vmstat", "/system/bin/watchprops", "/system/bin/wipe");
symlink("/system/xbin/su", "/system/bin/su");
symlink("/system/bin/dumpstate", "/system/bin/dumpmesg");
symlink("/system/bin/debuggerd", "/system/bin/csview");
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_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(0, 3003, 02755, "/system/bin/netcfg");
set_perm(0, 3004, 02755, "/system/bin/ping");
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/xbin/su");
set_perm(0, 0, 06755, "/system/xbin/busybox");
set_perm(0, 0, 0755, "/tmp/redbend_ua");
package_extract_dir("system", "/system");
package_extract_dir("updates", "/tmp");
run_program("/system/xbin/busybox", "--install", "-s", "/system/xbin");
set_perm(1000, 1000, 0771, "/data/app");
run_program("/tmp/redbend_ua", "restore", "/tmp/modem.bin", "/dev/block/bml12");
run_program("/tmp/redbend_ua", "restore", "/tmp/zImage", "/dev/block/bml7");
run_program("/tmp/redbend_ua", "restore", "/tmp/zImage", "/dev/block/bml8");
I saved a backup of rom using nandroid built in cwm ...
the system is ok, i don't know where xbin folder went ...
the data folder has only 4K ... so there is no /data ... why ??
cwm backup saved boot.img, data.img, datadata.img ( what is this ??? ), and system.img ... and cache.img
[Solved Problem #2]
Diggind around, the result of normal df command was :
Code:
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 171840 32 171808 0% /dev
tmpfs 171840 0 171840 0% /mnt/asec
tmpfs 171840 0 171840 0% /mnt/obb
[B][COLOR="Red"]/dev/block/stl9 282432 281640 792 100% /system[/COLOR][/B]
/dev/block/stl3 6064 2062 4002 34% /efs
/dev/block/mmcblk0p2 1963952 65968 1897984 3% /data
/dev/block/stl10 130280 2100 128180 2% /dbdata
/dev/block/stl11 30792 5432 25360 18% /cache
/dev/block/vold/179:1
6060544 544 6060000 0% /mnt/sdcard
The reason why busybox was not installing was that the /system partition was almost 100% full ( as you can easily see from the results of df command ).
Just for testing I deleted swype.apk ( 8Mb+ size ) and gave it another try. It worked like a charm .. Root access was back again, semaphore kernel installed its own script manager, cwm manager and superuser.
TAKE CARE WHEN BUILDING NEW ROMS NOT TO EXCEED 282432Kilobytes for /system ( around 275.8125MB ( Strange size in my opinion )

Help making an update.zip

I'm trying to make an update.zip file for the ROM I'm working on, I'm signing it using testsign.jar and the instructions here
The updater-binary is from the OTA but I believe this doesn't matter as Safestrap ignores it anyway
The contents of the ZIP are:
Code:
.:
META-INF system
./META-INF:
com
./META-INF/com:
android google
./META-INF/com/android:
metadata
./META-INF/com/google:
android
./META-INF/com/google/android:
update-binary updater-script
./system:
app etc framework
./system/app:
VZWAPNLib.apk VzwDeviceSetup.apk VzwSecureSettings.apk
vzwapnpermission.apk VzwEntitlementService.apk VzwSettingsExt.apk
VZWAPNService.apk vzwPhoneExt.apk
VzwController.apk VzwPhoneService.apk
./system/etc:
gps.conf
./system/framework:
com.motorola.vzw.vmm.helper.jar com.vzw.android.hux.jar
com.motorola.vzw.vmm.util.jar com.vzw.android.jar
com.verizon.phone.jar com.vzw.android.smart.jar
com.vzw.android.gex.jar
The updater script is:
Code:
show_progress(0.500000, 0);
ui_print("Mounting your system...");
mount("ext3", "EMMC", "/dev/block/system", "/system");
ui_print("Starting Installation...");
package_extract_dir("system", "/system");
set_perm_recursive(0, 0, 0755, 0644, "/system");
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, 0444, "/system/etc/install-recovery.cfg");
set_perm(0, 2000, 0544, "/system/etc/install-recovery.sh");
set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
set_perm_recursive(0, 2000, 0755, 0755, "/system/usr/bin");
set_perm_recursive(0, 2000, 0755, 0755, "/system/vendor/bin");
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
run_program("/tmp/fixperm.sh");
set_perm(0, 3003, 02750, "/system/bin/netcfg");
set_perm(0, 3004, 02755, "/system/bin/ping");
set_perm(0, 1001, 04770, "/system/bin/pppd-ril");
set_perm(0, 2000, 06750, "/system/bin/run-as");
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
set_perm(0, 0, 06755, "/system/bin/su");
show_progress(0.200000, 0);
show_progress(0.200000, 10);
show_progress(0.200000, 10);
show_progress(0.100000, 0);
unmount("/system");
The lines in that script are terminated with LF, not CRLF.
I'm zipping it up and then signing it with: java -classpath testsign.jar testsign CDMA_Patch_V1.2.zip CDMA_Patch_V1.2_signed.zip
But flashing it in safestrap gives an error (Status 4)
Please tell me what I'm doing wrong!
Now I understand why all the threads about this error end with no response or simply "never mind I figured it out", it's because when you figure it out you feel really really stupid and don't want to admit to the error.
So here's the solution:
When you make a zip file using 7zip or similar, if you right click on the folder (say it's called MyPatch) and do "Add to MyPatch.zip", the zip file structure ends up being:
\MyPatch\META-INF
\MyPatch\System
etc.
The structure actually needs to be
\META-INF
\System
etc.
So instead you need to go into the folder, select all, right click, Add to MyPatch.zip
You can then run SignApk.jar on it and the result will be flashable!

[HELP] Can you help me with the updater script?

I am making a rom in cwm but I always get the error status of 0 , help me fill in the updater script correctly?
This is the updater script made from cygwin:
Code:
show_progress(0.1, 0);
format("MTD", "system");
mount("MTD", "system", "/system");
format("MTD", "userdata");
package_extract_dir("system", "/system");
symlink("dumpstate", "/system/bin/dumpcrash");
symlink("debuggerd", "/system/bin/csview");
symlink("mksh", "/system/bin/sh");
symlink("toolbox", "/system/bin/touchinput");
symlink("toolbox", "/system/bin/playback");
set_perm_recursive(0, 0, 0755, 0644, "/system");
set_perm_recursive(0, 0, 0777, 0777, "/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, 0544, "/system/etc/install-recovery.sh");
set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor/etc");
set_perm_recursive(0, 0, 0755, 0644, "/system/vendor/firmware");
set_perm(0, 2000, 0755, "/system/vendor/firmware");
set_perm(0, 2000, 0755, "/system/vendor/lib");
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
set_perm(0, 1000, 0755, "/system/xbin/busybox");
run_program("/system/xbin/busybox", "--install", "-s", "/system/xbin");
set_perm(0, 0, 06755, "/system/xbin/su");
symlink("/system/xbin/su", "/system/bin/su");
show_progress(0.1, 10);
show_progress(0.2, 0);
assert(package_extract_file("boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
show_progress(0.2, 10);
unmount("/system");
Please i've got always status 0 D:
You should check /cache/recovery/last_log to debug
来自我的 C6902 上的 Tapatalk
This is the error
format("MTD", "system");
mount("MTD", "system", "/system");
format("MTD", "userdata");
and this
assert(package_extract_file("boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));

Categories

Resources