[Android] aalakib07:
OK, Lets Start :)

1.(Mounting system)-

______________

[[ mount("yaffs2", "MTD", "system", "/system");]]

[[ run_program("/sbin/busybox", "mount", "/system");]]

_______________

^^^ this 2 command is for mounting system.....

(Discribe)-use any command from this 2 command for mounting system pertition.this give you permission to write and read system pertition.So you must use these command in update script.you can mount anothers folders like data.just write data in stead of system.E.X- [[ mount("yaffs2", "MTD", "data", "/data");]] and no need to mount sdcard...

2.Formating system-

_______________

[[ format("yaffs2", "MTD", "system", "/system");]]

[[ run_program("/sbin/busybox", "format", "/system");]]

_______________

^^^this 2 command is for formating system pertition....

(Discribe)-this 2 command are used in formating system pertition...you can use it in your custom rom's script but in case of flashable patch/upadate zip dont use it.its only for custom ron's script...

3. package extracting -

_______________

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

_______________

^^^this command for extracting package...

(Discribe)-this command for extracting files...^^^this command is used for extractimg files in system pertition..you also ectract anothers files in anothers pertition...like by this- [[package_extract_dir("data", "/data");]]your data files are extracted in data pertition... [[package_extract_dir("data", "/data");]] by this your sdcard folder will be extracted in your sdcard...

4.(Smylink)-

_______________

[[symlink("toolbox", "/system/bin/mount");]]

_______________

^^^This command for smylink...

(Discribe)-you can use this command if you want to add some brinay in system/bin folder...

5.setting permissions(folder)-

_______________

[[set_perm_recursive(0, 0, 0755, 0644, "/system]]

_______________

^^^this command for setting permission(folder)

(Discribe)-this is used for set permission of system folder...

6.setting permission(files)-

_______________

[[ set_perm(1000, 1000, 0640, "/system/etc/bluetooth/auto_pairing.conf");]]

_______________

^^^this command for setting permission(files)

(Discribe)-this is used for set permission for defferent files

7.Delect files/folder-

_______________

[[ delete_recursive("/system/appbackup");]]

_______________

^^^this for delecting folder/files...

(Discribe)-this is used for delact adutional files/folders...

8.installing busybox-

_______________

[[ set_perm(0, 1000, 0755, "/system/xbin/busybox");

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

ui_print(" Installing BusyBox ");

sleep(2);

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

_______________

^^^this whole line is for installing busybox

(Discribe)-this is used for installing busybox...for this your busybox must be in system/xbin..

9.For rooting-

_______________

[[ ui_print(" Rooting ");

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

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

_______________

^^^this lines for rooting...

(Discribe)-this is used for auto rooting...for this su file must be in system/xbin

10.unmounting-

_______________

[[ui_print(" Unmount system ");

unmount("/system");]]

[[ run_program("/sbin/busybox", "umount", "/system");]]

_______________

^^^this 2 command for unmounting...

(Discribe)-this is used for unmounting system...you must need to unmount another folders too which you mounted like-[[ unmount("/data");]] and [[unmount("/sdcard");]]

11.Show progress-

_______________

[[ show_progress(0.2, 10);]]

_______________

this for show your ui print times

12.ui_print-

_______________

[[ ui_print(" Starting to install... ");]]

_______________

^^^this is ui print what is showed on cwm....

13.auto reboot-

_______________

[[ui_print(" Auto rebooting ");

sleep(2);

ui_print(" Opening Cayno 'X'... ");

sleep(2);

run_program("/sbin/sleep", "5");

run_program("/sbin/reboot");]]

_______________

^^^this whole line for auto rebooting.

14.installing backup imei and restore imei-

_______________

[[ ui_print(" Backuping your imei ");

sleep(2);

package_extract_file("backup_imei", "/tmp/backup_imei");

set_perm(0, 0, 0777, "/tmp/backup_imei");

run_program("/tmp/backup_imei");]]

_______________

^^^this for backup imei

Discribe)-for this the backup imei files must be in you zip folder with meta_inf, system, another files...

______________

[[ ui_print(" Restoring your imei ");

sleep(2);

package_extract_file("restore_imei", "/tmp/restore_imei");

set_perm(0, 0, 0777, "/tmp/restore_imei");

run_program("/tmp/restore_imei");]]

_______________

^^^this for restoring imei....

(Discribe)- for this the restore imei files must be in you zip folder with meta_inf, system, another files...

15.logo.bin-

_______________

[[ ui_print(" Extracting boot logo ");

sleep(2);

package_extract_file("logo.bin", "/dev/logo");]]

_______________

^^^this for installing boot logo...

(Discribe)- for this the logo.bin files must be in you zip folder with meta_inf, system, another files...

16.for installing boot.img-

[[ ui_print(" Installing kernel ");

assert(package_extract_file("boot.img", "/tmp/boot.img"),

write_raw_image("/tmp/boot.img", "bootimg"),

delete("/tmp/boot.img"));]]

_______________

^^^this for extract and installing new karnel/boot.img

(Discribe)- for this the boot.img file must be in you zip folder with meta_inf, system, another files...

17.active init.d-

_______________

[[ ui_print(" Activated init.d ");

sleep(2);

set_perm_recursive(0, 0, 0777, 0777, "/system/etc/init.d");]]

________________

^^^this for active init.d...

(Discribe)-for this the init.d file must be in system/etc

18.sleep-

________________

[[sleep(2);]]

________________

[[run_program("/sbin/sleep", "3");]]

________________

^^^this 2 command for sleep...

(Discribe)-this commands are same as show_progress...

19.for making recovery.img flashable zip-

________________

[[ui_print("Starting Installation......... ");

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

sleep(5);

assert(package_extract_file("recovery.img", "/dev/recovery"));]]

________________

^^^this for installing recovery.img

(Discribe)-for this you recovery.img must be in your zip with another folder..just put it with meta_inf and make zip and flash...

_______________________________________

Thats all important command...and i know...if you know anothers command what i forget to add then told me plz...i will add this too....

_______________________________________

Written by :

MD Shafikul

HIT THANKS IF I HELPED U :)