FORUMS
Remove All Ads from XDA

[TOOL][Windows] Zip Builder v4.4.0 - Build and Sign ANY script based installer

1,588 posts
Thanks Meter: 23,933
 
By TKruzze, Senior Member on 23rd January 2018, 09:24 PM
Post Reply Email Thread
Announcement from TKruzze: Recent Updates dramatically improve memory handling on all systems
Zip Builder is a stand-alone Windows exe (ZipBuild.exe) that can be used to build and sign Android zip-based installers from Windows folders. All required components to build and sign a zip installer are included - no additional files or software are required. The only requirement is that you have a current version of Java installed on your system. Zip Builder can be used on both shell-script and edify-script based installers and performs the proper build and signing methods, accordingly.

Although it's highly recommended to install the software using the Windows Installer (see below), the stand-alone exe is all that's required to use the program. The program command line options are as follows:
ZipBuild.exe <option1> <option2...> <*Folder Name>
Valid options are as follows:
  • 'm' or '-manual': Manually select folder to be processed
  • 's' or '-signed': Append '-signed' to the output file name
  • '5' or '-md5': Generate corresponding MD5 checksum file
  • 'c' or '-confirm': Confirm options before building
  • 'g' or '-gitinclude': include .git folders and related files
    * Ignored when using manual selection mode
OPTIONS EXPLAINED
'm' or '-manual': In Manual mode you will be presented with a dialog box where you can manually select the folder containing the files to be processed. *When using Manual mode, the folder name will be ignored if it was provided in the command line

's' or '-signed': This option will append '-signed' to the output file name. For example: Folder name 'UPDATE-adb.Installer.v1.0.36' would produce a signed zip file named 'UPDATE-adb.Installer.v1.0.36-signed.zip'.

'5' or '-md5': This option will create a separate, corresponding MD5 checksum file that can be used to verify file integrity in TWRP or with other Windows checksum utilities.

'c' or '-confirm': When this option is used, you will be presented with a dialog box where you can confirm (or change) the 2 options above. If either (or both) options above have been specified on the command line, the checkboxes will be pre-selected accordingly. Once you're satisfied with your selections, click the 'Build Zip File' button to begin the zip building and signing process.

'g' or '-gitinclude': This option will include any .git folders and related files (.git, .gitignore, and .gitattributes) that are excluded from the zip file by default. [Should rarely be needed, if ever]
ZIP BUILDER SETTINGS MANAGER
Zip Builder Settings Manager (ZipBuildSettings.exe) is an optional companion app that can be used to manage the settings and options (shown below) for Zip Builder:
  • You can choose to create Windows Context (Right-Click) menus that will allow you to build a signed zip installer simply by right-clicking on a folder name. Folder names that end in '20YYMMDD' or '20YYxxxx' as well as folder names that begin with 'UPDATE' are supported in Windows 7 and above. You can also enable the option to build from any folder by holding the SHIFT key while selecting the folder.
  • You can choose when to display the confirmation dialog
  • You can choose when to append '-signed' to output file names
  • You can choose when to create md5 checksum files
  • You can choose to include all .git folders and related files (see above)
DATE CODE FEATURE
If you're building from a Windows folder name that ends in '20YYMMDD' or '20YYxxxx', Zip Builder will give you the option to change or update the date code portion of the file name before building the zip (it will also suggest the current date's date code - YYYYMMDD). And, if you're building a zip installer that includes a g.prop file (found in many GApps packages), the installer will read the date code from the 'ro.addon.*_version=' property and automatically use it in place of the date code from the Windows folder name.
WINDOWS INSTALLER
As mentioned above, you'll have the best user experience if you install Zip Builder using the Windows installer. It runs in standard user mode (no Admin access required or requested) and installs the Zip Builder and Zip Builder Settings exe's in: 'C:\Users\<user>\AppData\Roaming\Zip Builder'. The installer will create a program group and shortcuts in the Windows start menu (and optionally on the desktop) that can be used to launch Zip Builder in 'manual selection mode', where the user can manually select the folder they wish to build. The installer will automatically run Zip Builder Settings Manager at the conclusion of the install where you can configure the settings and options to your personal preference.

Uninstalling Zip Builder from the Windows Uninstall menu will remove all traces of the software from your system. And, since Zip Builder, Zip Builder Settings Manager, or its installer will NEVER prompt for UAC access, you can be confident that it's not touching the Windows operating system. Of course, all source code is available if you want to check for yourself - you can even build it for yourself, if you want!
TECHNICAL NOTES
Version 4.3+ of Zip Builder includes the new ZipSigner 2.1 Java executable that was rewritten from the ground up by @topjohnwu for use in his Magisk root management software. This change will allow you to build the largest zip installer on even the smallest 32-bit machine. I was able to build a 1.0+GB shell-script based installed on a 32-bit Windows XP machine with only 1GB of RAM.

If you have had java heap size issues building zip installers in the past, version 4.3+ of Zip Builder should completely eliminate these problems.
DOWNLOADS
Windows Executables: Zip_Builder_Executables_and_Windows_Installer_v4.4 .0.zip
Source Code: Zip_Builder_Source_Code_v4.4.0.zip
XDA:DevDB Information
Zip Builder, Tool/Utility for all devices (see above for details)

Contributors
TKruzze

Version Information
Status: Stable
Current Stable Version: 4.4.0
Stable Release Date: 2018-03-26

Created 2018-01-23
Last Updated 2018-03-26
The Following 79 Users Say Thank You to TKruzze For This Useful Post: [ View ] Gift TKruzze Ad-Free
 
 
23rd January 2018, 09:24 PM |#2  
TKruzze's Avatar
OP Senior Member
Flag Ann Arbor, MI
Thanks Meter: 23,933
 
More
Info 2 Sources & Acknowledgements / Recent Changes
SOURCES AND ACKNOWLEDGEMENTS
Zip Builder has existed for me since way back in 2013 when I started developing GApps packages. I've added features here and there and finally decided to share it. After privately sharing with @osm0sis, I received a lot of very constructive feedback and based on this, I polished the interface and added some new features. A big thank you to @osm0sis for this feedback. Without his input, it would look a lot clunkier than it does today.

All source code is provided, however, it's only appropriate for me to publicly acknowledge that this work includes code and binaries from several third party sources. Below is a complete list of these sources. You will also find this list as well as the actual code and binaries in the Source Code Zip file available for download.

Zip Builder
------------
Zip Builder is Copyright (c) 2013-2018 by @TKruzze
Original source code and compiled executables can be found on
XDA Developers. Zip Builder also includes code and compiled
executables from the sources listed below:

ZipSigner
---------------
ZipSigner is Copyright (c) 2016-2018, John Wu @topjohnwu)
Original source code and license can be found at:
https://github.com/topjohnwu/Magisk
The version of ZipSigner used in Zip Builder was built by @topjohnwu using the source code above and optimized using ProGuard optimizations

Info-ZIP
----------
Info-ZIP is Copyright (c) 1990-2007 Info-ZIP
Original License can be found at:
http://www.info-zip.org/license.html
Downloads can be found at:
ftp://ftp.info-zip.org/pub/infozip/win32/
Original source code can be found at:
https://sourceforge.net/projects/infozip/

Hashutils
----------
The MD5 Checksum code and executable are from code.kliu.org
Original source code and compiled executables can be found at:
http://code.kliu.org/misc/hashutils/
SUMMARY OF RECENT CHANGES
MARCH 26, 2018 - v4.4.0
  • Updated the ZipSigner java executable to v2.1-min. This version is significantly smaller than v2.1 (458K vs 4.0MB) and was built by @topjohnwu, himself, using using ProGuard optimizations
  • Recompiled Zip Builder Settings Manager (ZipBuildSettings.exe) without UPX compression to try and further minimize AV false-positives
  • Windows installer now built using lzma2/max compression and no longer uses solid compression. This was done to optimize installation speed and further minimize AV false-positives
  • As always, the best and easiest way to update is to simply install the new version using the Windows installer without uninstalling the previous version. All of your settings and options will be retained

MARCH 25, 2018 - v4.3.0
  • Updated signing code with the new ZipSigner 2.1 Java executable that was rewritten from the ground up by @topjohnwu for use in his Magisk root management software. This change will allow you to build the largest zip installer on even the smallest 32-bit machine. I was able to build a 1.0+GB shell-script based installer on a 32-bit Windows XP machine with only 1GB of RAM.
    - Thanks, of course, to @topjohnwu, but also to @osm0sis for the heads up on its existence
    - Thanks to @jenslody for building it for inclusion here.
  • Since memory and java heap size issues are now resolved with the above change, I have removed all memory and java heap size checks from Zip Builder. The above change also allowed me to remove the separate test key files (testkey.pk8 and testkey.x509.pem), signapk.jar, zipadjust, and minsignapk.jar executables as their functions are all now contained in the new ZipSigner 2.1 Java executable mentioned above.
  • Installer will now clean up its 'temp folder' files before displaying the 'COMPLETED' message. On slower systems this should reduce the delay when selecting the 'Close' button after Zip Builder completes the signing process.
    - Thanks to @osm0sis for reporting and helping track down the issue
  • Zip Builder is now built without UPX compression on the Windows exe's. This was done to try and reduce false-positives that may be reported by your AV software. If you're still having AV hits, please read the ANTI-VIRUS FALSE-POSITIVES section on the OP.
  • Fixed bug in installer that would corrupt the context (right-click) menu settings on an update (not initial) installation.
    - Thanks to @osm0sis for reporting and helping track down the issue
The Following 2 Users Say Thank You to TKruzze For This Useful Post: [ View ] Gift TKruzze Ad-Free
23rd January 2018, 09:24 PM |#3  
TKruzze's Avatar
OP Senior Member
Flag Ann Arbor, MI
Thanks Meter: 23,933
 
More
Exclamation Anti-Virus False-Positives
ANTI-VIRUS FALSE-POSITIVES
There have been reports of false-positive flaggings of Zip Builder and/or the Windows installer. While I can, personally, assure you that there's no malware included in Zip Builder or its installer, I also understand that there may be some concern with using software that's been flagged on your machine.

To allay your concerns as best as possible, I have included 100% of the original source code for you to inspect and/or build the software yourself. Again, there is no possibility of malware as I do all of my compiling on a clean machine that is not connected to the internet. I have also submitted all 4 Windows executables to the 2 major AV inspection services on the net. Below are the results of these inspections:
The Following 19 Users Say Thank You to TKruzze For This Useful Post: [ View ] Gift TKruzze Ad-Free
24th January 2018, 01:28 AM |#4  
osm0sis's Avatar
Recognized Developer / Recognized Contributor
Flag Halifax
Thanks Meter: 27,402
 
Donate to Me
More
Excellent! Glad to see a public release! I was using Zip Builder all day to prepare my latest round of updates for my Odds and Ends thread, and it couldn't be easier!

It's been great working with you again @TKruzze, I knew you couldn't stay away from contributing awesome things to the community for too long.
The Following 12 Users Say Thank You to osm0sis For This Useful Post: [ View ]
25th January 2018, 06:15 AM |#5  
Recognized Developer
Thanks Meter: 1,731
 
More
Looks very cool! You're inspiring me to clean up and release a tool that I built which has no current equivalent.

Seeing as this uses Java, what would it take to make it work under linux? As a staunch Linux/osx user who only runs a windows VM for flashing his Samsung with odin, I would love to integrate this into my workflow, but without linux or Mac support for me personally that will be difficult 😁
The Following 3 Users Say Thank You to partcyborg For This Useful Post: [ View ]
25th January 2018, 07:59 PM |#7  
TKruzze's Avatar
OP Senior Member
Flag Ann Arbor, MI
Thanks Meter: 23,933
 
More
Quote:
Originally Posted by partcyborg

Seeing as this uses Java, what would it take to make it work under linux?

The only thing I'm actually using Java for is the signing portion of the process. There's no real way I can think of to easily port the rest of it to Linux. Thanks for the feedback!
The Following User Says Thank You to TKruzze For This Useful Post: [ View ] Gift TKruzze Ad-Free
25th January 2018, 08:01 PM |#8  
kamilmirza's Avatar
Senior Member
Thanks Meter: 1,064
 
More
wow thanks @TKruzze
this will be really helpful for my future firmware updates ✌
The Following User Says Thank You to kamilmirza For This Useful Post: [ View ] Gift kamilmirza Ad-Free
25th January 2018, 10:19 PM |#9  
Account currently disabled
Thanks Meter: 21
 
More
Ok im very very new to all this but does this make zips that are flashable in twrp? Im wanting to learn how to do that if you guys could point me in the right direction id be thankful.
25th January 2018, 10:39 PM |#10  
kamilmirza's Avatar
Senior Member
Thanks Meter: 1,064
 
More
Quote:
Originally Posted by papasmurf879

Ok im very very new to all this but does this make zips that are flashable in twrp? Im wanting to learn how to do that if you guys could point me in the right direction id be thankful.

yes
you need update-script and update-binary along other files
The Following User Says Thank You to kamilmirza For This Useful Post: [ View ] Gift kamilmirza Ad-Free
25th January 2018, 10:47 PM |#11  
Recognized Developer
Thanks Meter: 1,731
 
More
Quote:
Originally Posted by TKruzze

The only thing I'm actually using Java for is the signing portion of the process. There's no real way I can think of to easily port the rest of it to Linux. Thanks for the feedback!

My mistake. Thanks for the explanation! I'm sure then that this will run in wine however, I may give it a shot at some point. If I do I will let you know.
The Following User Says Thank You to partcyborg For This Useful Post: [ View ]
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes