Create a file called build.ext where ext is one of json, yml, or toml. In that file, specify any number of apps or files and some information about them, and at least one zip file, though you can specify multiple. This guide uses TOML configurations as examples. For more complete examples, including configurations used to build the zips in the downloads section, see the repository. Command-line options: KeyDescriptionExample destination Destination folder to place the built zip files. [Read more from Zip Builder: Intro...]
Looking for the latest version of
zip-builder? Go to the downloads page.
Making flashable zip files for Android devices can be… frustrating.
For those who have never tried, here are some of the more irritating aspects:
- You use a very limited scripting language called edify to write your install scripts. So limited, that some people replace the binary (
update-binary) used to parse the script (
updater-script) with a normal shell script that performs the installation instead. What’s the point of having
- Any app installed to
/system/with bundled libraries in the apk need to have those libraries extracted to be usable.
- Various system files need to be created to grant certain permissions to apps by default, and you need to know the syntax of each one (usually some dialect of XML).
- If the correct permissions are not set on an installed file, it can cause the system to bootloop.
- Configuration files can be written in JSON, YAML, or TOML.
- Automatic generation of
- Automatically extracts libraries from apps being installed under
- Can specify different file or app sources for different versions of Android and/or CPU architectures.
updater-scriptwill only install the files for that particular system.
- Validate downloaded files with
- F-Droid interoperability: Specify the repo URL and app’s package name, and zip-builder automatically gets the rest of the app’s information from F-Droid’s repository, including a download link for the latest version of the app.
- Remove any files you specify, e.g. apps that you are replacing with your own version or apps/files you just don’t want on your system.
- Standalone binaries available for Mac OS X, Linux, and Windows. Android binaries (to use in a terminal app) coming soon.
Android Versions Files and apps require specifying a minimum Android version that the file or app is compatible with. It is assumed that the app or file supports any newer Android version as well, up to the next Android version specified. Android versions are specified using the first two numbers of their version number. For instance, Android Marshmallow would be specified as version 6.0, not the 6.0.1 bugfix release. Android Nougat 7. [Read more from Zip Builder Config: Android Versions and CPU Architectures...]
A “file” is anything that you install to the file system of an Android device. While keeping in mind that all apps are files, any non-app file should be labeled a “file” while apps are labeled “app”. Basic Config # Replace [[files]] name = "example_file" url = "https://example.com/files/Example.ttf" destination = "/system/fonts/Example.ttf" [[files.androidversion]] number = "5.1" All File Parameters KeyDescriptionExample name Required. A unique identifier not used by other files. [Read more from Zip Builder Config: Files...]
The Apps All apps are files and use the same key/value pairs as files plus the ones below. All required keys for a file apply to apps as well, plus any keys required specifically for apps. All App Parameters KeyDescriptionExample package_name Required. The package name of the app. "org.mozilla.firefox" is_fdroid_repo If the app’s URL is actually the root of an F-Droid repo where the app is hosted. [Read more from Zip Builder Config: Apps...]
The Zips Zips are the containers that hold everything you are installing. As such, most of the heavy configuration is found in the apps and files you are installing, though you can still specify a few things here: KeyDescriptionExample name Required. A unique identifier that will serve as the filename of the zip. If omitted or commented out, the zip will not be built. install-zip remove_files A list (array) of paths to delete when this zip is installed and when the system is updated. [Read more from Zip Builder Config: Zips...]
Windows x86 x86_64 Mac OS x86 x86_64 Linux x86 x86_64 ARM ARM64 FreeBSD x86 x86_64 ARM NetBSD x86 x86_64 ARM OpenBSD x86 x86_64 ARM DragonFlyBSD x86_64