[Galaxy S Advance I9070 General] PradeepMurugan:
To create updater-script or to edit updater-script you need Notepad++ (don’t use notepad). Download it from here and install in your pc

updater-script is located in Meta-inf/com/google/android/updater-script

To create your own updater-script

Open notepad++ and from file menu select new and create the commands and create your own updater-script with this tutorial

After typing the commands save it as all types(*.*) and name it as updater-script and click save and put it in folder Meta-inf/com/google/android/updater-script

In this tutorial i will explain you all commands used in updater-script so that you can edit or create updater-script

ui_print – This command prints the prints the word inside the quotations

Example – ui_print(“galaxy s advance”); prints galaxy s advance in your cwm recovery

mount – This command mounts the partition, if you want to add files to system partition you have to mount system partition, data for data partition

To mount system - mount(“ext4″, “EMMC”, “/dev/block/mmcblk0p3″, “/system”);

Here mmcblk0p3 is the name of system partition for galaxy s advance(this name varies from device to device)

format - This command formats the partition specified

It is highly recommended to include this command to format system and data if you are making updater-script for ROM

To Format system - format(“ext4″, “EMMC”, “/dev/block/mmcblk0p3″, “0″);(partition name varies from device to device)

package_extract_dir(” “, “/”) – This command extracts all the files from the folder mentioned inside first quotation to the partition or directory inside second quotation

For system - package_extract_dir(“system”, “/system”);

(this copies all files from system folder in zip to system partition in phone)

For data - package_extract_dir(“data”, “/data”);

package_extract_file(” “,”/”) - This command extract the single file inside between first quotation from zip to the partition or directory inside second quotation

symlink – This command creates links to its executable files

Here is an example

for super su binaries - symlink(“/system/xbin/su”, “/system/bin/su”);

set_perm_recursive - This command sets permission for folders

here android uses unix permission system

in unix

4 – read

2 – write

1 – execute

so

rwx is 4+2+1 = 7

rw is 4+2 = 6

rx is 4+1 = 5

Example - set_perm_recursive(0, 0, 0755, 0644, “/system”);

In this 0 is a user id for owner that refers to root. It means that permission owner for system folder. and 0 is root user means it unrestricted access to system. it is given in order to run programs to run properly

second 0 also refers to root. but here it refers to group id 0

we are only seeing about folders because “set_perm_recursive” is a command that sets permission to folders

next 0755 it means rwxr-xr-x permission has been given to system folder and rw-r-r is set for all folders inside system folder

set_perm – This command sets permission for a specific file

Example - set_perm(1000, 1000, 0640, “/system/etc/bluetooth/auto_pairing.conf”);

here the 1000 refers to user id system and 0640 is rw-r—–

and this command sets the permission rw-r—– for the file auto_pairing.conf

unmount – This command unmounts the partition

Example - unmount(“/system”); – unmounts system

General rule in updater-script – all commands should end with semi colon ; otherwise it will show error and if cwm or twrp shows status 7 error the error is in updater-script

try fixing it by going through this thread