[Q] How do I write an update script?

deciple

Senior Member
Sep 22, 2010
325
45
0
Salem
How Do I make an updater.script to flash a zip through recovery that flashes framework, system/apps, data/apps, and bootanimations into CM9 alpha5?
 
Last edited:

KennyG123

Senior Moderator / Moderator Committee / Spider-Mo
Staff member
Nov 1, 2010
39,185
51,663
263
Right behind you!
How Do I make an updater.script to flash a zip through recovery that flashes framework, system/apps, data/apps, and bootanimations into CM9 alpha5?
Just take an existing script like my KGBlues CM9 theme and make all the right directories and put your files in there. Then remove the files from the theme.

Sent from my SPH-D700 using xda premium
 

ÜBER™

Recognized Themer
Nov 9, 2011
13,808
8,904
0
Texas
What kenny said unless you want to write your own commands to mount system and have it rewrite what your trying to replace. If you know linux coding its not too hard or if you take a look at someone elses updater..and follow the commands you can edit the ui_print to what ever you want :). Id say go look at shanes updater script...cuz his will mount everything unmount and wipe caches...I think.

Sent From My SPH-D700 Running Android 4.0
 

deciple

Senior Member
Sep 22, 2010
325
45
0
Salem
Ok, I looked at booth of their scripts and what do I add for flashing boot animation.zips? Also do I need yo add anything to write to data/app?

Sent from my SPH-D700 using xda premium
 

ÜBER™

Recognized Themer
Nov 9, 2011
13,808
8,904
0
Texas
Ok, I looked at booth of their scripts and what do I add for flashing boot animation.zips? Also do I need yo add anything to write to data/app?

Sent from my SPH-D700 using xda premium
If the script says anything like rewrite or has "rw" look at it and duplicate but change the directory such as it may say rw /system/app change the last folder to /system/media.

Sent From My SPH-D700 Running Android 4.0

In my updater script this will mount the system and will replace the /system/framework, /system/app, /system/media.

which is usually for themes the framework-res.apk, the systemui.apk, and the bootanimation.zip.

If you want it to replace /data/app then look at the previous commands and edit the directory to delete your desired app and the next command it will extract it and you need to create that folder and place the app and make sure the command is rewritten to that directory. Hope this helps.

For example you want to add XDA.apk then you would do this.

run_program("/sbin/busybox", "mount", "/data");
delete("/data/app/XDA.apk");
package_extract_dir("data", "/data");
run_program("/sbin/busybox","unmount","/data")

Now its correct sorry I forgot /data is where apps are.
 
Last edited: