[Motorola Photon 4G] dcchristopher:
My apologies, kind sir ... I have seen your many contributions in these forums and thought you were a regular "dev" ... here's an example of what I was getting at. Take a look at joker's gapps zip. If you open it, you will notice a certain folder structure. It splits into two parts: the root folder of all the files you will be applying to the phone and a folder with all the flashing-related settings/commands, etc.

In the former case, you are laying out the files you will be copying to the phone. You only need to have a parent folder if there will be a file within it. No need to enumerate all possible folders, just the ones which will contain files. Makes sense, right? It's like it will expand the zip at the root of the phone and what gets expanded (with folder names) will just fall into place.

In the latter case, you will notice the META-INF folder whose structure must remain the same; the most important part is that updater-script.sh. I have seen special scripting "code" (two types in fact) and I have seen regular unix syntax in there. Here is a great tutorial on the various commands you can use: http://xdaforums.com/showthread.php?t=641223. Notice that joker's uses a slightly different syntax but both will work (if you want to leverage what he has in there).

It's really as easy as that. If you get the hang of it, I can walk you through the signing process (for non-CWM, non-rooted phones). In fact, you can look that up too. It's not quite as simple as this but it's not that hard either.

So, just grab the APKs you want and dump them into the system/app folder of the zip. You can delete all other folders from joker's gapps zip if you won't be placing any files in them (like optional, system/etc, system/lib, etc).

Over at the META-INF/com/google/android folder, delete the file that ends in a tilde (it's a temp file); the one you want is updater-script.sh. Just delete all lines in it and if you want to ensure the files in your system/app folder are deleted prior to laying them down, just add lines that look like this:

delete SYSTEM:app/[name of g-app].apk

When you're done deleting files, just include the following command:

copy_dir PACKAGE:system SYSTEM:

which will perform the copying (expanding the zip's /system folder over the phone's /system folder). Then fix permissions (for all files in /system/app) with

set_perm_recursive 0 0 0755 0644 SYSTEM:app

Notice in the tutorial that there are commands for progress bars, echoing messages to the screen, etc. You know ... gimmicks, man, gimmicks! ;-)

I hope this helps!

Last-minute realization: it was a "f*** me" moment when I remembered about the file in the META-INF folder called Manifest.mf ... that file needs to be generated by a tool which will look at each file in your zip and calculate a SHA1 hash for signing/validation purposes. Hold on, let me find some info on that. Try to do it by removing all lines starting with the fourth one and see if CWM complains. I think it's mostly needed for signing the updates for legit (non-rooted) phones. G*d dammit ... mother .... $@$&%@$&%

This is what I get for trying to help! :-P

---------- Post added at 09:25 PM ---------- Previous post was at 09:20 PM ----------

I gotta be up at 5am tomorrow so I apologize for not being to walk you through this but, here are two great links:

Creating Android Update Zip Packages

http://www.londatiga.net/it/how-to-create-android-update-zip-package/

and Signing Android Zip Packages

http://www.londatiga.net/it/how-to-sign-apk-zip-files/

Just download the necessary tools and libraries and you should be OK. If you get stuck, let me know.