[TUT] [for NOOB] editing updater-script for noobs!

_/=-)+(-=\_

Senior Member
May 4, 2009
50
1
0
Bootloader and kernel are untouched. The phone is rooted, except that everything is stock.

EDIT: I replaced the update-binary with one that supports ext4 - now I can at least see the ui_print messages. The error message changed to E:Error in /tmp/sideload/package.zip (Status 6)
 
Last edited:

BleedingIris

Senior Member
Aug 12, 2012
2,313
748
0
HEAVEN
Bootloader and kernel are untouched. The phone is rooted, except that everything is stock.

EDIT: I replaced the update-binary with one that supports ext4 - now I can at least see the ui_print messages. The error message changed to E:Error in /tmp/sideload/package.zip (Status 6)
Where did you find update binary with ext4?..
Status 6 is corrupted zip file in cwm
Repack it with another zip with no compression

Sent from my HTC Explorer A310e using xda app-developers app
 

_/=-)+(-=\_

Senior Member
May 4, 2009
50
1
0
Where did you find update binary with ext4?..
Status 6 is corrupted zip file in cwm
Repack it with another zip with no compression

Sent from my HTC Explorer A310e using xda app-developers app
I found it here on the forum. I don't remember where exactly thought.

I repack every zip with Update Zip Packager 3.0, so every zip should be fine. I even repacked aroma with it.

I do not have CWM, only stock recovery.
 
B

Bass_Man25

Guest
Being an admitted noob at creating flashable zip files, one thing I don't understand is: what is the purpose of the update-binary file? What does it do? I've tried to create signed zip files with a plethora of different programs to no avail. Now, I just use an existing updater-script and update-binary to do the flash. Yet, when I add a new line (e.g. ui_print...) to the updater-script, the zip will not flash (it gives me an error). If I revert the updater-script back (i.e. remove the additional line), it flashes fine.

I understand the updater-script - I've got that. I do not understand the update-binary.

Any assistance would be greatly appreciated. Thank you in advance.
 

pitchblack5691

Senior Member
Jan 12, 2012
437
447
0
chennai
I understand the updater-script - I've got that. I do not understand the update-binary.

Any assistance would be greatly appreciated. Thank you in advance.
As told in the op, the update-binary is a binary file. It is a program which reads the updater-script line by line and instructs the recovery to do what we defined in the updater-script. Instead of changing the updater-script your problem might be solved by using a different update-binary . Your update-binary might be outdated or corrupted . I use a cyanogenmod 10 flashable zip's update-binary and never got any errors in recovery while flashing.

#pitchblack5691#
 

Kepszlok

Member
Oct 17, 2011
10
0
0
I need some help. I wish to copy modified database files to /data/data/com... witch customized CyanogenMod settings. (x10 mini pro, bl unlcoked, custom nAa based kernel and CM7 rom)

The relevant part of the update-script:
Code:
mount("yaffs2", "MTD", "userdata", "/data");
...
...
delete("/data/data/com.cyanogenmod.cmparts/shared_prefs/com.cyanogenmod.cmparts_preferences.xml")
package_extract_file("system/usr/com.cyanogenmod.cmparts_preferences.xml", "/system/app/com.cyanogenmod.cmparts_preferences.xml");
package_extract_file("system/usr/com.cyanogenmod.cmparts_preferences.xml", "/data/data/com.cyanogenmod.cmparts/shared_prefs/com.cyanogenmod.cmparts_preferences.xml");
assert(package_extract_file("system/usr/com.cyanogenmod.cmparts_preferences.xml", "/data/data/com.cyanogenmod.cmparts/shared_prefs/com.cyanogenmod.cmparts_preferences.xml"));
...
...
The results:
The delete command gaves no error, but does nothing.
The first package_extract_file command works, the file is extracted to the app folder, so the syntax is good. (this command is for testing only)
The second command gaves no error, but does nothing.
The asserted command gaves back error status 7.


If somebody knows what's wrong, please let me know. Maybe sime write permisson issue...
 
Last edited:

badagila

Senior Member
Apr 5, 2013
653
120
0
Iloilo City
www.facebook.com
Hi friends of XDA,

I created this tutorial especially for noobs who would like to know how the clockworkmod uses the .zip
file and what and all goes into the process of flashing a .zip file and mainly about the format and syntax used in updater-script.

first is first!

#include
/*
* I am not responsible for bricked devices, dead SD cards or
* thermonuclear war.
* do some research if you have any concerns.
* YOU are choosing to make these modifications.
* yes, i copied this disclaimer from FXP because it is cool and i am lazy! :)
*/

now what is the updater-script and update-binary present in the META-INF>com>google>android in any flashable zip package?

1. updater-script - it is just a text file which contains all the commands which tells the clockworkmod what to do with the given
zip file. the updater-script is written in the edify scripting language.

2. update-binary - it is a binary which is requiered by the clockworkmod to translate the human readable format of the updater-
script to machine readable format for execution of the updater-script in our device.


exploring the updater-script:
now let's start exploring the updater-script ! :)

1. open the updater script with notepad++ (strongly recommended)

2. now i will try and explain commands generally used in the updater-script,



assert(getprop("ro.product.device") == "ST15i" || getprop("ro.build.product") == "ST15i" ||
getprop("ro.product.device") == "ST15a" || getprop("ro.build.product") == "ST15a" ||
getprop("ro.product.device") == "smultron" || getprop("ro.build.product") == "smultron");

the above bunch of lines checks the device model to confirm that the zip file is flashed on the device
for which it is specifically created for. These bunch of lines are very important because it prevents
flashing of zip file which is not intended for the device hence avoiding any problems due to flashing
the wrong zip. for example the above lines checks for the value of "ro.product.device" and
"ro.build.product"in the build.prop file of the already existing rom in the device, if any of the three
defined values ST15i, ST15a, smultron are found it will continue with the next line of updater-script
otherwise flashing gets aborted with error in getprop.



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

the above command explains itself, it is used to format the specified partition

syntax explanation:
format - the main command to direct the cwm to format using the following parameters
"yaffs2" - filesystem type used in the device
"MTD" - type of the partition used in the file system
"system" - name of the partition to be formatted
"/system" - location of the partition to be formatted



ui_print("Format Completed");

the above command is also self explanatory, it directs the cwm to display the following text
enclosed in double quotes in the user interface (display).
after succesful formatting it displays "Format Completed" in the device screen.



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

the mount command directs the cwm to mount the following file system and the following partition
the syntax is just as explained in the format command except that this command mounts the
defined partition whereas the format command formats the defined partition.

let's review what we have done till now,

1. we have checked the device to confirm that this is the device for which we created the zip.
2. we have formatted the system partition of the device.(this is only done when a new complete rom is being flashed, for flashing mods you
should never format the system partition!)
3. we have mounted the system partition of the device.

now let's continue,


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

this command searches for the directory (folder) named "system" in the root of the zip file and
copies all the content of the "system" folder from the zip file into the "/system" partition
which is already mounted by the previous mount command.

remember the structure of the file system in the zip file and the "/system" partition of the device must be always identical.
for eg., you have created a mod by editing the systemUI.apk and you want to flash it, the system UI.apk resides in "/system/app"
so the structure of the file system in the update zip should be "/system/app/systemUI.apk"
ie., the update zip should contain folder named "system" at the root of it and folder named "app" inside the "system" folder and the
modded "systemUI.apk" must be placed inside the "app" folder.



package_extract_file("autoroot.sh", "/tmp/autoroot.sh");

this command searches for the file named "autoroot.sh" in the root of the zip file and
copies the file to "/tmp" folder and names it as "autoroot.sh" (here it does not change the name)



symlink("mksh", "/system/bin/sh");

the above command creates a symlink.
okay, now let's see about symlinks,
symlink is nothing but shortcuts, for example if a file is requiered in two different places instead of copy pasting the file
in two different locations, the file is copied to one of the two locations and in the other location a shortcut to the file(symlink)
is created. the source and the symlink can have different names (actually this is the prime use of symlinks).
to explain in a noob friendly manner,
take the above symlink, it creates a shortcut(symlink) for the command "mksh" and places it in the path of the operating system.
the shortcut(symlink) directs to the file "/system/bin/sh" , so whenever the os gets a request to execute the "mksh" command, the actual
binary that gets excuted will be "/system/bin/sh" .
creating symlinks saves a lot of space because instead of copying the whole file and placing it in requiered places we are just
creating shortcuts which directs to the source file which can be placed anywhere in the file system (generally placed in the path of the os).



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

the above command is used to set permission recursively for the files and folders present inside a folder (in this case for "/system" folder).

syntax explanation:
0 - uid - it defines that the following permission is set for the user id 0 .
0 - gid - it defines that the following permission is set for the group id 0 .
0775 - dirmode - it defines that 0775 permission to set to directories contained within the specified directory.
0644 - filemode - it defines that 0644 permission to set to files contained within the specified directory.
"/system" - target directory to set the above mentioned permissions.



set_perm(0, 3003, 06755, "/system/bin/ip");

the above command is used to set permission for a individual file (in this case for "/system/bin/ip" file).

syntax explanation:

0 - uid - it defines that the following permission is set for the user id 0 .
3003 - gid - it defines that the following permission is set for the group id 3003 .
06775 - it defines that 06775 permission to set to the specific file.
"/system/bin/ip" - target file to set the above mentioned permissions.



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

remember the file autoroot.sh from package_extract_file command?
that file is supposed to be a shell script, the above command directs cwm to execute the "autoroot.sh" shell script present in "/tmp" folder.



unmount("/system");

the unmount command directs the cwm to unmount the following partition
the syntax is just as explained in the mount command except that this command unmounts the
defined partition whereas the mount command mounts the defined partition.

Okay now going into slightly complex and/or not widely used updater-script commands,

Ifelse

Syntax:
Ifelse(condition),(do_this),(else_do_this);

Example:
ifelse mount("yaffs2", "MTD", "system", "/system") == "system", ui_print("Mounted!"), ui_print("Mount Failed!");

Ifelse command can be explained simply as asking the system to do something based on the result of a condition.

From the example:

The ifelse command would attempt to mount the MTD partition named "system" to "/system".
If the mounting process succeeds (the condition), the script will display "Mounted!", else it will display "Mount Failed!"



abort()

It just abort's the script execution

Note: it is usually paired with some other command for example the getprop command or with ifelse.

Independently specifying abort() in the updater-script will kill the script abruptly right there so use this command carefully.



ALWAYS LEAVE A BLANK LINE AT THE END OF THE update-script (if the code contains 50 lines then 51 lines should be visible
in the notepad++ including a blank line after the end of the script)
ALWAYS REMEMBER TO SET THE EOL (end of line) CONVERSION OF updater-script
IN UNIX FORMAT BEFORE SAVING (notepad++ > edit > EOL conversion > UNIX format)

the above mentioned commands are just basic edify scripting commands which are generally used in updater-script.

for detailed scripting and coding in edify scripting language check out the following sources:

source of update-binary

introdution to edify

http://forum.xda-developers.com/wiki/Edify_script_language

scratchpad-documenting-edify-commands-for-android-updater-scritps

http://forum.xda-developers.com/showthread.php?t=1290062

HIT THANKS IF I HAVE HELPED YOU! :)
how for samsung dude?
 
Sep 25, 2013
48
5
0
Bangalore
Hi friends of XDA,

I created this tutorial especially for noobs who would like to know how the clockworkmod uses the .zip
file and what and all goes into the process of flashing a .zip file and mainly about the format and syntax used in updater-script.

first is first!

#include
/*
* I am not responsible for bricked devices, dead SD cards or
* thermonuclear war.
* do some research if you have any concerns.
* YOU are choosing to make these modifications.
* yes, i copied this disclaimer from FXP because it is cool and i am lazy! :)
*/

now what is the updater-script and update-binary present in the META-INF>com>google>android in any flashable zip package?

1. updater-script - it is just a text file which contains all the commands which tells the clockworkmod what to do with the given
zip file. the updater-script is written in the edify scripting language.

2. update-binary - it is a binary which is requiered by the clockworkmod to translate the human readable format of the updater-
script to machine readable format for execution of the updater-script in our device.


exploring the updater-script:
now let's start exploring the updater-script ! :)

1. open the updater script with notepad++ (strongly recommended)

2. now i will try and explain commands generally used in the updater-script,



assert(getprop("ro.product.device") == "ST15i" || getprop("ro.build.product") == "ST15i" ||
getprop("ro.product.device") == "ST15a" || getprop("ro.build.product") == "ST15a" ||
getprop("ro.product.device") == "smultron" || getprop("ro.build.product") == "smultron");

the above bunch of lines checks the device model to confirm that the zip file is flashed on the device
for which it is specifically created for. These bunch of lines are very important because it prevents
flashing of zip file which is not intended for the device hence avoiding any problems due to flashing
the wrong zip. for example the above lines checks for the value of "ro.product.device" and
"ro.build.product"in the build.prop file of the already existing rom in the device, if any of the three
defined values ST15i, ST15a, smultron are found it will continue with the next line of updater-script
otherwise flashing gets aborted with error in getprop.



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

the above command explains itself, it is used to format the specified partition

syntax explanation:
format - the main command to direct the cwm to format using the following parameters
"yaffs2" - filesystem type used in the device
"MTD" - type of the partition used in the file system
"system" - name of the partition to be formatted
"/system" - location of the partition to be formatted



ui_print("Format Completed");

the above command is also self explanatory, it directs the cwm to display the following text
enclosed in double quotes in the user interface (display).
after succesful formatting it displays "Format Completed" in the device screen.



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

the mount command directs the cwm to mount the following file system and the following partition
the syntax is just as explained in the format command except that this command mounts the
defined partition whereas the format command formats the defined partition.

let's review what we have done till now,

1. we have checked the device to confirm that this is the device for which we created the zip.
2. we have formatted the system partition of the device.(this is only done when a new complete rom is being flashed, for flashing mods you
should never format the system partition!)
3. we have mounted the system partition of the device.

now let's continue,


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

this command searches for the directory (folder) named "system" in the root of the zip file and
copies all the content of the "system" folder from the zip file into the "/system" partition
which is already mounted by the previous mount command.

remember the structure of the file system in the zip file and the "/system" partition of the device must be always identical.
for eg., you have created a mod by editing the systemUI.apk and you want to flash it, the system UI.apk resides in "/system/app"
so the structure of the file system in the update zip should be "/system/app/systemUI.apk"
ie., the update zip should contain folder named "system" at the root of it and folder named "app" inside the "system" folder and the
modded "systemUI.apk" must be placed inside the "app" folder.



package_extract_file("autoroot.sh", "/tmp/autoroot.sh");

this command searches for the file named "autoroot.sh" in the root of the zip file and
copies the file to "/tmp" folder and names it as "autoroot.sh" (here it does not change the name)



symlink("mksh", "/system/bin/sh");

the above command creates a symlink.
okay, now let's see about symlinks,
symlink is nothing but shortcuts, for example if a file is requiered in two different places instead of copy pasting the file
in two different locations, the file is copied to one of the two locations and in the other location a shortcut to the file(symlink)
is created. the source and the symlink can have different names (actually this is the prime use of symlinks).
to explain in a noob friendly manner,
take the above symlink, it creates a shortcut(symlink) for the command "mksh" and places it in the path of the operating system.
the shortcut(symlink) directs to the file "/system/bin/sh" , so whenever the os gets a request to execute the "mksh" command, the actual
binary that gets excuted will be "/system/bin/sh" .
creating symlinks saves a lot of space because instead of copying the whole file and placing it in requiered places we are just
creating shortcuts which directs to the source file which can be placed anywhere in the file system (generally placed in the path of the os).



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

the above command is used to set permission recursively for the files and folders present inside a folder (in this case for "/system" folder).

syntax explanation:
0 - uid - it defines that the following permission is set for the user id 0 .
0 - gid - it defines that the following permission is set for the group id 0 .
0775 - dirmode - it defines that 0775 permission to set to directories contained within the specified directory.
0644 - filemode - it defines that 0644 permission to set to files contained within the specified directory.
"/system" - target directory to set the above mentioned permissions.



set_perm(0, 3003, 06755, "/system/bin/ip");

the above command is used to set permission for a individual file (in this case for "/system/bin/ip" file).

syntax explanation:

0 - uid - it defines that the following permission is set for the user id 0 .
3003 - gid - it defines that the following permission is set for the group id 3003 .
06775 - it defines that 06775 permission to set to the specific file.
"/system/bin/ip" - target file to set the above mentioned permissions.



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

remember the file autoroot.sh from package_extract_file command?
that file is supposed to be a shell script, the above command directs cwm to execute the "autoroot.sh" shell script present in "/tmp" folder.



unmount("/system");

the unmount command directs the cwm to unmount the following partition
the syntax is just as explained in the mount command except that this command unmounts the
defined partition whereas the mount command mounts the defined partition.

Okay now going into slightly complex and/or not widely used updater-script commands,

Ifelse

Syntax:
Ifelse(condition),(do_this),(else_do_this);

Example:
ifelse mount("yaffs2", "MTD", "system", "/system") == "system", ui_print("Mounted!"), ui_print("Mount Failed!");

Ifelse command can be explained simply as asking the system to do something based on the result of a condition.

From the example:

The ifelse command would attempt to mount the MTD partition named "system" to "/system".
If the mounting process succeeds (the condition), the script will display "Mounted!", else it will display "Mount Failed!"



abort()

It just abort's the script execution

Note: it is usually paired with some other command for example the getprop command or with ifelse.

Independently specifying abort() in the updater-script will kill the script abruptly right there so use this command carefully.



ALWAYS LEAVE A BLANK LINE AT THE END OF THE update-script (if the code contains 50 lines then 51 lines should be visible
in the notepad++ including a blank line after the end of the script)
ALWAYS REMEMBER TO SET THE EOL (end of line) CONVERSION OF updater-script
IN UNIX FORMAT BEFORE SAVING (notepad++ > edit > EOL conversion > UNIX format)

the above mentioned commands are just basic edify scripting commands which are generally used in updater-script.

for detailed scripting and coding in edify scripting language check out the following sources:

source of update-binary

introdution to edify

http://forum.xda-developers.com/wiki/Edify_script_language

scratchpad-documenting-edify-commands-for-android-updater-scritps

http://forum.xda-developers.com/showthread.php?t=1290062

HIT THANKS IF I HAVE HELPED YOU! :)
Hi bro!

When i try to flash custom roms on my Gionee e3 im getting an error- " update file not found"!

The meta-inf folder has both the updater script n update-binary.

Pls tell me what I should do :( :(
:desperate:

Sent from my E3 using XDA Premium 4 mobile app
 

mihahn

Senior Member
May 26, 2012
3,257
2,215
0
Hi bro!

When i try to flash custom roms on my Gionee e3 im getting an error- " update file not found"!

The meta-inf folder has both the updater script n update-binary.

Pls tell me what I should do :( :(
:desperate:

Sent from my E3 using XDA Premium 4 mobile app
What folders are in your zip and which lines contains your updater script? :)

Sent from my Nexus 4 running Android 4.3
 
  • Like
Reactions: Srinath_Newbie

princemouli

Senior Member
Sep 19, 2013
277
99
0
24
visakhapatnam
i cooked the stock rom in Dsixda Android kitchen but when i try to flash it using my recovery it shows me status 0 error how to solve it...???:confused::confused:
and this is my updater-script :-


show_progress(0.1, 0);
format("MTD", "system");
mount("MTD", "system", "/system");
mount("MTD", "userdata", "/data");
delete("/data/local");
package_extract_file("check_data_app", "/tmp/check_data_app");
set_perm(0, 0, 0777, "/tmp/check_data_app");
run_program("/tmp/check_data_app");
package_extract_dir("data", "/data");
set_perm(2000, 2000, 0771, "/data/local");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");
package_extract_dir("system", "/system");
symlink("dumpstate", "/system/bin/dumpcrash");
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/lsof");
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("mksh", "/system/bin/sh");
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/touch");
symlink("toolbox", "/system/bin/umount");
symlink("toolbox", "/system/bin/uptime");
symlink("toolbox", "/system/bin/vmstat");
symlink("toolbox", "/system/bin/watchprops");
symlink("toolbox", "/system/bin/wipe");
symlink("toolbox", "/system/bin/chcon");
symlink("toolbox", "/system/bin/setenforce");
symlink("toolbox", "/system/bin/grep");
symlink("toolbox", "/system/bin/runcon");
symlink("toolbox", "/system/bin/touchinput");
symlink("toolbox", "/system/bin/md5");
symlink("toolbox", "/system/bin/getsebool");
symlink("toolbox", "/system/bin/setsebool");
symlink("toolbox", "/system/bin/restorecon");
symlink("toolbox", "/system/bin/getenforce");
symlink("toolbox", "/system/bin/load_policy");
symlink("toolbox", "/system/bin/cp");
symlink("toolbox", "/system/bin/playback");
symlink("toolbox", "/system/bin/du");
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(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, 0777, "/system/bin/a2sd");
set_perm(0, 0, 0777, "/system/etc/init.d/00banner");
set_perm(0, 0, 0777, "/system/etc/init.d/01sysctl");
set_perm(0, 0, 0777, "/system/etc/init.d/02firstboot");
set_perm(0, 0, 0777, "/system/etc/init.d/04apps2sd");
set_perm(0, 0, 0777, "/system/etc/init.d/99complete");
set_perm(0, 0, 0777, "/system/bin/launcha2sd");
set_perm(0, 0, 0777, "/system/bin/starta2sd");
set_perm(0, 0, 0777, "/system/bin/jita2sd");
set_perm(0, 0, 0777, "/system/bin/chka2sd");
set_perm(0, 0, 0777, "/system/bin/zipalign");
set_perm(0, 0, 0777, "/system/bin/sysinit");
set_perm(0, 0, 0777, "/system/bin/busybox.a2sd");
set_perm(0, 0, 0644, "/system/bin/apps2sd.hlp");
set_perm(0, 0, 0777, "/system/xbin/a2sd");
set_perm(0, 0, 0777, "/system/bin/dtinstall");
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, 0755, "/system/vendor/bin");
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(0, 2000, 0755, "/system/vendor/lib/egl");
set_perm(0, 2000, 0755, "/system/vendor/lib/hw");
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
set_perm(0, 0, 04755, "/system/xbin/bash");
symlink("/system/xbin/bash", "/system/bin/sh");
set_perm(0, 0, 04755, "/system/xbin/nano");
set_perm(0, 0, 04755, "/system/xbin/sysrw");
set_perm(0, 0, 04755, "/system/xbin/sysro");
set_perm(0, 1000, 0755, "/system/xbin/busybox");
symlink("/system/xbin/busybox", "/system/bin/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);
run_program("/data/dtinstall.launch");
delete("/system/bin/dtinstall");
delete("/data/dtinstall.launch");
package_extract_file("move_cache_sd", "/tmp/move_cache_sd");
set_perm(0, 0, 0777, "/tmp/move_cache_sd");
run_program("/tmp/move_cache_sd");
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");
unmount("/data");


my device is Celkon A97i
android version :-- 4.0.3
mt6575 cortex A9 procesor
can any one help me please.....
 

RaptorSFX

Member
Nov 2, 2012
10
3
0
I am trying to create a file that updates several system audio files but every time that I try it says "Installation Aborted".

This is the updater-script:
Code:
mount("/system");
set_perm_recursive(0, 0, 0755, 0644, "/system/media/audio/ui");
set_perm_recursive(0, 0, 0755, 0644, "/system/media/audio/notifications");
package_extract_dir("system", "/system");
unmount(/system);
The following is a link for the whole zip file: https://mega.co.nz/#!8kEXyb4I!XGdUwh2KJkopNYaNyG0IJnDUwRk3lsfWE6n_fdGd6wc

Can someone please help?
I am running CM10.2 and constantly updating nightlies so this will help me not to do this manually every day.