[Q] How to make a flashable zip from a set of apks?

demarcmj

Senior Member
May 23, 2011
767
153
0
Syracuse, NY
In order to expedite my ROM flashes, I have downloaded apk files for all of the apps that I use that fit both of the following criteria:
  • Free
  • Don't contain any useful data requiring a proper backup
Usually, I just add these apks to the \system\app\ directory before flashing, but recently I thought that it might be easier to dump these all into a flashable zip so that I can just keep that on my SD card and don't need to mess with the ROM every single time.

Does anyone know of any step-by-step guides on how to do this?
 

demarcmj

Senior Member
May 23, 2011
767
153
0
Syracuse, NY
So, I looked at the flashable zip for novalauncher for clues, and these are the steps I came up with...

  1. Create the "system\app" structure
  2. Put all the apk files inside "app"
  3. Create a "META-INF\com\google\android\" structure
  4. Create a blank file called "updater-script" in the "android" folder
  5. Fill "updater-script" with the following
    Code:
    show_progress(0.500000, 0);
    
    ui_print("Mounting /system");
    run_program("/sbin/busybox", "mount", "/system");
    ui_print("Removing previous versions");
    delete("/system/app/[filename1.apk]");
    delete("/system/app/[filename2.apk]");
    delete("/system/app/[filenameN.apk]");
    ui_print("Installing APKs to /system");
    package_extract_dir("system", "/system");
    ui_print("Unmounting /system");
    unmount("/system");
    
    ui_print("Done");
    show_progress(1.000000, 0);
    (Inserting the real filenames for each apk, where appropriate)
  6. DO SOMETHING WITH "update-binary" ???
  7. Zip it up (the "system" and "META-INF" folders should be at the highest level)
  8. Done. Flash it.

The bolded step above (#6) is where I'm lost. Anyone have any thoughts?
 
Last edited:

Tobias39

Member
Dec 1, 2009
25
0
0
The flashable zip to restore apks

Guys, I've been entertaining the idea of getting an app developed that would do exactly what you describe. Pretty much automate the process with an GUI... select the apks/apps you want to build into the flashable zip file, generate the zip and sign it. I know this can be done.

Are there any devs out there that want to assist me with this project? Name your price on the development costs. email me at [email protected].

I'd like to get this developed.

Tobias
 
May 8, 2011
43
20
0
Guys, I've been entertaining the idea of getting an app developed that would do exactly what you describe. Pretty much automate the process with an GUI... select the apks/apps you want to build into the flashable zip file, generate the zip and sign it. I know this can be done.

Are there any devs out there that want to assist me with this project? Name your price on the development costs. email me at [email protected].

I'd like to get this developed.

Tobias
Looks like someone beat you to it (haven't tested it out yet):
https://play.google.com/store/apps/details?id=scd.app2zip

Sent from my ADR6300 using Tapatalk
 

demarcmj

Senior Member
May 23, 2011
767
153
0
Syracuse, NY
In case anyone is interested, I got an answer to the original question over at AndroidPassions.com: http://androidpassions.com/forum/index.php/topic/109-how-to-make-a-flashable-zip-from-a-set-of-apks/

To summarize: My procedure I posed is essentially fine. You just have to get the "update-binary" from pretty much any other flashable you have, such as gapps. Also, the delete lines I have there aren't necessary if, like me, you don't actually expect there to be anything there. Or, you can also just use the zip that wildstang83 made for me (see his post)
 
  • Like
Reactions: ai6908

Cares

Senior Member
Dec 2, 2010
1,412
192
83
I was looking into this as well and I had a question about the update-binary file.

I figured I could just pull one from any working flashable zip. But why are they different file sizes from one zip to the other? It has to be to different in some way.
 

tobiascuypers

Senior Member
Jun 9, 2012
1,672
426
0
A little town called Proctor
Guys, I've been entertaining the idea of getting an app developed that would do exactly what you describe. Pretty much automate the process with an GUI... select the apks/apps you want to build into the flashable zip file, generate the zip and sign it. I know this can be done.

Are there any devs out there that want to assist me with this project? Name your price on the development costs. email me at [email protected].

I'd like to get this developed.

Tobias
I saw your name and i had to say hi!!! i have the same name! ive never met anyone with the same name!