Installing applications to an Android phone is simple, either use the Market application to find and install,  put the apk file for the program on to your phone/SD card and install using Astro or finally you can use the adb push command to push the files to the phone. These are all fine methods of installing single programs to the phone but when you want to install a few programs/libraries/configs all at once you may be better using an file with everything packaged up. The case for such a file is obvious when you want to add all of the Google applications to the AOSP builds of Android which would take a while rather than installing one update.

Information on how to create the was taken from thanks to Lox for sharing.

Creating an package is quite easy in fact. For example, to add a (valid) test.apk package to your rom:

- create an empty folder <workdir>
- create folder structure for test.apk (<workdir>/system/app) and copy the test.apk
- create folder structure for update-script (<workdir>/META-INF/com/google/android)
- edit <workdir>/META-INF/com/google/android/update-script
- put in it:

show_progress 0.1 0

copy_dir PACKAGE:system SYSTEM:
set_perm_recursive 0 0 0755 0644 SYSTEM:app
show_progress 0.1 10

- compress the <workdir> content to zip (not the <workdir> folder itself)

Now you are going to sign the zip file. Download and copy it in your <SDK>/tools folder. Extract it here. It should create a sign subfolder with a testsign.jar file in it.

Then in the command prompt/terminal, from <workdir> folder, do:

java -classpath <SDK>/tools/sign/testsign.jar" testsign

Ok, now your zip file is ready to be deployed using the “Flash zip from sdcard” option in a recovery image.